diff options
author | Matus Uzak <matus.uzak@gmail.com> | 2016-02-22 15:54:35 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2016-03-04 22:22:18 +0000 |
commit | 87d0df65a93db4d720e25e8ef5da4068380b5c58 (patch) | |
tree | 7b3ec80fdd77278c0b81a16173c7676202bcfd10 /sd | |
parent | 01157183eadc1e1848cad13950ed67feb62fa62a (diff) |
The default table style defined in tableStyles.xml file can be used
when a table is initially inserted into a document. It must not be
applied by default to any of the tables not referencing a table style
explicitly from the tableStyleId element.
Change-Id: I025cdfba352c87a32f9a1e297fbc8b9fc2c8c0a4
Reviewed-on: https://gerrit.libreoffice.org/22619
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf62255.pptx | bin | 0 -> 31427 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 26 |
2 files changed, 26 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf62255.pptx b/sd/qa/unit/data/pptx/tdf62255.pptx Binary files differnew file mode 100644 index 000000000000..fc06a9ea7b4c --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf62255.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 8c53d6b41b36..c7e4f00d3df1 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -108,6 +108,7 @@ public: void testRowHeight(); void testTdf93830(); void testTdf93097(); + void testTdf62255(); CPPUNIT_TEST_SUITE(SdImportTest); @@ -150,6 +151,7 @@ public: CPPUNIT_TEST(testRowHeight); CPPUNIT_TEST(testTdf93830); CPPUNIT_TEST(testTdf93097); + CPPUNIT_TEST(testTdf62255); CPPUNIT_TEST_SUITE_END(); }; @@ -1166,6 +1168,30 @@ void SdImportTest::testTdf93097() xDocShRef->DoClose(); } +void SdImportTest::testTdf62255() +{ + sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/tdf62255.pptx"), PPTX); + const SdrPage *pPage = GetPage( 1, xDocShRef ); + + sdr::table::SdrTableObj *pTableObj; + pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0)); + CPPUNIT_ASSERT( pTableObj ); + + css::uno::Any aAny; + uno::Reference< table::XCellRange > xTable; + uno::Reference< beans::XPropertySet > xCell; + xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW); + xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW); + aAny = xCell->getPropertyValue("FillStyle"); + + if (aAny.hasValue()) + { + drawing::FillStyle aFillStyle; + aAny >>= aFillStyle; + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, aFillStyle); + } +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |