diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-10-26 10:33:45 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2017-10-27 13:39:27 +0200 |
commit | bb72ef2a15b0a08b07256f1bb3a0c96c413e8da8 (patch) | |
tree | 722d8cf3c21d3e7c9741083018b880e482e578b1 /sd/qa/unit/export-tests.cxx | |
parent | 1a6b373d99f6f4b2b4c1a49b3336e520efc0dbdc (diff) |
ODP: export TextPreRotateAngle
Change-Id: I13eb005195ebbdee5016bf279cba423e388723a0
Reviewed-on: https://gerrit.libreoffice.org/43910
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sd/qa/unit/export-tests.cxx')
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index fbdbdfa69695..a688954130b6 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -91,6 +91,7 @@ public: void testAuthorField(); void testTdf100926(); void testPageWithTransparentBackground(); + void testTextRotation(); CPPUNIT_TEST_SUITE(SdExportTest); @@ -109,6 +110,7 @@ public: CPPUNIT_TEST(testAuthorField); CPPUNIT_TEST(testTdf100926); CPPUNIT_TEST(testPageWithTransparentBackground); + CPPUNIT_TEST(testTextRotation); CPPUNIT_TEST_SUITE_END(); @@ -725,6 +727,28 @@ void SdExportTest::testPageWithTransparentBackground() xDocShRef->DoClose(); } +void SdExportTest::testTextRotation() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/shape-text-rotate.pptx"), PPTX); + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile); + + uno::Reference<drawing::XDrawPage> xPage(getPage(0, xDocShRef)); + uno::Reference<beans::XPropertySet> xPropSet(getShape(0, xPage)); + + CPPUNIT_ASSERT(xPropSet.is()); + + auto aGeomPropSeq = xPropSet->getPropertyValue("CustomShapeGeometry").get<uno::Sequence<beans::PropertyValue>>(); + comphelper::SequenceAsHashMap aCustomShapeGeometry(aGeomPropSeq); + + auto it = aCustomShapeGeometry.find("TextRotateAngle"); + CPPUNIT_ASSERT(it != aCustomShapeGeometry.end()); + + CPPUNIT_ASSERT_EQUAL((double)(-90), aCustomShapeGeometry["TextRotateAngle"].get<double>()); + + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |