diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:48:25 +0000 |
commit | 9c0049cfae49c8e4ddef9125a69db2ad134c10c6 (patch) | |
tree | 812a86c0eee63dfc5ace12f2622ed3ce9cd3d680 /svgio/inc | |
parent | Releasing progress-linux version 4:24.2.3-2~progress7.99u1. (diff) | |
download | libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.tar.xz libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.zip |
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'svgio/inc')
-rw-r--r-- | svgio/inc/SvgNumber.hxx | 8 | ||||
-rw-r--r-- | svgio/inc/svgcharacternode.hxx | 8 | ||||
-rw-r--r-- | svgio/inc/svgnode.hxx | 7 | ||||
-rw-r--r-- | svgio/inc/svgstyleattributes.hxx | 15 | ||||
-rw-r--r-- | svgio/inc/svgtspannode.hxx | 2 |
5 files changed, 24 insertions, 16 deletions
diff --git a/svgio/inc/SvgNumber.hxx b/svgio/inc/SvgNumber.hxx index 4d03335cf4..c62576c2b0 100644 --- a/svgio/inc/SvgNumber.hxx +++ b/svgio/inc/SvgNumber.hxx @@ -37,10 +37,10 @@ class InfoProvider public: virtual ~InfoProvider() {} virtual basegfx::B2DRange getCurrentViewPort() const = 0; - /// return font size of node inherited from parents - virtual double getCurrentFontSizeInherited() const = 0; - /// return xheight of node inherited from parents - virtual double getCurrentXHeightInherited() const = 0; + /// return font size of node, either set here or inherited from parents + virtual double getCurrentFontSize() const = 0; + /// return xheight of node, either set here or inherited from parents + virtual double getCurrentXHeight() const = 0; }; enum class SvgUnit diff --git a/svgio/inc/svgcharacternode.hxx b/svgio/inc/svgcharacternode.hxx index d81066af47..20c60d787c 100644 --- a/svgio/inc/svgcharacternode.hxx +++ b/svgio/inc/svgcharacternode.hxx @@ -38,11 +38,10 @@ namespace svgio::svgreader /// the string data OUString maText; - // keep a copy of string data before space handling - OUString maTextBeforeSpaceHandling; - SvgTspanNode* mpParentLine; + bool mbHadTrailingSpace = false; + /// local helpers rtl::Reference<drawinglayer::primitive2d::BasePrimitive2D> createSimpleTextPrimitive( SvgTextPosition& rSvgTextPosition, @@ -65,8 +64,7 @@ namespace svgio::svgreader virtual const SvgStyleAttributes* getSvgStyleAttributes() const override; void decomposeText(drawinglayer::primitive2d::Primitive2DContainer& rTarget, SvgTextPosition& rSvgTextPosition) const; - void whiteSpaceHandling(); - SvgCharacterNode* addGap(SvgCharacterNode* pPreviousCharacterNode); + SvgCharacterNode* whiteSpaceHandling(SvgCharacterNode* pPreviousCharacterNode); void concatenate(std::u16string_view rText); /// Text content diff --git a/svgio/inc/svgnode.hxx b/svgio/inc/svgnode.hxx index 16c1f50bc3..5231635d62 100644 --- a/svgio/inc/svgnode.hxx +++ b/svgio/inc/svgnode.hxx @@ -163,11 +163,8 @@ namespace svgio::svgreader /// InfoProvider support for %, em and ex values virtual basegfx::B2DRange getCurrentViewPort() const override; - virtual double getCurrentFontSizeInherited() const override; - virtual double getCurrentXHeightInherited() const override; - - double getCurrentFontSize() const; - double getCurrentXHeight() const; + virtual double getCurrentFontSize() const override; + virtual double getCurrentXHeight() const override; /// Id access std::optional<OUString> const & getId() const { return mpId; } diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx index c5c095462f..30cbab9656 100644 --- a/svgio/inc/svgstyleattributes.hxx +++ b/svgio/inc/svgstyleattributes.hxx @@ -247,10 +247,19 @@ namespace svgio::svgreader // #121221# Defines if evtl. an empty array *is* set bool mbStrokeDasharraySet : 1; + // tdf#155651 Defines if 'context-fill' is used in fill + bool mbContextFill : 1; + + // tdf#155651 Defines if 'context-stroke' is used in stroke + bool mbContextStroke : 1; + // tdf#94765 Check id references in gradient/pattern getters OUString maNodeFillURL; OUString maNodeStrokeURL; + const basegfx::BColor* maContextFill; + const basegfx::BColor* maContextStroke; + /// internal helpers void add_fillGradient( const basegfx::B2DPolyPolygon& rPath, @@ -327,6 +336,12 @@ namespace svgio::svgreader /// stroke content const basegfx::BColor* getStroke() const; + /// context fill content + const basegfx::BColor* getContextFill() const; + + /// context stroke content + const basegfx::BColor* getContextStroke() const; + /// stop color content const basegfx::BColor& getStopColor() const; diff --git a/svgio/inc/svgtspannode.hxx b/svgio/inc/svgtspannode.hxx index 84033685d8..0740c3cece 100644 --- a/svgio/inc/svgtspannode.hxx +++ b/svgio/inc/svgtspannode.hxx @@ -53,8 +53,6 @@ namespace svgio::svgreader virtual const SvgStyleAttributes* getSvgStyleAttributes() const override; virtual void parseAttribute(SVGToken aSVGToken, const OUString& aContent) override; - double getCurrentFontSize() const; - /// X content const SvgNumberVector& getX() const { return maX; } void setX(SvgNumberVector&& aX) { maX = std::move(aX); } |