diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-08-30 16:21:52 +0200 |
---|---|---|
committer | Xisco Faulí <anistenis@gmail.com> | 2016-08-30 20:41:07 +0000 |
commit | 75003438e4b429ffb3f013afd0e36d70545833cc (patch) | |
tree | eb7f37eb073dec962fa6c326b090d4967839c001 /svgio/source | |
parent | 93d7fc90b57bb08052299c94fa0a28bb8f494a9c (diff) |
tdf#101237 SVGIO: Use black as default when parents' fill...
...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 <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
Diffstat (limited to 'svgio/source')
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 24 |
1 files changed, 18 insertions, 6 deletions
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; } |