summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2024-06-24 16:20:44 +0200
committerThorsten Behrens <thorsten.behrens@allotropia.de>2024-07-28 12:20:55 +0200
commit3978dfe0fcd21b35ee3af92ea4129f66b14a2491 (patch)
treeacbc0766e7e749428c015f9b13e4a76c582572c1
parentd04b2606b987c0184d4c9fe27f4fdc1374b4abda (diff)
tdf#161264 don't hide paragraph with empty mail merge fields
With tdf#35798 db04be037b611e296ef9f2542322c52ed82d7a2b paragraphs containing empty mail merge fields are hidden by default to remove empty lines in address blocks. This is now switched off when importing Word documents. Change-Id: I0f550ff3d29ac499446df9a04676a08d914d12f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169469 Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170838 Tested-by: allotropia jenkins <jenkins@allotropia.de>
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx1
-rw-r--r--writerfilter/source/filter/WriterFilter.cxx2
3 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a2d959d7d3f7..9d88a21b9299 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1868,6 +1868,8 @@ void SwWW8ImplReader::ImportDop()
DocumentSettingId::FRAME_AUTOWIDTH_WITH_MORE_PARA, true);
m_rDoc.getIDocumentSettingAccess().set(
DocumentSettingId::FOOTNOTE_IN_COLUMN_TO_PAGEEND, true);
+ m_rDoc.getIDocumentSettingAccess().set(
+ DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA, false);
// Import Default Tabs
tools::Long nDefTabSiz = m_xWDop->dxaTab;
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 01e2f043390a..c54098678333 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -146,6 +146,7 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon
//paint backgound frames after header/footer when anchored in body
m_pImpl->SetDocumentSettingsProperty("PaintHellOverHeaderFooter",uno::Any(true));
m_pImpl->SetDocumentSettingsProperty(u"IgnoreTabsAndBlanksForLineCalculation"_ustr,uno::Any(true));
+ m_pImpl->SetDocumentSettingsProperty(u"EmptyDbFieldHidesPara"_ustr,uno::Any(false));
}
// Initialize RDF metadata, to be able to add statements during the import.
diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx
index 853e42982210..dd47c1228dd7 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -315,6 +315,8 @@ void WriterFilter::setTargetDocument(const uno::Reference<lang::XComponent>& xDo
xSettings->setPropertyValue("IgnoreTabsAndBlanksForLineCalculation", uno::Any(true));
xSettings->setPropertyValue("InvertBorderSpacing", uno::Any(true));
xSettings->setPropertyValue("CollapseEmptyCellPara", uno::Any(true));
+ xSettings->setPropertyValue(u"EmptyDbFieldHidesPara"_ustr, uno::Any(false));
+
// tdf#142404 TabOverSpacing (new for compatibilityMode15/Word2013+) is a subset of TabOverMargin
// (which applied to DOCX <= compatibilityMode14).
// TabOverMargin looks at tabs beyond the normal text area,