diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2021-03-22 23:39:17 +0300 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-03-23 11:29:21 +0100 |
commit | ff751d42a4f672e25188ba90958e91d7869f395a (patch) | |
tree | ec055e31ae7eaa9ef15bb93f050b1f77f6c5f426 /oox | |
parent | tdf#141127 Use ODF default values for draw:extrusion-skew (diff) | |
download | core-ff751d42a4f672e25188ba90958e91d7869f395a.tar.gz core-ff751d42a4f672e25188ba90958e91d7869f395a.zip |
tdf#140714 Import graphics cropped into custom geometry as custom shapes.
Change-Id: I2054d24ce41c9f0d6cc1675f461274067c3b2898
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112943
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
(cherry picked from commit db39b68c3c85531744ddeb8105b3ddb9b2dab099)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112811
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/shape.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 5f3204bf64f2..ffa7fb017aca 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -722,8 +722,10 @@ Reference< XShape > const & Shape::createAndInsert( } // Use custom shape instead of GraphicObjectShape if the image is cropped to // shape. Except rectangle, which does not require further cropping - bool bIsCroppedGraphic = (aServiceName == "com.sun.star.drawing.GraphicObjectShape" && mpCustomShapePropertiesPtr->getShapePresetType() >= 0 - && mpCustomShapePropertiesPtr->getShapePresetType() != XML_Rect && mpCustomShapePropertiesPtr->getShapePresetType() != XML_rect); + bool bIsCroppedGraphic = (aServiceName == "com.sun.star.drawing.GraphicObjectShape" && + (mpCustomShapePropertiesPtr->getShapePresetType() >= 0 || mpCustomShapePropertiesPtr->getPath2DList().size() > 0) && + mpCustomShapePropertiesPtr->getShapePresetType() != XML_Rect && + mpCustomShapePropertiesPtr->getShapePresetType() != XML_rect); bool bIsCustomShape = ( aServiceName == "com.sun.star.drawing.CustomShape" || aServiceName == "com.sun.star.drawing.ConnectorShape" || bIsCroppedGraphic); |