summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-02-17 00:25:15 +0100
committerNoel Grandin <noelgrandin@gmail.com>2016-02-17 07:05:10 +0000
commit7b7ffedfa6357b902a5e354d986dac39a3b2f462 (patch)
tree346adc5f35fde80079c2fa0834ce27ffd831b74f
parentdc9ec9f359ddc91a3aedbe38e6079b0555fb03f9 (diff)
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@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--svgio/inc/svgio/svgreader/svgstyleattributes.hxx2
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx17
2 files changed, 18 insertions, 1 deletions
diff --git a/svgio/inc/svgio/svgreader/svgstyleattributes.hxx b/svgio/inc/svgio/svgreader/svgstyleattributes.hxx
index 33258d5dde90..011b5f3bc98f 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 698f7e8ccd69..bf4f057480fd 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())