[Libreoffice-commits] core.git: oox/source

Michael Meeks michael.meeks at suse.com
Thu May 2 03:24:31 PDT 2013


 oox/source/export/shapes.cxx |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 73740b2f75558eef73bf102c7209a90aaf3e7c2e
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Thu May 2 11:22:41 2013 +0100

    fdo#60549 - pptx export presentation as well as draw shape objects.
    
    Change-Id: Ibe6e0b9fa55bab7a7d02e55560c1db4c8ed84132

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index f26a527..dab14ce 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -822,11 +822,18 @@ void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, const
 
     if( NonEmptyText( xShape ) )
     {
-        WriteTextShape( xShape );
+        // avoid treating all 'IsPresentationObject' objects as having text.
+        Reference< XSimpleText > xText( xShape, UNO_QUERY );
 
-        //DBG(dump_pset(mXPropSet));
+        if( xText.is() && xText->getString().getLength() )
+        {
+            DBG(printf("graphicObject: wrote only text\n"));
 
-        return;
+            WriteTextShape( xShape );
+
+            //DBG(dump_pset(mXPropSet));
+            return;
+        }
     }
 
     DBG(printf("graphicObject without text\n"));
@@ -1124,6 +1131,12 @@ static const NameToConvertMapType& lcl_GetConverters()
     shape_converters[ "com.sun.star.drawing.OLE2Shape" ]                = &ShapeExport::WriteOLE2Shape;
     shape_converters[ "com.sun.star.drawing.TableShape" ]               = &ShapeExport::WriteTableShape;
     shape_converters[ "com.sun.star.drawing.TextShape" ]                = &ShapeExport::WriteTextShape;
+
+    shape_converters[ "com.sun.star.presentation.GraphicObjectShape" ]  = &ShapeExport::WriteGraphicObjectShape;
+    shape_converters[ "com.sun.star.presentation.OLE2Shape" ]           = &ShapeExport::WriteOLE2Shape;
+    shape_converters[ "com.sun.star.presentation.TableShape" ]          = &ShapeExport::WriteTableShape;
+    shape_converters[ "com.sun.star.presentation.TextShape" ]           = &ShapeExport::WriteTextShape;
+
     shape_converters[ "com.sun.star.presentation.DateTimeShape" ]       = &ShapeExport::WriteTextShape;
     shape_converters[ "com.sun.star.presentation.FooterShape" ]         = &ShapeExport::WriteTextShape;
     shape_converters[ "com.sun.star.presentation.HeaderShape" ]         = &ShapeExport::WriteTextShape;


More information about the Libreoffice-commits mailing list