summaryrefslogtreecommitdiffstats
path: root/svgio/source
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-03-26 16:23:23 +0100
committerXisco FaulĂ­ <anistenis@gmail.com>2016-03-26 16:20:47 +0000
commitc2d130425cc876cceb96cc7e47636426a9e48fa8 (patch)
treed5de2a66b56872410c23c539b3720f919e8c9b4d /svgio/source
parentno need to iterate through all cells (diff)
downloadcore-c2d130425cc876cceb96cc7e47636426a9e48fa8.tar.gz
core-c2d130425cc876cceb96cc7e47636426a9e48fa8.zip
SVGIO: Shapes within a clippath element might inherit...
... fill, stroke, stroke-width and others attributes from parent element, like use element Change-Id: I911bc50409428e81135b81e6dfc82acd1c21d113 Reviewed-on: https://gerrit.libreoffice.org/23527 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Xisco FaulĂ­ <anistenis@gmail.com>
Diffstat (limited to 'svgio/source')
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx62
1 files changed, 62 insertions, 0 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index b60d84b4077b..6b768f000408 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1956,6 +1956,13 @@ namespace svgio
{
if(mbIsClipPathContent)
{
+ const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+ if(pSvgStyleAttributes)
+ {
+ return pSvgStyleAttributes->getFill();
+ }
+
static basegfx::BColor aBlack(0.0, 0.0, 0.0);
return &aBlack;
}
@@ -1999,6 +2006,13 @@ namespace svgio
{
if(mbIsClipPathContent)
{
+ const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+ if(pSvgStyleAttributes)
+ {
+ return pSvgStyleAttributes->getStroke();
+ }
+
return nullptr;
}
else if(maStroke.isSet())
@@ -2041,6 +2055,13 @@ namespace svgio
{
if(mbIsClipPathContent)
{
+ const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+ if(pSvgStyleAttributes)
+ {
+ return pSvgStyleAttributes->getSvgGradientNodeFill();
+ }
+
return nullptr;
}
else if(mpSvgGradientNodeFill)
@@ -2064,6 +2085,13 @@ namespace svgio
{
if(mbIsClipPathContent)
{
+ const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+ if(pSvgStyleAttributes)
+ {
+ return pSvgStyleAttributes->getSvgGradientNodeStroke();
+ }
+
return nullptr;
}
else if(mpSvgGradientNodeStroke)
@@ -2087,6 +2115,13 @@ namespace svgio
{
if(mbIsClipPathContent)
{
+ const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+ if(pSvgStyleAttributes)
+ {
+ return pSvgStyleAttributes->getSvgPatternNodeFill();
+ }
+
return nullptr;
}
else if(mpSvgPatternNodeFill)
@@ -2110,6 +2145,13 @@ namespace svgio
{
if(mbIsClipPathContent)
{
+ const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+ if(pSvgStyleAttributes)
+ {
+ return pSvgStyleAttributes->getSvgPatternNodeStroke();
+ }
+
return nullptr;
}
else if(mpSvgPatternNodeStroke)
@@ -2133,6 +2175,13 @@ namespace svgio
{
if(mbIsClipPathContent)
{
+ const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+ if(pSvgStyleAttributes)
+ {
+ return pSvgStyleAttributes->getStrokeWidth();
+ }
+
return SvgNumber(0.0);
}
else if(maStrokeWidth.isSet())
@@ -2166,6 +2215,13 @@ namespace svgio
{
if(mbIsClipPathContent)
{
+ const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+ if(pSvgStyleAttributes)
+ {
+ return pSvgStyleAttributes->getFillOpacity();
+ }
+
return SvgNumber(1.0);
}
else if(maFillOpacity.isSet())
@@ -2188,6 +2244,12 @@ namespace svgio
{
if(mbIsClipPathContent)
{
+ const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+ if(pSvgStyleAttributes)
+ {
+ return pSvgStyleAttributes->getOpacity();
+ }
return SvgNumber(1.0);
}
else if(maOpacity.isSet())