summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapperTableManager.cxx
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-11-26 16:42:15 +0100
committerLászló Németh <nemeth@numbertext.org>2019-11-27 07:52:01 +0100
commit001e11c8f4a52a2eb308562bdee8516efb77b96b (patch)
tree90a7a52d75302cee1d39c736267904e8c180d6e9 /writerfilter/source/dmapper/DomainMapperTableManager.cxx
parent28ea418a3f1905d8a4a8e5813e8ed737960c62d2 (diff)
tdf#76586 fix table width of auto-width nested tables
when they have (sometimes incorrect) fixed cell widths. Change-Id: I98bf37bfce72b84eed14e354520e4741ae2ddada Reviewed-on: https://gerrit.libreoffice.org/83787 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapperTableManager.cxx')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index e29637583631..3a3b713723ee 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -644,8 +644,16 @@ void DomainMapperTableManager::endOfRowAction()
{
if(nTableWidth > 100 || nTableWidth <= 0)
{
- pTablePropMap->setValue(TablePropertyMap::TABLE_WIDTH, m_nTableWidth);
- pTablePropMap->setValue(TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::FIX);
+ if(getTableDepth() > 1 && !m_bTableSizeTypeInserted)
+ {
+ pTablePropMap->setValue(TablePropertyMap::TABLE_WIDTH, sal_Int32(100));
+ pTablePropMap->setValue(TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::VARIABLE);
+ }
+ else
+ {
+ pTablePropMap->setValue(TablePropertyMap::TABLE_WIDTH, m_nTableWidth);
+ pTablePropMap->setValue(TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::FIX);
+ }
}
}
uno::Sequence< text::TableColumnSeparator > aSeparators( m_nCell.back( ) - 1 );