[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - writerperfect/source

Fridrich Strba fridrich at kemper.freedesktop.org
Thu Jan 12 06:41:49 PST 2012


 writerperfect/source/filter/OdgGenerator.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 5d097dfb44ab1d7a41000b8be2ff2ee680de94f9
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Thu Jan 12 15:01:13 2012 +0100

    Logical error in writerperfect
    
    Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>

diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 584e8cc..fbafb02 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -948,7 +948,7 @@ void OdgGenerator::drawPath(const WPXPropertyListVector &path)
 
 void OdgGenerator::drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData)
 {
-    if (!propList["libwpg:mime-type"] && propList["libwpg:mime-type"]->getStr().len() <= 0)
+    if (!propList["libwpg:mime-type"] || propList["libwpg:mime-type"]->getStr().len() <= 0)
         return;
 
     mpImpl->_writeGraphicsStyle();
commit 8d5d687354bb470033ed9ab63d8875bc4e34c096
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Thu Jan 12 12:15:29 2012 +0100

    Consider the style:mirror property
    
    Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>

diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 4d70f8d..584e8cc 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -950,10 +950,16 @@ void OdgGenerator::drawGraphicObject(const ::WPXPropertyList &propList, const ::
 {
     if (!propList["libwpg:mime-type"] && propList["libwpg:mime-type"]->getStr().len() <= 0)
         return;
+
+    mpImpl->_writeGraphicsStyle();
+
     TagOpenElement *pDrawFrameElement = new TagOpenElement("draw:frame");
 
 
     WPXString sValue;
+    sValue.sprintf("gr%i", mpImpl->miGraphicsStyleIndex-1);
+    pDrawFrameElement->addAttribute("draw:style-name", sValue);
+
     if (propList["svg:x"])
         pDrawFrameElement->addAttribute("svg:x", propList["svg:x"]->getStr());
     if (propList["svg:y"])
@@ -1280,6 +1286,8 @@ void OdgGeneratorPrivate::_writeGraphicsStyle()
         else
             pStyleGraphicsPropertiesElement->addAttribute("draw:marker-end-width", "0.118in");
     }
+    if (mxStyle["style:mirror"])
+        pStyleGraphicsPropertiesElement->addAttribute("style:mirror", mxStyle["style:mirror"]->getStr());
 
     mGraphicsAutomaticStyles.push_back(pStyleGraphicsPropertiesElement);
     mGraphicsAutomaticStyles.push_back(new TagCloseElement("style:graphic-properties"));


More information about the Libreoffice-commits mailing list