diff options
author | Armin Le Grand <alg@apache.org> | 2012-10-30 14:05:53 +0000 |
---|---|---|
committer | Xisco Fauli <anistenis@gmail.com> | 2013-04-14 17:52:33 +0200 |
commit | bc589d57f083279b6d619904b937fae706ece493 (patch) | |
tree | 85bfcfb91e6fb2be16c81276cca705005bd7bef1 /svgio/source | |
parent | f75ca1fdad1094fbea4bb6cb0e3cc9458700c470 (diff) |
#121221# added boolean state to remember when the StrokeDasharray was set to empty by purpose
Diffstat (limited to 'svgio/source')
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index aa672a61a35a..0787490c2e06 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -1156,7 +1156,8 @@ namespace svgio mpMarkerEndXLink(0), maFillRule(FillRule_notset), maClipRule(FillRule_nonzero), - mbIsClipPathContent(SVGTokenClipPathNode == mrOwner.getType()) + mbIsClipPathContent(SVGTokenClipPathNode == mrOwner.getType()), + mbStrokeDasharraySet(false) { if(!mbIsClipPathContent) { @@ -1263,9 +1264,18 @@ namespace svgio { if(aContent.getLength()) { + static rtl::OUString aStrNone(rtl::OUString::createFromAscii("none")); SvgNumberVector aVector; - if(readSvgNumberVector(aContent, aVector)) + if(aContent.match(aStrNone)) + { + // #121221# The special value 'none' needs to be handled + // in the sense that *when* it is set, the parent shall not + // be used. Before this was only dependent on the array being + // empty + setStrokeDasharraySet(true); + } + else if(readSvgNumberVector(aContent, aVector)) { setStrokeDasharray(aVector); } @@ -2020,6 +2030,11 @@ namespace svgio { return maStrokeDasharray; } + else if(getStrokeDasharraySet()) + { + // #121221# is set to empty *by purpose*, do not visit parent styles + return maStrokeDasharray; + } const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); |