summaryrefslogtreecommitdiff
path: root/svgio/source/svgreader/svgstyleattributes.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-07-16 09:42:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-07-16 11:40:58 +0100
commit0879a639bc7c734f0847f74b965809f9107b3195 (patch)
tree94501e749cdfe270b1b20302fa3bbc79535586c3 /svgio/source/svgreader/svgstyleattributes.cxx
parent3a1abb6804c0012718e11dab15d4f35acdef243a (diff)
Resolves: #i125258# reworked some of the style hierarchy stuff
(cherry picked from commit 3b13e15a7174f5177700fdcd4864b64fbf0b3535) Conflicts: svgio/inc/svgio/svgreader/svgstylenode.hxx svgio/source/svgreader/svggnode.cxx svgio/source/svgreader/svgstyleattributes.cxx svgio/source/svgreader/svgstylenode.cxx svgio/source/svgreader/svgsvgnode.cxx Change-Id: I5cfe6871ab235305f206d83d643884b493901dfe
Diffstat (limited to 'svgio/source/svgreader/svgstyleattributes.cxx')
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx22
1 files changed, 19 insertions, 3 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 1051e46f4423..cc9d40cfb16e 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -205,9 +205,10 @@ namespace svgio
{
const SvgStyleAttributes* pParentStyle = getCssStyleParent();
- // no parent style set, check parent for its style attributes
- if(pParentStyle == NULL && mrOwner.getParent() != NULL)
- pParentStyle = mrOwner.getParent()->getSvgStyleAttributes();
+ if(mrOwner.supportsParentStyle() && mrOwner.getParent())
+ {
+ return mrOwner.getParent()->getSvgStyleAttributes();
+ }
if (pParentStyle != this) // to prevent infinite loop
return pParentStyle;
@@ -1808,6 +1809,21 @@ namespace svgio
}
}
+ // #i125258# ask if fill is a direct hard attribute (no hierarchy)
+ bool SvgStyleAttributes::isFillSet() const
+ {
+ if(mbIsClipPathContent)
+ {
+ return false;
+ }
+ else if(maFill.isSet())
+ {
+ return true;
+ }
+
+ return false;
+ }
+
const basegfx::BColor* SvgStyleAttributes::getFill() const
{
if(mbIsClipPathContent)