diff options
Diffstat (limited to 'svgio/source/svgreader/svgsvgnode.cxx')
-rw-r--r-- | svgio/source/svgreader/svgsvgnode.cxx | 21 |
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: |