summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-09-25 15:14:22 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-09-25 15:55:43 +0200
commit9791453283407a0a129a71767a290058ac759da2 (patch)
tree2cdd79932ba3f11cdc4458107084221d85262035 /sw/qa/extras/ooxmlexport
parentdbbd89efdeaa44421d1f2ad774c342009d881d9b (diff)
DOCX drawingML filter: avoid fake rotation on vertical flip
This also improves positioning a bit, in the changed testcase the perfect position would be 211.663888889, and reality is now 210 instead of 208 (100th millimeters). Change-Id: I5226f2165224a8bbfebfd11d9c612f72d83b8c69
Diffstat (limited to 'sw/qa/extras/ooxmlexport')
-rw-r--r--sw/qa/extras/ooxmlexport/data/drawingml-flipv.docxbin0 -> 15580 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/drawingml-flipv.docx b/sw/qa/extras/ooxmlexport/data/drawingml-flipv.docx
new file mode 100644
index 000000000000..f10a83fac2c6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/drawingml-flipv.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 0b2c78f6b700..be44a0723086 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -290,6 +290,20 @@ DECLARE_OOXMLEXPORT_TEST(testNumberingFont, "numbering-font.docx")
CPPUNIT_ASSERT_EQUAL(OUString("Verdana"), getProperty<OUString>(xStyle, "CharFontName"));
}
+DECLARE_OOXMLEXPORT_TEST(testDrawingmlFlipv, "drawingml-flipv.docx")
+{
+ // The problem was that the shape had vertical flip only, but then we added rotation as well on export.
+ if (xmlDocPtr pXmlDoc = parseExport("word/document.xml"))
+ {
+ xmlXPathObjectPtr pXPath = getXPathNode(pXmlDoc, "//a:xfrm");
+ xmlNodeSetPtr pXmlNodes = pXPath->nodesetval;
+ CPPUNIT_ASSERT_EQUAL(1, xmlXPathNodeSetGetLength(pXmlNodes));
+ xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0];
+ // The attribute existed, so xmlGetProp() returned non-NULL.
+ CPPUNIT_ASSERT_EQUAL(static_cast<xmlChar*>(0), xmlGetProp(pXmlNode, BAD_CAST("rot")));
+ }
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */