summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorBrennan Vincent <brennanv@email.arizona.edu>2012-05-29 19:17:51 -0700
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-05-30 09:48:07 +0200
commit6c1107ad8fd6375ed02906e8700c24b471df2d97 (patch)
tree4ce13f89d92d1169aecc099b63e5b37458c85df3 /writerperfect
parent3784063afcc344273821503694467100d3913d2d (diff)
Handle opacity in gradients
Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch>
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/filter/OdgGenerator.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index da6d64dd23cf..970438998d25 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -1347,16 +1347,27 @@ void OdgGeneratorPrivate::_writeGraphicsStyle()
if (mxStyle["svg:cy"])
pDrawGradientElement->addAttribute("draw:cy", mxStyle["svg:cy"]->getStr());
if (mxGradient[1]["svg:stop-opacity"])
- pDrawGradientElement->addAttribute("draw:start-intensity", mxGradient[1]["svg:stop-opacity"]->getStr());
+ {
+ pDrawOpacityElement->addAttribute("draw:start", mxGradient[1]["svg:stop-opacity"]->getStr());
+ bUseOpacityGradient = true;
+ }
else
- pDrawGradientElement->addAttribute("draw:start-intensity", "100%");
+ pDrawOpacityElement->addAttribute("draw:start", "100%");
if (mxGradient[0]["svg:stop-opacity"])
- pDrawGradientElement->addAttribute("draw:end-intensity", mxGradient[0]["svg:stop-opacity"]->getStr());
+ {
+ pDrawOpacityElement->addAttribute("draw:end", mxGradient[0]["svg:stop-opacity"]->getStr());
+ bUseOpacityGradient = true;
+ }
else
- pDrawGradientElement->addAttribute("draw:end-intensity", "100%");
+ pDrawOpacityElement->addAttribute("draw:end", "100%");
pDrawGradientElement->addAttribute("draw:border", "0%");
mGraphicsGradientStyles.push_back(pDrawGradientElement);
mGraphicsGradientStyles.push_back(new TagCloseElement("draw:gradient"));
+ if (bUseOpacityGradient)
+ {
+ mGraphicsGradientStyles.push_back(pDrawOpacityElement);
+ mGraphicsGradientStyles.push_back(new TagCloseElement("draw:opacity"));
+ }
}
if(!bUseOpacityGradient)