diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:44:04 +0000 |
commit | eb358d77291eba677141bab113dc27d7aabb0f3e (patch) | |
tree | 2e96f3b5d0c79beaeb536bbf05c3b8564846e65f /svgio/source/svgreader/svgstyleattributes.cxx | |
parent | Adding debian version 4:24.2.1-4. (diff) | |
download | libreoffice-eb358d77291eba677141bab113dc27d7aabb0f3e.tar.xz libreoffice-eb358d77291eba677141bab113dc27d7aabb0f3e.zip |
Merging upstream version 4:24.2.2.
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 | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 731df59aee..19070989bb 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -850,7 +850,8 @@ namespace svgio::svgreader const basegfx::B2DRange aTargetRange(0.0, 0.0, fTargetWidth, fTargetHeight); const SvgAspectRatio& rRatio = rMarker.getSvgAspectRatio(); - if(rRatio.isSet()) + + if(rRatio.isSet() && Overflow::visible != rMarker.getSvgStyleAttributes()->getOverflow()) { // let mapping be created from SvgAspectRatio rMarkerTransform = rRatio.createMapping(aTargetRange, aPrimitiveRange); @@ -1279,6 +1280,7 @@ namespace svgio::svgreader maTextAlign(TextAlign::notset), maTextDecoration(TextDecoration::notset), maTextAnchor(TextAnchor::notset), + maOverflow(Overflow::notset), maVisibility(Visibility::notset), maFillRule(FillRule::notset), maClipRule(FillRule::notset), @@ -1822,6 +1824,21 @@ namespace svgio::svgreader } break; } + case SVGToken::Overflow: + { + if(!aContent.isEmpty()) + { + if(o3tl::equalsIgnoreAsciiCase(o3tl::trim(aContent), u"visible")) + { + setOverflow(Overflow::visible); + } + else if(o3tl::equalsIgnoreAsciiCase(o3tl::trim(aContent), u"hidden")) + { + setOverflow(Overflow::hidden); + } + } + break; + } case SVGToken::Visibility: { if(!aContent.isEmpty()) @@ -2316,6 +2333,25 @@ namespace svgio::svgreader return SvgNumber(1.0); } + Overflow SvgStyleAttributes::getOverflow() const + { + if(Overflow::notset != maOverflow) + { + return maOverflow; + } + + if(mrOwner.hasLocalCssStyle()) + { + const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); + if (pSvgStyleAttributes) + { + return pSvgStyleAttributes->getOverflow(); + } + } + + return Overflow::hidden; + } + Visibility SvgStyleAttributes::getVisibility() const { if(Visibility::notset == maVisibility || Visibility::inherit == maVisibility) |