diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-07-10 14:10:01 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-07-10 16:53:58 +0200 |
commit | 3d5b5914ef56395a8ba3d4c0a2eff8a5c52046b4 (patch) | |
tree | fd4b8f4ea6b6aaa17b04102ffa2bcd75a32990e2 /svgio/source | |
parent | 7019eef453954785ad039bebd8c8a00183992584 (diff) |
tdf#156201: just check one level up in the style stack
Otherwise, the parent might also have a local css style
Change-Id: Ib6d1340045f22861aee3e526d22d014eeb2f5d38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154248
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio/source')
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 12766fde7986..91c27aeff637 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -1291,7 +1291,7 @@ namespace svgio::svgreader maClipRule(FillRule::notset), maBaselineShift(BaselineShift::Baseline), maBaselineShiftNumber(0), - maResolvingParent(33, 0), + maResolvingParent(30, 0), mbIsClipPathContent(SVGToken::ClipPathNode == mrOwner.getType()), mbStrokeDasharraySet(false) { @@ -2376,11 +2376,11 @@ namespace svgio::svgreader const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); - if (pSvgStyleAttributes && maResolvingParent[31] < nStyleDepthLimit) + if (pSvgStyleAttributes && maResolvingParent[25] < nStyleDepthLimit) { - ++maResolvingParent[31]; + ++maResolvingParent[25]; auto ret = pSvgStyleAttributes->getClipRule(); - --maResolvingParent[31]; + --maResolvingParent[25]; return ret; } @@ -2865,12 +2865,9 @@ namespace svgio::svgreader { const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); - if (pSvgStyleAttributes && maResolvingParent[30] < nStyleDepthLimit) + if (pSvgStyleAttributes) { - ++maResolvingParent[30]; - auto ret = pSvgStyleAttributes->getClipPathXLink(); - --maResolvingParent[30]; - return ret; + return pSvgStyleAttributes->maClipPathXLink; } } @@ -2901,12 +2898,9 @@ namespace svgio::svgreader { const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); - if (pSvgStyleAttributes && maResolvingParent[32] < nStyleDepthLimit) + if (pSvgStyleAttributes) { - ++maResolvingParent[32]; - auto ret = pSvgStyleAttributes->getFilterXLink(); - --maResolvingParent[32]; - return ret; + return pSvgStyleAttributes->maFilterXLink; } } @@ -2937,12 +2931,9 @@ namespace svgio::svgreader { const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); - if (pSvgStyleAttributes && maResolvingParent[25] < nStyleDepthLimit) + if (pSvgStyleAttributes) { - ++maResolvingParent[25]; - auto ret = pSvgStyleAttributes->getMaskXLink(); - --maResolvingParent[25]; - return ret; + return pSvgStyleAttributes->maMaskXLink; } } |