diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:03:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:09:28 +0000 |
commit | 97ac77f067910fa5e8206d75160fa63546a9358d (patch) | |
tree | e6fa64b43e8150ef65578afa4f1f40f3e19f7fa3 /svgio/source/svgreader/svgstyleattributes.cxx | |
parent | Releasing progress-linux version 4:24.2.2-3~progress7.99u1. (diff) | |
download | libreoffice-97ac77f067910fa5e8206d75160fa63546a9358d.tar.xz libreoffice-97ac77f067910fa5e8206d75160fa63546a9358d.zip |
Merging upstream version 4:24.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'svgio/source/svgreader/svgstyleattributes.cxx')
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 19070989bb..58bdb9add8 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -1287,18 +1287,9 @@ namespace svgio::svgreader maBaselineShift(BaselineShift::Baseline), maBaselineShiftNumber(0), maDominantBaseline(DominantBaseline::Auto), - maResolvingParent(31, 0), - mbIsClipPathContent(SVGToken::ClipPathNode == mrOwner.getType()), + maResolvingParent(32, 0), mbStrokeDasharraySet(false) { - const SvgStyleAttributes* pParentStyle = getParentStyle(); - if(!mbIsClipPathContent) - { - if(pParentStyle) - { - mbIsClipPathContent = pParentStyle->mbIsClipPathContent; - } - } } SvgStyleAttributes::~SvgStyleAttributes() @@ -2005,10 +1996,27 @@ namespace svgio::svgreader } } + bool SvgStyleAttributes::isClipPathContent() const + { + if (SVGToken::ClipPathNode == mrOwner.getType()) + return true; + + const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); + if (pSvgStyleAttributes && maResolvingParent[31] < nStyleDepthLimit) + { + ++maResolvingParent[31]; + bool ret = pSvgStyleAttributes->isClipPathContent(); + --maResolvingParent[31]; + return ret; + } + + return false; + } + // #i125258# ask if fill is a direct hard attribute (no hierarchy) bool SvgStyleAttributes::isFillSet() const { - if(mbIsClipPathContent) + if(isClipPathContent()) { return false; } @@ -2042,7 +2050,7 @@ namespace svgio::svgreader { return &maFill.getBColor(); } - else if(mbIsClipPathContent) + else if(isClipPathContent()) { const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); @@ -2066,7 +2074,7 @@ namespace svgio::svgreader const basegfx::BColor* pFill = pSvgStyleAttributes->getFill(); --maResolvingParent[0]; - if(mbIsClipPathContent) + if(isClipPathContent()) { if (pFill) { @@ -2269,7 +2277,7 @@ namespace svgio::svgreader return ret; } - if(mbIsClipPathContent) + if(isClipPathContent()) { return SvgNumber(0.0); } |