diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-08-30 16:21:52 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-01 10:19:28 +0000 |
commit | 5811f80ca2b7a34acd43137b649fd7b362dc0048 (patch) | |
tree | c2f638478b7727c8ccbd50852e86ddc477bfbb74 | |
parent | 056b394ae241c66fed6ff12a3ed086372a2870b1 (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/28514
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 1e8810b5953f..8e569d5d7d08 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -1986,14 +1986,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; } |