From e63a9553c022a9976d59113938df068f9d2b5d6c Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Fri, 28 Jul 2023 12:16:36 +0200 Subject: pptx: import ellipse shape correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Preset geometry "ellipse" was ignored: 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 Change-Id: Ifb914c58203a1ad533f9cc9b1857a48983354de6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155015 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro --- oox/source/ppt/pptshape.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'oox') diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 0baf47e49815..2d0924406536 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -335,8 +335,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"; } -- cgit