summaryrefslogtreecommitdiff
path: root/svx/source/xoutdev/xattr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/xoutdev/xattr.cxx')
-rw-r--r--svx/source/xoutdev/xattr.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 83e052231b58..1de52ad51ee5 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -2532,6 +2532,19 @@ boost::property_tree::ptree XFillFloatTransparenceItem::dumpAsJSON() const
boost::property_tree::ptree aTree = XFillGradientItem::dumpAsJSON();
aTree.put("commandName", ".uno:FillFloatTransparence");
+ if (!bEnabled)
+ {
+ boost::property_tree::ptree& rState = aTree.get_child("state");
+ // When gradient fill is disabled, the intensity fields contain the
+ // constant encoded percent-transparency. However we use that here to just
+ // distinguish between 'None' and 'Solid' types and correct the 'style'
+ // property appropriately.
+ if (GetGradientValue().GetStartIntens() == 100)
+ rState.put("style", "NONE");
+ else
+ rState.put("style", "SOLID");
+ }
+
return aTree;
}