Pass rgb/contrast/brightness filters through writerperfect to ODG

Change-Id: I2881e1b3439e52c1008d9d50d00c897ddc81071f
This commit is contained in:
Brennan Vincent 2012-08-06 12:08:52 -07:00
parent 548a2ffe3a
commit 1386ccc8ed

View File

@ -1084,6 +1084,21 @@ void OdgGenerator::drawGraphicObject(const ::WPXPropertyList &propList, const ::
mpImpl->mxStyle.insert("style:mirror", "horizontal"); mpImpl->mxStyle.insert("style:mirror", "horizontal");
else else
mpImpl->mxStyle.insert("style:mirror", "none"); 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(); mpImpl->_writeGraphicsStyle();
@ -1380,6 +1395,21 @@ void OdgGeneratorPrivate::_writeGraphicsStyle()
TagOpenElement *pStyleGraphicsPropertiesElement = new TagOpenElement("style:graphic-properties"); 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") if (mxStyle["draw:stroke"] && mxStyle["draw:stroke"]->getStr() == "none")
pStyleGraphicsPropertiesElement->addAttribute("draw:stroke", "none"); pStyleGraphicsPropertiesElement->addAttribute("draw:stroke", "none");
else else