summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-01-28 14:32:54 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-05-19 09:11:15 +0200
commit04f4484992e8d1260e5a6c21606ba4632a7df035 (patch)
treefcbb0723e7f455627b18d5d036e13664efc5282a /writerfilter
parente73d148cd02a934025f8d2018acf23493a9db3b3 (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 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94316 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index b0559a737cc4..bcfd5a152887 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1568,17 +1568,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 : 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 )