summaryrefslogtreecommitdiff
path: root/sw
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 /sw
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 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odtbin0 -> 9408 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport16.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odt b/sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odt
new file mode 100644
index 000000000000..6a1222877031
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 2b3d92b55701..bd8338315381 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -70,6 +70,17 @@ protected:
}
};
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf143860NonPrimitiveCustomShape,
+ "tdf143860_NonPrimitiveCustomShape.odt")
+{
+ // The document has a custom shape of type non-primitive without handles. Make sure that the shape
+ // is not exported with preset but with custom geometry.
+ xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+ CPPUNIT_ASSERT(pXmlDocument);
+ assertXPath(pXmlDocument, "//a:prstGeom", 0);
+ assertXPath(pXmlDocument, "//a:custGeom", 1);
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf136059, "tdf136059.odt")
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("Contour has not been exported!", true,