summaryrefslogtreecommitdiff
path: root/svgio/source
diff options
context:
space:
mode:
Diffstat (limited to 'svgio/source')
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx42
-rw-r--r--svgio/source/svgreader/svgusenode.cxx18
2 files changed, 35 insertions, 25 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index d9a0bf3cef86..189a1879799a 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -2866,7 +2866,9 @@ namespace svgio::svgreader
return maClipPathXLink;
}
- if(getCssStyleParent())
+ // This is called from add_postProcess so only check the parent style
+ // if it has a local css style, because it's the first in the stack
+ if(mrOwner.hasLocalCssStyle())
{
const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
@@ -2904,14 +2906,19 @@ namespace svgio::svgreader
return maFilterXLink;
}
- const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
-
- if (pSvgStyleAttributes && maResolvingParent[32] < nStyleDepthLimit)
+ // This is called from add_postProcess so only check the parent style
+ // if it has a local css style, because it's the first in the stack
+ if(mrOwner.hasLocalCssStyle())
{
- ++maResolvingParent[32];
- auto ret = pSvgStyleAttributes->getFilterXLink();
- --maResolvingParent[32];
- return ret;
+ const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+ if (pSvgStyleAttributes && maResolvingParent[32] < nStyleDepthLimit)
+ {
+ ++maResolvingParent[32];
+ auto ret = pSvgStyleAttributes->getFilterXLink();
+ --maResolvingParent[32];
+ return ret;
+ }
}
return OUString();
@@ -2939,14 +2946,19 @@ namespace svgio::svgreader
return maMaskXLink;
}
- const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
-
- if (pSvgStyleAttributes && maResolvingParent[25] < nStyleDepthLimit)
+ // This is called from add_postProcess so only check the parent style
+ // if it has a local css style, because it's the first in the stack
+ if(mrOwner.hasLocalCssStyle())
{
- ++maResolvingParent[25];
- auto ret = pSvgStyleAttributes->getMaskXLink();
- --maResolvingParent[25];
- return ret;
+ const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+ if (pSvgStyleAttributes && maResolvingParent[25] < nStyleDepthLimit)
+ {
+ ++maResolvingParent[25];
+ auto ret = pSvgStyleAttributes->getMaskXLink();
+ --maResolvingParent[25];
+ return ret;
+ }
}
return OUString();
diff --git a/svgio/source/svgreader/svgusenode.cxx b/svgio/source/svgreader/svgusenode.cxx
index 66f9d1a551a0..185dc4f919a0 100644
--- a/svgio/source/svgreader/svgusenode.cxx
+++ b/svgio/source/svgreader/svgusenode.cxx
@@ -163,18 +163,16 @@ namespace svgio::svgreader
aTransform = *getTransform() * aTransform;
}
- if(!aTransform.isIdentity())
- {
- const drawinglayer::primitive2d::Primitive2DReference xRef(
- new drawinglayer::primitive2d::TransformPrimitive2D(
- aTransform,
- std::move(aNewTarget)));
+ const SvgStyleAttributes* pStyle = getSvgStyleAttributes();
- rTarget.push_back(xRef);
- }
- else
+ if(pStyle)
{
- rTarget.append(aNewTarget);
+ const double fOpacity(pStyle->getOpacity().getNumber());
+
+ if(fOpacity > 0.0 && Display::None != getDisplay())
+ {
+ pStyle->add_postProcess(rTarget, std::move(aNewTarget), aTransform, false);
+ }
}
}