summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-05-02 11:22:41 +0100
committerPetr Mladek <pmladek@suse.cz>2013-05-07 13:21:03 +0200
commitf187302463e76b4d253458d3fbbfafca1f9167de (patch)
tree030487ac21ebd5c5c9cce2c4014547eec1c0f710 /oox
parent5db719e55bbe4ef58de22f5ee510c59d555b0817 (diff)
fdo#60549 - pptx export presentation as well as draw shape objects.
Change-Id: Ibe6e0b9fa55bab7a7d02e55560c1db4c8ed84132 Signed-off-by: Muthu Subramanian <sumuthu@suse.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/shapes.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 87b8e5521899..af43620097c2 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -826,11 +826,18 @@ void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, Graph
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"));
@@ -1126,6 +1133,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;