From 2c29716d349353997bf7cdde63cd9f867c5baeb6 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Wed, 30 Mar 2016 01:52:32 +0200 Subject: tdf#97657: SVGIO: Don't iterate over parent's clip-paths... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... when it's a clip-path content Change-Id: I222b429a61409d9670b9d60357895542a15afc15 Reviewed-on: https://gerrit.libreoffice.org/23624 Tested-by: Jenkins Reviewed-by: Xisco FaulĂ­ --- svgio/source/svgreader/svgstyleattributes.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'svgio') diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index e04999d9f1e9..36b4e304e25c 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -2639,6 +2639,11 @@ namespace svgio OUString SvgStyleAttributes::getClipPathXLink() const { + if(mbIsClipPathContent) + { + return maClipPathXLink; + } + if(!maClipPathXLink.isEmpty()) { return maClipPathXLink; @@ -2662,7 +2667,7 @@ namespace svgio if(!aClipPath.isEmpty()) { - const_cast< SvgStyleAttributes* >(this)->mpClipPathXLink = dynamic_cast< const SvgClipPathNode* >(mrOwner.getDocument().findSvgNodeById(getClipPathXLink())); + const_cast< SvgStyleAttributes* >(this)->mpClipPathXLink = dynamic_cast< const SvgClipPathNode* >(mrOwner.getDocument().findSvgNodeById(aClipPath)); } } @@ -2694,7 +2699,7 @@ namespace svgio if(!aMask.isEmpty()) { - const_cast< SvgStyleAttributes* >(this)->mpMaskXLink = dynamic_cast< const SvgMaskNode* >(mrOwner.getDocument().findSvgNodeById(getMaskXLink())); + const_cast< SvgStyleAttributes* >(this)->mpMaskXLink = dynamic_cast< const SvgMaskNode* >(mrOwner.getDocument().findSvgNodeById(aMask)); } } -- cgit