oox/source/ppt/pptshape.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b430cc2c3fba0ef2e56a1eb8610681c66714ef80
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Fri Jul 28 12:16:36 2023 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Mon Aug 7 10:07:44 2023 +0200

    pptx: import ellipse shape correctly
    
    Preset geometry "ellipse" was ignored:
    <a:prstGeom prst="ellipse">
    
    Don't change service name to com.sun.star.presentation.OutlinerShape
    it should stay CustomShape to be correctly shown as an ellipse.
    
    Added next case: XML_body subtype in Layout and Slide mode.
    
    This is continuation for:
    commit 6df267780c4d41b41101c1be0a954b2f16ee8012
    tdf#132557: PPTX import: Workaround for slide footer shape presets
    
    Signed-off-by: Szymon Kłos <szymon.k...@collabora.com>
    Change-Id: Ifb914c58203a1ad533f9cc9b1857a48983354de6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155015
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Henry Castro <hcas...@collabora.com>
    (cherry picked from commit e63a9553c022a9976d59113938df068f9d2b5d6c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155233
    Tested-by: Jenkins

diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index a68ad18cf5b2..7b5b46546e3d 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -336,8 +336,10 @@ void PPTShape::addShape(
         // Need to use service name css.drawing.CustomShape if they have a non 
default shape.
         // This workaround has the drawback of them not really being processed 
as placeholders
         // so it is only done for slide footers...
-        if ((mnSubType == XML_sldNum || mnSubType == XML_dt || mnSubType == 
XML_ftr)
-            && meShapeLocation == Slide && 
!mpCustomShapePropertiesPtr->representsDefaultShape())
+        bool convertInSlideMode = meShapeLocation == Slide &&
+            (mnSubType == XML_sldNum || mnSubType == XML_dt || mnSubType == 
XML_ftr || mnSubType == XML_body);
+        bool convertInLayoutMode = meShapeLocation == Layout && (mnSubType == 
XML_body);
+        if ((convertInSlideMode || convertInLayoutMode) && 
!mpCustomShapePropertiesPtr->representsDefaultShape())
         {
             sServiceName = "com.sun.star.drawing.CustomShape";
         }

Reply via email to