summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/drawingml/table/tableproperties.cxx5
-rw-r--r--sd/qa/unit/data/pptx/tdf62255.pptxbin0 -> 31427 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx26
3 files changed, 29 insertions, 2 deletions
diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx
index d639c7c4de66..048e4204ec34 100644
--- a/oox/source/drawingml/table/tableproperties.cxx
+++ b/oox/source/drawingml/table/tableproperties.cxx
@@ -226,10 +226,11 @@ const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilt
TableStyle* pTableStyle = nullptr;
if ( mpTableStyle )
pTableStyle = &*mpTableStyle;
- else if ( rBase.getTableStyles() )
+ else if ( !getStyleId().isEmpty() && rBase.getTableStyles() )
{
const std::vector< TableStyle >& rTableStyles( rBase.getTableStyles()->getTableStyles() );
- const OUString aStyleId( getStyleId().isEmpty() ? rBase.getTableStyles()->getDefaultStyleId() : getStyleId() );
+ const OUString aStyleId( getStyleId() );
+
std::vector< TableStyle >::const_iterator aIter( rTableStyles.begin() );
while( aIter != rTableStyles.end() )
{
diff --git a/sd/qa/unit/data/pptx/tdf62255.pptx b/sd/qa/unit/data/pptx/tdf62255.pptx
new file mode 100644
index 000000000000..fc06a9ea7b4c
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf62255.pptx
Binary files differ
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();