diff options
author | Justin Luth <justin_luth@sil.org> | 2016-08-24 15:17:43 +0300 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-08-30 12:22:24 +0000 |
commit | c06d77c5eb57c1a7f5692028b6b04132593f9156 (patch) | |
tree | abe4ed7061ae626edf313d3e8c84c75be014fd38 /writerfilter/source/dmapper/DomainMapperTableHandler.cxx | |
parent | 7f95c479f7f24791b6e991d1ce0595aa05748845 (diff) |
tdf#101589 MS import: set 1-row table to don't split if row is set
Since .doc and .docx don't have an option to "don't split table",
we emulated that. For this IMPORT case when there is only one row,
consider the entire table to be unsplitable is the row is unsplitable.
This will give the expected results if the user starts adding more rows
to the table.
Change-Id: I8a2d817ff714ba0df65b5a5e263b27df4264e848
Reviewed-on: https://gerrit.libreoffice.org/28357
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapperTableHandler.cxx')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 176998295193..99087d50e645 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -576,6 +576,19 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo //fill default value - if not available m_aTableProperties->Insert( PROP_HEADER_ROW_COUNT, uno::makeAny( (sal_Int32)0), false); + // if table is only a single row, and row is set as don't split, set the same value for the whole table. + if( m_aRowProperties.size() == 1 && m_aRowProperties[0].get() ) + { + boost::optional<PropertyMap::Property> oSplitAllowed = m_aRowProperties[0]->getProperty(PROP_IS_SPLIT_ALLOWED); + if( oSplitAllowed ) + { + bool bRowCanSplit = true; + oSplitAllowed->second >>= bRowCanSplit; + if( !bRowCanSplit ) + m_aTableProperties->Insert( PROP_SPLIT, uno::makeAny(bRowCanSplit) ); + } + } + rInfo.aTableProperties = m_aTableProperties->GetPropertyValues(); #ifdef DEBUG_WRITERFILTER |