summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/flip_and_rotate.odtbin0 -> 9403 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport7.cxx19
2 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/flip_and_rotate.odt b/sw/qa/extras/ooxmlexport/data/flip_and_rotate.odt
new file mode 100644
index 000000000000..4805bfa80004
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/flip_and_rotate.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index cfa1ddb4637e..6463c8096184 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -1103,6 +1103,25 @@ DECLARE_OOXMLEXPORT_TEST(testTDF93675, "no-numlevel-but-indented.odt")
assertXPath(pXmlDoc, "//w:ind", "start", "1418");
}
+DECLARE_OOXMLEXPORT_TEST(testFlipAndRotateCustomShape, "flip_and_rotate.odt")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ // there should be no flipH and flipV attributes in this case
+ assertXPathNoAttribute(pXmlDoc, "//a:xfrm", "flipH");
+ assertXPathNoAttribute(pXmlDoc, "//a:xfrm", "flipV");
+ // check rotation angle
+ assertXPath(pXmlDoc, "//a:xfrm", "rot", "13500000");
+ // check the first few coordinates of the polygon
+ assertXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:lnTo[1]/a:pt", "x", "2351");
+ assertXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:lnTo[1]/a:pt", "y", "3171");
+ assertXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:lnTo[2]/a:pt", "x", "1695");
+ assertXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:lnTo[2]/a:pt", "y", "3171");
+ assertXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:lnTo[3]/a:pt", "x", "1695");
+ assertXPath(pXmlDoc, "//a:custGeom/a:pathLst/a:path/a:lnTo[3]/a:pt", "y", "1701");
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();