summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa')
-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();