diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2023-07-28 12:16:36 +0200 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2023-07-31 18:32:36 +0200 |
commit | e63a9553c022a9976d59113938df068f9d2b5d6c (patch) | |
tree | b990595638e54917fb3ed6b40c5bec08d1508c35 | |
parent | 1eed2e57b1848e8f129e98d1bbdb5f8851740d6b (diff) |
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.klos@collabora.com>
Change-Id: Ifb914c58203a1ad533f9cc9b1857a48983354de6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155015
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
-rw-r--r-- | oox/source/ppt/pptshape.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
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"; } |