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

Paul Trojahn paul.trojahn at gmail.com
Mon Jun 26 01:28:22 UTC 2017


 oox/source/export/shapes.cxx             |    3 ++-
 sd/source/filter/eppt/pptx-epptooxml.cxx |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 643da8ec4e721d33dfdf8d78bedd50a915f1188d
Author: Paul Trojahn <paul.trojahn at gmail.com>
Date:   Sat Jun 24 13:46:46 2017 +0200

    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 at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

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() );
     }


More information about the Libreoffice-commits mailing list