diff options
author | László Németh <nemeth@numbertext.org> | 2020-01-28 14:32:54 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-05-15 11:49:37 +0200 |
commit | 8bb007a4e4d46fd95b5ff5bc63980d05a279db0c (patch) | |
tree | 36f054b1a659b38eb0bee8cd1aa7f0733b3ac1dc /writerfilter/source/dmapper | |
parent | e110b046b99fe2b61b4dc8af552bf59e809bbd18 (diff) |
tdf#128959 DOCX import: fix missing text lines in tables
Orphan/widow line break settings aren't always ignored
by Writer table layout code, in this case, in vertically
merged cells, resulting missing paragraph lines.
As a workaround for interoperability, disable orphan/widow
control in cell paragraphs during the DOCX import to get
correct layout in Writer, too.
(cherry picked from commit 8b13da71aedd094de0d351a4bd5ad43fdb4bddde)
Conflicts:
sw/qa/extras/layout/layout.cxx
Change-Id: I48fdb0a3bb421fd4df2c729e307a7ef483e3e772
Diffstat (limited to 'writerfilter/source/dmapper')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index b063fa466ec9..3ad763786c8a 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1802,17 +1802,23 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con } } - // tdf#90069 in tables, apply paragraph level character style also on - // paragraph level to support its copy during insertion of new table rows + // fix table paragraph properties if ( xParaProps && m_nTableDepth > 0 ) { uno::Sequence< beans::PropertyValue > aValues = pParaContext->GetPropertyValues(false); + // tdf#90069 in tables, apply paragraph level character style also on + // paragraph level to support its copy during insertion of new table rows for( const auto& rProp : std::as_const(aValues) ) { if ( rProp.Name.startsWith("Char") && rProp.Name != "CharStyleName" && rProp.Name != "CharInteropGrabBag" ) xParaProps->setPropertyValue( rProp.Name, rProp.Value ); } + + // tdf#128959 table paragraphs haven't got window and orphan controls + uno::Any aAny = uno::makeAny(static_cast<sal_Int8>(0)); + xParaProps->setPropertyValue("ParaOrphans", aAny); + xParaProps->setPropertyValue("ParaWidows", aAny); } } if( !bKeepLastParagraphProperties ) |