From 75003438e4b429ffb3f013afd0e36d70545833cc Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Tue, 30 Aug 2016 16:21:52 +0200 Subject: tdf#101237 SVGIO: Use black as default when parents' fill... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...attributes are empty or none and there's a reference to a clip-path present. Change-Id: I4dc4e3bcaac43a007fbdb8a1d006cbd39c737396 Reviewed-on: https://gerrit.libreoffice.org/28500 Tested-by: Jenkins Reviewed-by: Xisco FaulĂ­ --- svgio/source/svgreader/svgstyleattributes.cxx | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'svgio/source') diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 9fc8b236652f..cc66af5a5dec 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -2007,14 +2007,26 @@ namespace svgio if(pSvgStyleAttributes) { - return pSvgStyleAttributes->getFill(); + const basegfx::BColor* pFill = pSvgStyleAttributes->getFill(); + + if(mbIsClipPathContent) + { + if (pFill) + { + return pFill; + } + else + { + static basegfx::BColor aBlack(0.0, 0.0, 0.0); + return &aBlack; + } + } + else + { + return pFill; + } } } - else if(mbIsClipPathContent) - { - static basegfx::BColor aBlack(0.0, 0.0, 0.0); - return &aBlack; - } return nullptr; } -- cgit