summaryrefslogtreecommitdiff
path: root/sd/qa/unit/import-tests.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit/import-tests.cxx')
-rw-r--r--sd/qa/unit/import-tests.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 025b53077405..5f939f336551 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -134,6 +134,7 @@ public:
void testN862510_4();
void testBnc870237();
void testBnc887225();
+ void testPredefinedTableStyle();
void testBnc591147();
void testCreationDate();
void testBnc584721_1();
@@ -237,6 +238,7 @@ public:
CPPUNIT_TEST(testN862510_4);
CPPUNIT_TEST(testBnc870237);
CPPUNIT_TEST(testBnc887225);
+ CPPUNIT_TEST(testPredefinedTableStyle);
CPPUNIT_TEST(testBnc591147);
CPPUNIT_TEST(testCreationDate);
CPPUNIT_TEST(testBnc584721_1);
@@ -882,6 +884,34 @@ void SdImportTest::testCreationDate()
xDocShRef->DoClose();
}
+void SdImportTest::testPredefinedTableStyle()
+{
+ // 073A0DAA-6AF3-43AB-8588-CEC1D06C72B9 (Medium Style 2)
+ sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/predefined-table-style.pptx"), PPTX );
+ const SdrPage *pPage = GetPage( 1, xDocShRef );
+
+ sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
+ CPPUNIT_ASSERT( pTableObj );
+
+ uno::Reference< table::XCellRange > xTable(pTableObj->getTable(), uno::UNO_QUERY_THROW);
+ uno::Reference< beans::XPropertySet > xCell;
+ sal_Int32 nColor;
+
+ xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
+ xCell->getPropertyValue("FillColor") >>= nColor;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nColor);
+
+ xCell.set(xTable->getCellByPosition(0, 1), uno::UNO_QUERY_THROW);
+ xCell->getPropertyValue("FillColor") >>= nColor;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(13421772), nColor);
+
+ xCell.set(xTable->getCellByPosition(0, 2), uno::UNO_QUERY_THROW);
+ xCell->getPropertyValue("FillColor") >>= nColor;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(15198183), nColor);
+
+ xDocShRef->DoClose();
+}
+
void SdImportTest::testBnc887225()
{
sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/bnc887225.pptx"), PPTX );