summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-01-17 12:16:04 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-01-17 12:48:03 +0100
commit40a8b1f92c8befa39fc42e845994a00a70edab9f (patch)
tree4185b5e64875c2c618aa0cfbed0d671643e0c7a8 /sw/qa/extras/ooxmlimport
parent683764db4c435f27a83a2fdcf532be245c7fe4c9 (diff)
VML import: fix rotation of simple shapes inside group shapes
Change-Id: I28d2e2d801b06b92b5348123d88604fb4d10d828
Diffstat (limited to 'sw/qa/extras/ooxmlimport')
-rw-r--r--sw/qa/extras/ooxmlimport/data/groupshape-child-rotation.docxbin0 -> 15796 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/groupshape-child-rotation.docx b/sw/qa/extras/ooxmlimport/data/groupshape-child-rotation.docx
new file mode 100644
index 000000000000..06aa39d75df9
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/groupshape-child-rotation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index b79b6fb92576..32e54d2066b8 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -962,6 +962,17 @@ DECLARE_OOXMLIMPORT_TEST(testGroupshapeLine, "groupshape-line.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xShape->getSize().Height);
}
+DECLARE_OOXMLIMPORT_TEST(testGroupshapeChildRotation, "groupshape-child-rotation.docx")
+{
+ // The problem was that (due to incorrect handling of rotation inside
+ // groupshapes), the first child wasn't in the top left corner of an inline
+ // groupshape.
+ uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xShape(xGroupShape->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xShape->getPosition().X);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xShape->getPosition().Y);
+}
+
DECLARE_OOXMLIMPORT_TEST(testN793262, "n793262.docx")
{
uno::Reference<container::XEnumerationAccess> xHeaderText = getProperty< uno::Reference<container::XEnumerationAccess> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "HeaderText");