diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2021-08-15 18:48:32 +0200 |
---|---|---|
committer | Regina Henschel <rb.henschel@t-online.de> | 2021-08-15 21:40:07 +0200 |
commit | 24a8e3209b1d7c2f4f13d5cc3f69726253af9eff (patch) | |
tree | 7e933f4a8b9abee0fd6548e37c5433534a4308c7 /oox | |
parent | d5039e7b4c79b40cf6efb70dd703629cc367fcbf (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>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/shapes.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 325387f4991d..9b6bb4f8ed4f 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); |