summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-08-12 15:51:45 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-08-12 16:08:19 +0200
commit144ca12ef3e17e1d315a496b456cd2bb4cd08744 (patch)
treeed0801611ce129853bd55321b577d9a4b18e30bb /sw/qa
parent9ffd693d6ee326df5d35859f90f08f4f34069dbf (diff)
VML import: handle rotation on groupshapes
Change-Id: I37f0081ae0a8af838c9f5bf158b340d726d7d1a3
Diffstat (limited to 'sw/qa')
-rwxr-xr-xsw/qa/extras/ooxmlimport/data/groupshape-rotation.docxbin0 -> 10462 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/groupshape-rotation.docx b/sw/qa/extras/ooxmlimport/data/groupshape-rotation.docx
new file mode 100755
index 000000000000..d63b5d0734e1
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/groupshape-rotation.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 15bc845a8f10..50b6945826b2 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -126,6 +126,7 @@ public:
void testFdo46361();
void testFdo65632();
void testFdo66474();
+ void testGroupshapeRotation();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -217,6 +218,7 @@ void Test::run()
{"fdo46361.docx", &Test::testFdo46361},
{"fdo65632.docx", &Test::testFdo65632},
{"fdo66474.docx", &Test::testFdo66474},
+ {"groupshape-rotation.docx", &Test::testGroupshapeRotation},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1527,6 +1529,14 @@ void Test::testFdo66474()
CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xTables->getByIndex(0), "RelativeWidth"));
}
+void Test::testGroupshapeRotation()
+{
+ // Rotation on groupshapes wasn't handled at all by the VML importer.
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(315 * 100), getProperty<sal_Int32>(xDraws->getByIndex(0), "RotateAngle"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();