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

Xisco Fauli anistenis at gmail.com
Wed Feb 17 07:05:37 UTC 2016


 svgio/inc/svgio/svgreader/svgstyleattributes.hxx |    2 +-
 svgio/source/svgreader/svgstyleattributes.cxx    |   17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 7b7ffedfa6357b902a5e354d986dac39a3b2f462
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Wed Feb 17 00:25:15 2016 +0100

    SVGIO: tdf#97539: clip-path elements might contain...
    
    reference to other clip-paths
    
    Change-Id: I0c426c892da2478293b78ea93db087d781275896
    Reviewed-on: https://gerrit.libreoffice.org/22411
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/svgio/inc/svgio/svgreader/svgstyleattributes.hxx b/svgio/inc/svgio/svgreader/svgstyleattributes.hxx
index 33258d5..011b5f3 100644
--- a/svgio/inc/svgio/svgreader/svgstyleattributes.hxx
+++ b/svgio/inc/svgio/svgreader/svgstyleattributes.hxx
@@ -441,7 +441,7 @@ namespace svgio
             void setDesc(const OUString& rNew) { maDesc = rNew; }
 
             // ClipPathXLink content
-            const OUString getClipPathXLink() const { return maClipPathXLink; }
+            OUString getClipPathXLink() const;
 
             // MaskXLink content
             const OUString getMaskXLink() const { return maMaskXLink; }
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 698f7e8..bf4f057 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -2648,6 +2648,23 @@ namespace svgio
             return nullptr;
         }
 
+        OUString SvgStyleAttributes::getClipPathXLink() const
+        {
+            if(!maClipPathXLink.isEmpty())
+            {
+                return maClipPathXLink;
+            }
+
+            const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+            if(pSvgStyleAttributes)
+            {
+                return pSvgStyleAttributes->getClipPathXLink();
+            }
+
+            return OUString();
+        }
+
         OUString SvgStyleAttributes::getMarkerStartXLink() const
         {
             if(!maMarkerStartXLink.isEmpty())


More information about the Libreoffice-commits mailing list