[Libreoffice-commits] core.git: svgio/source

Xisco Fauli anistenis at gmail.com
Wed Mar 30 08:43:27 UTC 2016


 svgio/source/svgreader/svgstyleattributes.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 2c29716d349353997bf7cdde63cd9f867c5baeb6
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Wed Mar 30 01:52:32 2016 +0200

    tdf#97657: SVGIO: Don't iterate over parent's clip-paths...
    
    ... when it's a clip-path content
    
    Change-Id: I222b429a61409d9670b9d60357895542a15afc15
    Reviewed-on: https://gerrit.libreoffice.org/23624
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Xisco FaulĂ­ <anistenis at gmail.com>

diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index e04999d..36b4e30 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));
                 }
             }
 


More information about the Libreoffice-commits mailing list