summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMatus Uzak <matus.uzak@gmail.com>2016-02-22 15:54:35 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2016-03-04 22:22:18 +0000
commit87d0df65a93db4d720e25e8ef5da4068380b5c58 (patch)
tree7b3ec80fdd77278c0b81a16173c7676202bcfd10 /oox
parent01157183eadc1e1848cad13950ed67feb62fa62a (diff)
tdf#62255,tdf#92058: PPTX import: Incorrect inheritance of default table style
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 'oox')
-rw-r--r--oox/source/drawingml/table/tableproperties.cxx5
1 files changed, 3 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() )
{