sw/source/filter/ww8/ww8par.cxx                 |    2 ++
 sw/source/writerfilter/dmapper/DomainMapper.cxx |    1 +
 sw/source/writerfilter/filter/WriterFilter.cxx  |    2 ++
 3 files changed, 5 insertions(+)

New commits:
commit dce68b5f9f286a8b6af42fcad1331d7e9bb07f4c
Author:     Oliver Specht <oliver.spe...@cib.de>
AuthorDate: Mon Jun 24 16:20:44 2024 +0200
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Mon Jul 15 21:24:46 2024 +0200

    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.ext...@allotropia.de>
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 8ea537bf4a06..b752e5c31316 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/sw/source/writerfilter/dmapper/DomainMapper.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper.cxx
index 6b60dd3bdffe..902e299d8d68 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper.cxx
@@ -149,6 +149,7 @@ DomainMapper::DomainMapper( const uno::Reference< 
uno::XComponentContext >& xCon
         m_pImpl->SetDocumentSettingsProperty(u"NoNumberingShowFollowBy"_ustr, 
uno::Any(true));
         //paint background frames after header/footer when anchored in body
         
m_pImpl->SetDocumentSettingsProperty(u"PaintHellOverHeaderFooter"_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/sw/source/writerfilter/filter/WriterFilter.cxx 
b/sw/source/writerfilter/filter/WriterFilter.cxx
index 0ad349bb3eda..1a648daba438 100644
--- a/sw/source/writerfilter/filter/WriterFilter.cxx
+++ b/sw/source/writerfilter/filter/WriterFilter.cxx
@@ -316,6 +316,8 @@ void WriterFilter::setTargetDocument(const 
uno::Reference<lang::XComponent>& xDo
     xSettings->setPropertyValue(u"IgnoreTabsAndBlanksForLineCalculation"_ustr, 
uno::Any(true));
     xSettings->setPropertyValue(u"InvertBorderSpacing"_ustr, uno::Any(true));
     xSettings->setPropertyValue(u"CollapseEmptyCellPara"_ustr, 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,

Reply via email to