summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorGrzegorz Araminowicz <g.araminowicz@gmail.com>2017-08-20 20:40:51 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-08-23 01:15:08 +0200
commitcf53f243d411b199ebf06661273c71de3b89753c (patch)
tree8b1b3bdbe1f42fbd4f88d1fe3288ea4c935a9a68 /sd
parent7d42e4b4c4fc3813eeb0f72807ffd17f47a86a64 (diff)
SmartArt: shape rotation support
Change-Id: I13bfbd3fafff5335ce8bc23b2579182aa5a94a80 Reviewed-on: https://gerrit.libreoffice.org/41393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sd')
-rwxr-xr-xsd/qa/unit/data/pptx/smartart-rotation.pptxbin0 -> 43886 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx19
2 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/smartart-rotation.pptx b/sd/qa/unit/data/pptx/smartart-rotation.pptx
new file mode 100755
index 000000000000..e938d9a299f5
--- /dev/null
+++ b/sd/qa/unit/data/pptx/smartart-rotation.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 839d90db74a8..8040997bc8a7 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -166,6 +166,7 @@ public:
void testSmartArtChildren();
void testSmartArtText();
void testSmartArtCnt();
+ void testSmartArtRotation();
void testTdf109223();
void testTdf109187();
@@ -242,6 +243,7 @@ public:
CPPUNIT_TEST(testSmartArtChildren);
CPPUNIT_TEST(testSmartArtText);
CPPUNIT_TEST(testSmartArtCnt);
+ CPPUNIT_TEST(testSmartArtRotation);
CPPUNIT_TEST(testTdf109223);
CPPUNIT_TEST(testTdf109187);
@@ -2334,6 +2336,23 @@ void SdImportTest::testSmartArtCnt()
xDocShRef->DoClose();
}
+void SdImportTest::testSmartArtRotation()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-rotation.pptx"), PPTX);
+ uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
+
+ uno::Reference<beans::XPropertySet> xShape0(xShapeGroup->getByIndex(0), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xShape0->getPropertyValue("RotateAngle").get<sal_Int32>());
+
+ uno::Reference<beans::XPropertySet> xShape1(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(24000), xShape1->getPropertyValue("RotateAngle").get<sal_Int32>());
+
+ uno::Reference<beans::XPropertySet> xShape2(xShapeGroup->getByIndex(2), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(12000), xShape2->getPropertyValue("RotateAngle").get<sal_Int32>());
+
+ xDocShRef->DoClose();
+}
+
void SdImportTest::testTdf109223()
{
// In the test document flipV attribute is defined for a group shape