[Libreoffice-commits] .: writerperfect/source

Fridrich Strba fridrich at kemper.freedesktop.org
Fri Jul 22 05:04:29 PDT 2011


 writerperfect/source/filter/OdgGenerator.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 7e9651c3471fa2dafdbf8abfbbf55c01d253d26c
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Fri Jul 22 13:35:41 2011 +0200

    Add shadow support

diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 45facff..159ef49 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -1109,8 +1109,22 @@ void OdgGeneratorPrivate::_writeGraphicsStyle()
     if(mxStyle["draw:fill"] && mxStyle["draw:fill"]->getStr() == "none")
         pStyleGraphicsPropertiesElement->addAttribute("draw:fill", "none");
     else
+    {
+        if (mxStyle["draw:shadow"])
+            pStyleGraphicsPropertiesElement->addAttribute("draw:shadow", mxStyle["draw:shadow"]->getStr());
+        else
+            pStyleGraphicsPropertiesElement->addAttribute("draw:shadow", "hidden");
+        if (mxStyle["draw:shadow-offset-x"])
+            pStyleGraphicsPropertiesElement->addAttribute("draw:shadow-offset-x", mxStyle["draw:shadow-offset-x"]->getStr());
+        if (mxStyle["draw:shadow-offset-y"])
+            pStyleGraphicsPropertiesElement->addAttribute("draw:shadow-offset-y", mxStyle["draw:shadow-offset-y"]->getStr());
+        if (mxStyle["draw:shadow-color"])
+            pStyleGraphicsPropertiesElement->addAttribute("draw:shadow-color", mxStyle["draw:shadow-color"]->getStr());
+        if (mxStyle["draw:shadow-opacity"])
+            pStyleGraphicsPropertiesElement->addAttribute("draw:shadow-opacity", mxStyle["draw:shadow-opacity"]->getStr());
       if (mxStyle["svg:fill-rule"])
         pStyleGraphicsPropertiesElement->addAttribute("svg:fill-rule", mxStyle["svg:fill-rule"]->getStr());
+    }
 
     if(mxStyle["draw:fill"] && mxStyle["draw:fill"]->getStr() == "solid")
     {


More information about the Libreoffice-commits mailing list