writerperfect/source/filter/OdgGenerator.cxx | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
New commits: commit 1386ccc8edf467d69ebb4a06ea5f55940cf4024f Author: Brennan Vincent <brenn...@email.arizona.edu> Date: Mon Aug 6 12:08:52 2012 -0700 Pass rgb/contrast/brightness filters through writerperfect to ODG Change-Id: I2881e1b3439e52c1008d9d50d00c897ddc81071f diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx index 1d333c7..f873343 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits