summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrennan Vincent <brennanv@email.arizona.edu>2012-08-06 12:08:52 -0700
committerBrennan Vincent <brennanv@email.arizona.edu>2012-08-07 09:45:22 -0700
commit1386ccc8edf467d69ebb4a06ea5f55940cf4024f (patch)
treef9d3787739435814269d982408c1e5eaa0855c13
parent548a2ffe3a40852d7bb3b2880b58e93c34cd41ef (diff)
Pass rgb/contrast/brightness filters through writerperfect to ODG
Change-Id: I2881e1b3439e52c1008d9d50d00c897ddc81071f
-rw-r--r--writerperfect/source/filter/OdgGenerator.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 1d333c7c9153..f873343b5512 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -1084,6 +1084,21 @@ void OdgGenerator::drawGraphicObject(const ::WPXPropertyList &propList, const ::
mpImpl->mxStyle.insert("style:mirror", "horizontal");
else
mpImpl->mxStyle.insert("style:mirror", "none");
+ if (propList["draw:color-mode"])
+ mpImpl->mxStyle.insert("draw:color-mode", propList["draw:color-mode"]->getStr());
+ if (propList["draw:luminance"])
+ mpImpl->mxStyle.insert("draw:luminance", propList["draw:luminance"]->getStr());
+ if (propList["draw:contrast"])
+ mpImpl->mxStyle.insert("draw:contrast", propList["draw:contrast"]->getStr());
+ if (propList["draw:gamma"])
+ mpImpl->mxStyle.insert("draw:gamma", propList["draw:gamma"]->getStr());
+ if (propList["draw:red"])
+ mpImpl->mxStyle.insert("draw:red", propList["draw:red"]->getStr());
+ if (propList["draw:green"])
+ mpImpl->mxStyle.insert("draw:green", propList["draw:green"]->getStr());
+ if (propList["draw:blue"])
+ mpImpl->mxStyle.insert("draw:blue", propList["draw:blue"]->getStr());
+
mpImpl->_writeGraphicsStyle();
@@ -1380,6 +1395,21 @@ void OdgGeneratorPrivate::_writeGraphicsStyle()
TagOpenElement *pStyleGraphicsPropertiesElement = new TagOpenElement("style:graphic-properties");
+ if (mxStyle["draw:color-mode"] && mxStyle["draw:color-mode"]->getStr().len() > 0)
+ pStyleGraphicsPropertiesElement->addAttribute("draw:color-mode", mxStyle["draw:color-mode"]->getStr());
+ if (mxStyle["draw:luminance"] && mxStyle["draw:luminance"]->getStr().len() > 0)
+ pStyleGraphicsPropertiesElement->addAttribute("draw:luminance", mxStyle["draw:luminance"]->getStr());
+ if (mxStyle["draw:contrast"] && mxStyle["draw:contrast"]->getStr().len() > 0)
+ pStyleGraphicsPropertiesElement->addAttribute("draw:contrast", mxStyle["draw:contrast"]->getStr());
+ if (mxStyle["draw:gamma"] && mxStyle["draw:gamma"]->getStr().len() > 0)
+ pStyleGraphicsPropertiesElement->addAttribute("draw:gamma", mxStyle["draw:gamma"]->getStr());
+ if (mxStyle["draw:red"] && mxStyle["draw:red"]->getStr().len() > 0)
+ pStyleGraphicsPropertiesElement->addAttribute("draw:red", mxStyle["draw:red"]->getStr());
+ if (mxStyle["draw:green"] && mxStyle["draw:green"]->getStr().len() > 0)
+ pStyleGraphicsPropertiesElement->addAttribute("draw:green", mxStyle["draw:green"]->getStr());
+ if (mxStyle["draw:blue"] && mxStyle["draw:blue"]->getStr().len() > 0)
+ pStyleGraphicsPropertiesElement->addAttribute("draw:blue", mxStyle["draw:blue"]->getStr());
+
if (mxStyle["draw:stroke"] && mxStyle["draw:stroke"]->getStr() == "none")
pStyleGraphicsPropertiesElement->addAttribute("draw:stroke", "none");
else