diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-03-12 15:13:47 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-03-12 16:11:33 +0100 |
commit | 970160f78ef6cc7abacfa252daa8451e1f0117bb (patch) | |
tree | 2cdcd6006ab0777f3bdaf396d8fdfff55671bf8a /writerfilter/source/dmapper/TablePropertiesHandler.cxx | |
parent | 48b5b7641d0df960558082e8948da8598f801264 (diff) |
bnc#865381 DOCX import: fix w:trHeight for cells with btLr text direction
Also extend testcase: I made sure that the new version fails without
this fix and without the fix from
48b5b7641d0df960558082e8948da8598f801264 as well.
Change-Id: If33aa6d33cdc287620c12b84ad3f50279568bc8d
Diffstat (limited to 'writerfilter/source/dmapper/TablePropertiesHandler.cxx')
-rw-r--r-- | writerfilter/source/dmapper/TablePropertiesHandler.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx index b9b456b751b0..d71e9aef2782 100644 --- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx +++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx @@ -96,12 +96,16 @@ namespace dmapper { pProperties->resolve(*pMeasureHandler); TablePropertyMapPtr pPropMap( new TablePropertyMap ); - // In case a cell already wanted fixed size, we should not overwrite it here. DomainMapperTableManager* pManager = dynamic_cast<DomainMapperTableManager*>(m_pTableManager); - if (!pManager || !pManager->IsRowSizeTypeInserted()) - pPropMap->Insert( PROP_SIZE_TYPE, uno::makeAny( pMeasureHandler->GetRowHeightSizeType() ), false); + // In case any of the cells has the btLr cell direction, then an explicit minimal size will just hide the whole row, don't do that. + if (pMeasureHandler->GetRowHeightSizeType() != text::SizeType::MIN || !pManager->HasBtlrCell()) + { + // In case a cell already wanted fixed size, we should not overwrite it here. + if (!pManager || !pManager->IsRowSizeTypeInserted()) + pPropMap->Insert( PROP_SIZE_TYPE, uno::makeAny( pMeasureHandler->GetRowHeightSizeType() ), false); - pPropMap->Insert( PROP_HEIGHT, uno::makeAny(pMeasureHandler->getMeasureValue() )); + pPropMap->Insert( PROP_HEIGHT, uno::makeAny(pMeasureHandler->getMeasureValue() )); + } insertRowProps(pPropMap); } } |