svgio/inc/svgnode.hxx                         |    3 
 svgio/inc/svgstyleattributes.hxx              |   10 -
 svgio/source/svgreader/svgnode.cxx            |    4 
 svgio/source/svgreader/svgstyleattributes.cxx |  136 ++++++++++----------------
 svgio/source/svgreader/svgstylenode.cxx       |    2 
 svgio/source/svgreader/svgsvgnode.cxx         |    6 -
 6 files changed, 68 insertions(+), 93 deletions(-)

New commits:
commit a0e613527051dc1bc00129039a405bebd75feefb
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu Jul 11 15:04:43 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Jul 11 17:34:00 2024 +0200

    svgio: simplify and rename to make it easier to understand
    
    Change-Id: Ia1cc5451d4075237f369ecda45300bccdc02c974
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170378
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/svgio/inc/svgnode.hxx b/svgio/inc/svgnode.hxx
index 727006b3ee18..c8b81fcb1d70 100644
--- a/svgio/inc/svgnode.hxx
+++ b/svgio/inc/svgnode.hxx
@@ -188,9 +188,6 @@ namespace svgio::svgreader
 
             /// alternative parent
             void setAlternativeParent(const SvgNode* pAlternativeParent = 
nullptr) { mpAlternativeParent = pAlternativeParent; }
-
-            /// Check if there is a local css style
-            bool hasLocalCssStyle() { return 
static_cast<bool>(mpLocalCssStyle); }
         };
 
       class Visitor
diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx
index 30cbab965644..6c2b550381a0 100644
--- a/svgio/inc/svgstyleattributes.hxx
+++ b/svgio/inc/svgstyleattributes.hxx
@@ -190,7 +190,7 @@ namespace svgio::svgreader
         {
         private:
             SvgNode&                    mrOwner;
-            const SvgStyleAttributes*   mpCssStyleParent;
+            const SvgStyleAttributes*   mpCssStyle;
             SvgPaint                    maFill;
             SvgPaint                    maStroke;
             SvgPaint                    maStopColor;
@@ -312,13 +312,13 @@ namespace svgio::svgreader
                 drawinglayer::primitive2d::Primitive2DContainer&& rSource,
                 const std::optional<basegfx::B2DHomMatrix>& pTransform) const;
 
-            /// helper to set mpCssStyleParent temporarily for CSS style 
hierarchies
-            void setCssStyleParent(const SvgStyleAttributes* pNew) { 
mpCssStyleParent = pNew; }
-            const SvgStyleAttributes* getCssStyleParent() const { return 
mpCssStyleParent; }
+            /// helper to set mpCssStyle temporarily for CSS style hierarchies
+            void setCssStyle(const SvgStyleAttributes* pNew) { mpCssStyle = 
pNew; }
+            const SvgStyleAttributes* getCssStyle() const { return mpCssStyle; 
}
 
             /// scan helpers
             void readCssStyle(std::u16string_view rCandidate);
-            const SvgStyleAttributes* getParentStyle() const;
+            const SvgStyleAttributes* getCssStyleOrParentStyle() const;
 
             SvgStyleAttributes(SvgNode& rOwner);
             ~SvgStyleAttributes();
diff --git a/svgio/source/svgreader/svgnode.cxx 
b/svgio/source/svgreader/svgnode.cxx
index 67244a3c2ca7..5ead9702b0f0 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -271,7 +271,7 @@ namespace {
             // - inherited attributes (up the hierarchy)
             // The first four will be collected in maCssStyleVector for the 
current element
             // (once, this will not change) and be linked in the needed order 
using the
-            // get/setCssStyleParent at the SvgStyleAttributes which will be 
used preferred in
+            // get/setCssStyle at the SvgStyleAttributes which will be used 
preferred in
             // member evaluation over the existing parent hierarchy
 
             // check for local CssStyle with highest priority
@@ -348,7 +348,7 @@ namespace {
                 {
                     SvgStyleAttributes* pNext = const_cast< 
SvgStyleAttributes* >(maCssStyleVector[a]);
 
-                    pCurrent->setCssStyleParent(pNext);
+                    pCurrent->setCssStyle(pNext);
                     pCurrent = pNext;
                 }
 
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx 
b/svgio/source/svgreader/svgstyleattributes.cxx
index 22cd585eef73..8c854e753b1d 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -244,11 +244,11 @@ namespace svgio::svgreader
             }
         }
 
-        const SvgStyleAttributes* SvgStyleAttributes::getParentStyle() const
+        const SvgStyleAttributes* 
SvgStyleAttributes::getCssStyleOrParentStyle() const
         {
-            if(getCssStyleParent())
+            if(const SvgStyleAttributes* pCssStyleParent = getCssStyle())
             {
-                return getCssStyleParent();
+                return pCssStyleParent;
             }
 
             if(mrOwner.supportsParentStyle() && mrOwner.getParent())
@@ -1191,7 +1191,7 @@ namespace svgio::svgreader
             else
             {
                 // if opacity is not set, check the css style
-                if (const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleParent())
+                if (const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyle())
                 {
                     if (pSvgStyleAttributes->maOpacity.isSet())
                     {
@@ -1302,7 +1302,7 @@ namespace svgio::svgreader
 
         SvgStyleAttributes::SvgStyleAttributes(SvgNode& rOwner)
         :   mrOwner(rOwner),
-            mpCssStyleParent(nullptr),
+            mpCssStyle(nullptr),
             maStopColor(basegfx::BColor(0.0, 0.0, 0.0), true),
             maStrokeLinecap(StrokeLinecap::notset),
             maStrokeLinejoin(StrokeLinejoin::notset),
@@ -2054,7 +2054,7 @@ namespace svgio::svgreader
             if (SVGToken::Marker == mrOwner.getType())
                 return maContextFill;
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
             if (pSvgStyleAttributes && maResolvingParent[33] < 
nStyleDepthLimit)
             {
                 ++maResolvingParent[33];
@@ -2071,7 +2071,7 @@ namespace svgio::svgreader
             if (SVGToken::Marker == mrOwner.getType())
                 return maContextStroke;
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
             if (pSvgStyleAttributes && maResolvingParent[32] < 
nStyleDepthLimit)
             {
                 ++maResolvingParent[32];
@@ -2088,7 +2088,7 @@ namespace svgio::svgreader
             if (SVGToken::ClipPathNode == mrOwner.getType())
                 return true;
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
             if (pSvgStyleAttributes && maResolvingParent[31] < 
nStyleDepthLimit)
             {
                 ++maResolvingParent[31];
@@ -2139,7 +2139,7 @@ namespace svgio::svgreader
                 }
                 else if(isClipPathContent())
                 {
-                    const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                    const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                     if (pSvgStyleAttributes && maResolvingParent[0] < 
nStyleDepthLimit)
                     {
@@ -2161,7 +2161,7 @@ namespace svgio::svgreader
             }
             else if (maNodeFillURL.isEmpty())
             {
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                 if (pSvgStyleAttributes && maResolvingParent[0] < 
nStyleDepthLimit)
                 {
@@ -2214,7 +2214,7 @@ namespace svgio::svgreader
             }
             else if (maNodeStrokeURL.isEmpty())
             {
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                 if (pSvgStyleAttributes && maResolvingParent[1] < 
nStyleDepthLimit)
                 {
@@ -2256,7 +2256,7 @@ namespace svgio::svgreader
                         }
                     }
                 }
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                 if (pSvgStyleAttributes && maResolvingParent[2] < 
nStyleDepthLimit)
                 {
@@ -2287,7 +2287,7 @@ namespace svgio::svgreader
                     }
                 }
 
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                 if (pSvgStyleAttributes && maResolvingParent[3] < 
nStyleDepthLimit)
                 {
@@ -2318,7 +2318,7 @@ namespace svgio::svgreader
                     }
                 }
 
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                 if (pSvgStyleAttributes && maResolvingParent[4] < 
nStyleDepthLimit)
                 {
@@ -2349,7 +2349,7 @@ namespace svgio::svgreader
                     }
                 }
 
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                 if (pSvgStyleAttributes && maResolvingParent[5] < 
nStyleDepthLimit)
                 {
@@ -2370,7 +2370,7 @@ namespace svgio::svgreader
                 return maStrokeWidth;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[6] < nStyleDepthLimit)
             {
@@ -2407,7 +2407,7 @@ namespace svgio::svgreader
                 return maFillOpacity;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[7] < nStyleDepthLimit)
             {
@@ -2428,7 +2428,7 @@ namespace svgio::svgreader
                 return maOpacity;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[34] < 
nStyleDepthLimit)
             {
@@ -2449,13 +2449,9 @@ namespace svgio::svgreader
                 return maOverflow;
             }
 
-            if(mrOwner.hasLocalCssStyle())
+            if (const SvgStyleAttributes* pSvgStyleAttributes = getCssStyle())
             {
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
-                if (pSvgStyleAttributes)
-                {
-                    return pSvgStyleAttributes->getOverflow();
-                }
+                return pSvgStyleAttributes->getOverflow();
             }
 
             return Overflow::hidden;
@@ -2465,7 +2461,7 @@ namespace svgio::svgreader
         {
             if(Visibility::notset == maVisibility || Visibility::inherit == 
maVisibility)
             {
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                 if (pSvgStyleAttributes && maResolvingParent[9] < 
nStyleDepthLimit)
                 {
@@ -2518,7 +2514,7 @@ namespace svgio::svgreader
                 return maFillRule;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[10] < 
nStyleDepthLimit)
             {
@@ -2539,7 +2535,7 @@ namespace svgio::svgreader
                 return maClipRule;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[25] < 
nStyleDepthLimit)
             {
@@ -2565,7 +2561,7 @@ namespace svgio::svgreader
                 return maStrokeDasharray;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[11] < 
nStyleDepthLimit)
             {
@@ -2586,7 +2582,7 @@ namespace svgio::svgreader
                 return maStrokeDashOffset;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[12] < 
nStyleDepthLimit)
             {
@@ -2607,7 +2603,7 @@ namespace svgio::svgreader
                 return maStrokeLinecap;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[13] < 
nStyleDepthLimit)
             {
@@ -2628,7 +2624,7 @@ namespace svgio::svgreader
                 return maStrokeLinejoin;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[14] < 
nStyleDepthLimit)
             {
@@ -2649,7 +2645,7 @@ namespace svgio::svgreader
                 return maStrokeMiterLimit;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[15] < 
nStyleDepthLimit)
             {
@@ -2670,7 +2666,7 @@ namespace svgio::svgreader
                 return maStrokeOpacity;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[16] < 
nStyleDepthLimit)
             {
@@ -2691,7 +2687,7 @@ namespace svgio::svgreader
                 return maFontFamily;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[17] < 
nStyleDepthLimit)
             {
@@ -2720,7 +2716,7 @@ namespace svgio::svgreader
                 // definition of the property')
                 if(SvgUnit::percent == maFontSizeNumber.getUnit())
                 {
-                    const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                    const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                     if(pSvgStyleAttributes)
                     {
@@ -2738,7 +2734,7 @@ namespace svgio::svgreader
                 }
                 else if((SvgUnit::em == maFontSizeNumber.getUnit()) || 
(SvgUnit::ex == maFontSizeNumber.getUnit()))
                 {
-                    const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                    const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                     if(pSvgStyleAttributes)
                     {
@@ -2773,7 +2769,7 @@ namespace svgio::svgreader
                 }
                 case FontSize::smaller:
                 {
-                    const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                    const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
                     if(pSvgStyleAttributes)
                     {
                         const SvgNumber aParentNumber = 
pSvgStyleAttributes->getFontSizeNumber();
@@ -2792,7 +2788,7 @@ namespace svgio::svgreader
                 }
                 case FontSize::larger:
                 {
-                    const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                    const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
                     if(pSvgStyleAttributes)
                     {
                         const SvgNumber aParentNumber = 
pSvgStyleAttributes->getFontSizeNumber();
@@ -2810,7 +2806,7 @@ namespace svgio::svgreader
                 }
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if(pSvgStyleAttributes)
             {
@@ -2830,7 +2826,7 @@ namespace svgio::svgreader
                 }
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[18] < 
nStyleDepthLimit)
             {
@@ -2861,7 +2857,7 @@ namespace svgio::svgreader
                 return maFontStyle;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[19] < 
nStyleDepthLimit)
             {
@@ -2885,7 +2881,7 @@ namespace svgio::svgreader
                 }
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[20] < 
nStyleDepthLimit)
             {
@@ -2916,7 +2912,7 @@ namespace svgio::svgreader
                 return maTextAlign;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[21] < 
nStyleDepthLimit)
             {
@@ -2937,7 +2933,7 @@ namespace svgio::svgreader
                 return this;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[22] < 
nStyleDepthLimit)
             {
@@ -2973,7 +2969,7 @@ namespace svgio::svgreader
                 return maTextAnchor;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[23] < 
nStyleDepthLimit)
             {
@@ -3003,7 +2999,7 @@ namespace svgio::svgreader
             }
             else
             {
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                 if (pSvgStyleAttributes && maResolvingParent[24] < 
nStyleDepthLimit)
                 {
@@ -3024,16 +3020,10 @@ namespace svgio::svgreader
                 return maClipPathXLink;
             }
 
-            // This is called from add_postProcess so only check the parent 
style
-            // if it has a local css style, because it's the first in the stack
-            if(mrOwner.hasLocalCssStyle())
+            // This is called from add_postProcess so only check if it has a 
css style
+            if (const SvgStyleAttributes* pSvgStyleAttributes = getCssStyle())
             {
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
-
-                if (pSvgStyleAttributes)
-                {
-                    return pSvgStyleAttributes->maClipPathXLink;
-                }
+                return pSvgStyleAttributes->maClipPathXLink;
             }
 
             return OUString();
@@ -3057,16 +3047,10 @@ namespace svgio::svgreader
                 return maFilterXLink;
             }
 
-            // This is called from add_postProcess so only check the parent 
style
-            // if it has a local css style, because it's the first in the stack
-            if(mrOwner.hasLocalCssStyle())
+            // This is called from add_postProcess so only check if it has a 
css style
+            if (const SvgStyleAttributes* pSvgStyleAttributes = getCssStyle())
             {
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
-
-                if (pSvgStyleAttributes)
-                {
-                    return pSvgStyleAttributes->maFilterXLink;
-                }
+                return pSvgStyleAttributes->maFilterXLink;
             }
 
             return OUString();
@@ -3090,16 +3074,10 @@ namespace svgio::svgreader
                 return maMaskXLink;
             }
 
-            // This is called from add_postProcess so only check the parent 
style
-            // if it has a local css style, because it's the first in the stack
-            if(mrOwner.hasLocalCssStyle())
+            // This is called from add_postProcess so only check if it has a 
css style
+            if (const SvgStyleAttributes* pSvgStyleAttributes = getCssStyle())
             {
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
-
-                if (pSvgStyleAttributes)
-                {
-                    return pSvgStyleAttributes->maMaskXLink;
-                }
+                return pSvgStyleAttributes->maMaskXLink;
             }
 
             return OUString();
@@ -3123,7 +3101,7 @@ namespace svgio::svgreader
                 return maMarkerStartXLink;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[26] < 
nStyleDepthLimit)
             {
@@ -3154,7 +3132,7 @@ namespace svgio::svgreader
                 return maMarkerMidXLink;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[27] < 
nStyleDepthLimit)
             {
@@ -3185,7 +3163,7 @@ namespace svgio::svgreader
                 return maMarkerEndXLink;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[28] < 
nStyleDepthLimit)
             {
@@ -3214,7 +3192,7 @@ namespace svgio::svgreader
             // #122524# Handle SvgUnit::percent relative to parent 
BaselineShift
             if(SvgUnit::percent == maBaselineShiftNumber.getUnit())
             {
-                const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
+                const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
                 if (pSvgStyleAttributes && maResolvingParent[8] < 
nStyleDepthLimit)
                 {
@@ -3239,7 +3217,7 @@ namespace svgio::svgreader
                 return maBaselineShift;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[29] < 
nStyleDepthLimit)
             {
@@ -3259,7 +3237,7 @@ namespace svgio::svgreader
                 return maDominantBaseline;
             }
 
-            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+            const SvgStyleAttributes* pSvgStyleAttributes = 
getCssStyleOrParentStyle();
 
             if (pSvgStyleAttributes && maResolvingParent[30] < 
nStyleDepthLimit)
             {
diff --git a/svgio/source/svgreader/svgstylenode.cxx 
b/svgio/source/svgreader/svgstylenode.cxx
index cb11e133dc8f..322cdce2e4ff 100644
--- a/svgio/source/svgreader/svgstylenode.cxx
+++ b/svgio/source/svgreader/svgstylenode.cxx
@@ -94,7 +94,7 @@ namespace svgio::svgreader
             // these is in fillCssStyleVectorUsingHierarchyAndSelectors. 
There, the same string is
             // built up using the priorities of local CssStyle, Id, Class and 
other info combined
             // with the existing hierarchy. This creates a specificity and 
priority-sorted local
-            // list for each node which is then chained using 
get/setCssStyleParent.
+            // list for each node which is then chained using get/setCssStyle.
             // The current solution is capable of solving space-separated 
selectors which can be
             // mixed between Id, Class and type specifiers.
             // When CssStyles need more specific solving, the start point is 
here; remember the
diff --git a/svgio/source/svgreader/svgsvgnode.cxx 
b/svgio/source/svgreader/svgsvgnode.cxx
index c5b0fad5e7b2..eef8ba7ead32 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -61,17 +61,17 @@ namespace svgio::svgreader
             {
                 const SvgStyleAttributes* pStyles = getSvgStyleAttributes();
 
-                if(pStyles && pStyles->getParentStyle())
+                if(pStyles && pStyles->getCssStyleOrParentStyle())
                 {
                     // SVG has a parent style (probably CssStyle), check if 
fill is set there anywhere
                     // already. If yes, do not set the default fill (black)
                     bool bFillSet(false);
-                    const SvgStyleAttributes* pParentStyle = 
pStyles->getParentStyle();
+                    const SvgStyleAttributes* pParentStyle = 
pStyles->getCssStyleOrParentStyle();
 
                     while(pParentStyle && !bFillSet)
                     {
                         bFillSet = pParentStyle->isFillSet();
-                        pParentStyle = pParentStyle->getParentStyle();
+                        pParentStyle = 
pParentStyle->getCssStyleOrParentStyle();
                     }
 
                     if(bFillSet)

Reply via email to