summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-04-15 00:23:07 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-04-15 15:40:56 +0200
commitbcb371b1a830442610ad7fda476eda5271427a50 (patch)
treeb203e822dcde9f22fa56a57418c4dc4d1e96880f /sd
parent2436cf17304f25c7d34da52a321d6da0e9011d19 (diff)
ODF import / export of rotated text in Impress table
Change-Id: I57136e32ed2db5e405a45e8e4bad1b8d459b7ae8
Diffstat (limited to 'sd')
-rwxr-xr-xsd/qa/unit/data/pptx/tdf100926_ODP.pptxbin0 -> 32382 bytes
-rw-r--r--sd/qa/unit/export-tests.cxx31
2 files changed, 31 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf100926_ODP.pptx b/sd/qa/unit/data/pptx/tdf100926_ODP.pptx
new file mode 100755
index 000000000000..71627394ec84
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf100926_ODP.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index dd57ec01bf3d..80a03416d759 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -93,6 +93,7 @@ public:
void testTransparentBackground();
void testEmbeddedPdf();
void testAuthorField();
+ void testTdf100926();
CPPUNIT_TEST_SUITE(SdExportTest);
@@ -108,6 +109,7 @@ public:
CPPUNIT_TEST(testTransparentBackground);
CPPUNIT_TEST(testEmbeddedPdf);
CPPUNIT_TEST(testAuthorField);
+ CPPUNIT_TEST(testTdf100926);
CPPUNIT_TEST_SUITE_END();
@@ -571,6 +573,35 @@ void SdExportTest::testAuthorField()
xDocShRef->DoClose();
}
+void SdExportTest::testTdf100926()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf100926_ODP.pptx"), PPTX);
+
+ xDocShRef = saveAndReload(xDocShRef.get(), ODP);
+
+ const SdrPage* pPage = GetPage(1, xDocShRef);
+ CPPUNIT_ASSERT(pPage != nullptr);
+
+ sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
+ CPPUNIT_ASSERT(pTableObj != nullptr);
+ uno::Reference< table::XCellRange > xTable(pTableObj->getTable(), uno::UNO_QUERY_THROW);
+
+ sal_Int32 nRotation = 0;
+ uno::Reference< beans::XPropertySet > xCell(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
+ xCell->getPropertyValue("RotateAngle") >>= nRotation;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(27000), nRotation);
+
+ xCell.set(xTable->getCellByPosition(1, 0), uno::UNO_QUERY_THROW);
+ xCell->getPropertyValue("RotateAngle") >>= nRotation;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(9000), nRotation);
+
+ xCell.set(xTable->getCellByPosition(2, 0), uno::UNO_QUERY_THROW);
+ xCell->getPropertyValue("RotateAngle") >>= nRotation;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nRotation);
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();