diff options
Diffstat (limited to 'svgio/source/svgreader/svgstyleattributes.cxx')
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index e733396b3dcd..f3eec06f3ebe 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -1211,7 +1211,7 @@ namespace svgio maTextAnchor(TextAnchor_notset), maColor(), maOpacity(), - maVisibility(Visibility_visible), + maVisibility(Visibility_notset), maTitle(), maDesc(), maClipPathXLink(), @@ -1237,10 +1237,6 @@ namespace svgio mbIsClipPathContent = pParentStyle->mbIsClipPathContent; } } - if(pParentStyle) - { - maVisibility = pParentStyle->maVisibility; - } } SvgStyleAttributes::~SvgStyleAttributes() @@ -2185,6 +2181,23 @@ namespace svgio return SvgNumber(1.0); } + Visibility SvgStyleAttributes::getVisibility() const + { + if(Visibility_notset == maVisibility || Visibility_inherit == maVisibility) + { + const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); + + if(pSvgStyleAttributes) + { + return pSvgStyleAttributes->getVisibility(); + } + //default is Visible + return Visibility_visible; + } + + return maVisibility; + } + FillRule SvgStyleAttributes::getFillRule() const { if(FillRule_notset != maFillRule) |