diff options
author | Paul Trojahn <paul.trojahn@gmail.com> | 2017-06-24 13:46:46 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-06-26 03:28:01 +0200 |
commit | 643da8ec4e721d33dfdf8d78bedd50a915f1188d (patch) | |
tree | 70b30459c0fa8d7d9287eb5c9c393e1bfac5cd56 | |
parent | 55d4cc340068b0f590ab3a2119a2a2a71a3f8e5e (diff) |
Fix PageShape export to pptx
The export code is not called, because the PageShape is actually
of type presentation.PageShape and not drawing.PageShape. A
PageShape has no text at all, which results in an empty p:txBody
element that fails validation, so it needs to be checked first if
the shape actually has text.
Change-Id: I559f15c2396739c74d5c4f36eb952754bc040ce8
Reviewed-on: https://gerrit.libreoffice.org/38574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | oox/source/export/shapes.cxx | 3 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 810391e22623..4775b1bfb901 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1445,7 +1445,8 @@ ShapeExport& ShapeExport::WriteTextBox( const Reference< XInterface >& xIface, s } } - if( NonEmptyText( xIface ) ) + Reference< XText > xXText( xIface, UNO_QUERY ); + if( NonEmptyText( xIface ) && xXText.is() ) { FSHelperPtr pFS = GetFS(); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index b0e2b238008f..227291fb9dcc 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -302,7 +302,7 @@ ShapeExport& PowerPointShapeExport::WriteUnknownShape( const Reference< XShape > mrExport.EnterGroup( rXIndexAccess ); SAL_INFO("sd.eppt", "enter group"); } - else if ( sShapeType == "com.sun.star.drawing.PageShape" ) + else if ( sShapeType == "com.sun.star.presentation.PageShape" ) { WritePageShape( xShape, mePageType, mrExport.GetPresObj() ); } |