summaryrefslogtreecommitdiff
path: root/svgio/source/svgreader/svgsvgnode.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-07-25 15:38:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-07-26 14:51:33 +0100
commit0347e5c77d281e4a25f79660aafb625691c4f883 (patch)
tree1878ccaa3f4fb7dcf878566ccc672912d11863dc /svgio/source/svgreader/svgsvgnode.cxx
parente5dd2e8826433566e223d0572ed73f21d0b992f1 (diff)
Related: #i125293# Further corrections for CssStyle handling in SVG importer
(cherry picked from commit f00d6d2ea3e73e687edb1da4c32c0960eaf5010b) Conflicts: svgio/source/svgreader/svgnode.cxx svgio/source/svgreader/svgstyleattributes.cxx svgio/source/svgreader/svgstylenode.cxx svgio/source/svgreader/svgsvgnode.cxx Change-Id: I335b292fcdf1ebac925c9fd76ad624efb923447d
Diffstat (limited to 'svgio/source/svgreader/svgsvgnode.cxx')
-rw-r--r--svgio/source/svgreader/svgsvgnode.cxx21
1 files changed, 18 insertions, 3 deletions
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
index 6c39cc996c31..d6d2a8379573 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -69,8 +69,23 @@ namespace svgio
if(pStyles && pStyles->getParentStyle())
{
- // #i125258# no initial values when SVG has a parent style (probably CssStyle)
- bSetInitialValues = false;
+ // SVG has a parent style (probably CssStyle), check if fill is set there anywhere
+ // already. If yes, do not set the default fill (black)
+ bool bFillSet(false);
+ const SvgStyleAttributes* pParentStyle = pStyles->getParentStyle();
+
+ while(pParentStyle && !bFillSet)
+ {
+ bFillSet = pParentStyle->isFillSet();
+ pParentStyle = pParentStyle->getParentStyle();
+ }
+
+ if(bFillSet)
+ {
+ // #125258# no initial values when SVG has a parent style at which a fill
+ // is already set
+ bSetInitialValues = false;
+ }
}
}
@@ -113,7 +128,7 @@ namespace svgio
{
case SVGTokenStyle:
{
- maSvgStyleAttributes.readStyle(aContent);
+ readLocalCssStyle(aContent);
break;
}
case SVGTokenViewBox: