summaryrefslogtreecommitdiffstats
path: root/svgio/source/svgreader/svgstyleattributes.cxx
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-02-06 17:04:41 +0100
committerjan iversen <jani@documentfoundation.org>2016-03-15 15:56:02 +0000
commita27ba3413a6ee46451041ccdfefb4f75913adf01 (patch)
tree72e9eafefed5df5b49e58a57e6395a2352606bcc /svgio/source/svgreader/svgstyleattributes.cxx
parenttdf#97978: add support for opening mde and accde files in base (diff)
downloadcore-a27ba3413a6ee46451041ccdfefb4f75913adf01.tar.gz
core-a27ba3413a6ee46451041ccdfefb4f75913adf01.zip
tdf#97543 SVGIO: Rework getVisibility()
Change-Id: Idb3eaa27e3e8ec177ebd2bad81f53c4d3da9d241 Reviewed-on: https://gerrit.libreoffice.org/22169 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit 842313c23ec96aeb99b68f28e7d48cc9e263a0a8) Reviewed-on: https://gerrit.libreoffice.org/22198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'svgio/source/svgreader/svgstyleattributes.cxx')
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx23
1 files changed, 18 insertions, 5 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 5d557ac10a02..765f8f8599cf 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1216,7 +1216,7 @@ namespace svgio
maTextAnchor(TextAnchor_notset),
maColor(),
maOpacity(),
- maVisibility(Visibility_visible),
+ maVisibility(Visibility_notset),
maTitle(),
maDesc(),
maClipPathXLink(),
@@ -1242,10 +1242,6 @@ namespace svgio
mbIsClipPathContent = pParentStyle->mbIsClipPathContent;
}
}
- if(pParentStyle)
- {
- maVisibility = pParentStyle->maVisibility;
- }
}
SvgStyleAttributes::~SvgStyleAttributes()
@@ -2144,6 +2140,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)