summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-09-24 17:53:38 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-09-24 18:02:42 +0200
commit36ac7749523e0c6f40a77beac278bd9e7a667a9b (patch)
treeffb71be02ed4ce516d40510e1daa1f799d36943d /sw/qa/extras/ooxmlexport
parent2916dfdb2361e68a6bbbcb0b0e9e114e052cb6d5 (diff)
DOCX import: make sure rotation does not affect shape position
Change-Id: I7916a24d63bb7c995267059e9bedbf1f08adc152
Diffstat (limited to 'sw/qa/extras/ooxmlexport')
-rw-r--r--sw/qa/extras/ooxmlexport/data/position-and-rotation.docxbin0 -> 18502 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/position-and-rotation.docx b/sw/qa/extras/ooxmlexport/data/position-and-rotation.docx
new file mode 100644
index 000000000000..d883ad32e75e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/position-and-rotation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index d45db672738e..af4e9dd304b4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -272,6 +272,17 @@ DECLARE_OOXMLEXPORT_TEST(testChartDupe, "chart-dupe.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xEmbeddedObjects->getCount());
}
+DECLARE_OOXMLEXPORT_TEST(testPositionAndRotation, "position-and-rotation.docx")
+{
+ // The document should look like: "This line is tricky, <image> because only 'This line is tricky,' is on the left."
+ // But the image was pushed down, so it did not break the line into two text portions.
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ // Should be 1559, was -5639
+ CPPUNIT_ASSERT(xShape->getPosition().X > 1500);
+ // Should be 88, was 473
+ CPPUNIT_ASSERT(xShape->getPosition().Y < 100);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */