summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2021-08-15 18:48:32 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-08-17 09:38:44 +0200
commit58ba1b975d75225222a27ff404281b9bff133143 (patch)
tree40f53649a487c50c09ce1b654d55cfb132e0aad0 /oox
parent1a73d70ffc834ff4ff29e13b1d1c06be60ce58b5 (diff)
tdf#143860 non-primitive needs custGeom not prstGeom
Error was, that for a custom shape with type 'non-primitive' method DMLPresetShapeExporter::WriteShape() was called. For such shapes the method GetOOXMLPresetGeometry() returns preset type 'rect' and in case the shape had no handles, that preset geometry was written. In my solution I exclude shapes of type 'non-primitive' from using DMLPresetShapeExporter, because such shapes never belong to a OOXML preset shape. Change-Id: I714f69c98fe15c2b7e70dc0a474a7f85ad757034 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120511 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120547
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/shapes.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 23ea202db76b..1bcabf38eb49 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -843,7 +843,8 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
bool bPresetWriteSuccessful = false;
// Let the custom shapes what has name and preset information in OOXML, to be written
// as preset ones with parameters. Try that with this converter class.
- if (!sShapeType.startsWith("ooxml") && GetDocumentType() == DOCUMENT_DOCX
+ if (!sShapeType.startsWith("ooxml") && sShapeType != "non-primitive"
+ && GetDocumentType() == DOCUMENT_DOCX
&& xShape->getShapeType() == "com.sun.star.drawing.CustomShape")
{
DMLPresetShapeExporter aCustomShapeConverter(this, xShape);