sw/source/filter/xml/xmlimp.cxx | 6 ++++++ sw/source/uibase/app/docshini.cxx | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-)
New commits: commit 8466fae95acff67b25272170b49deb47146d2971 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Thu Dec 31 20:56:54 2020 +0300 Commit: Justin Luth <justin_l...@sil.org> CommitDate: Thu Jan 14 20:23:55 2021 +0100 tdf#138544 sw LoadUserSettings: default EmptyDbFieldHidesPara This is the fourth patch in the series. When you start a new document, Writer compat setting "Hide paragraphs of database fields with an empty value" is on. Now, when saving and reloading it with LoadUserSettings disabled, it is still the program default of "on", instead of "off". This one was a bit different because it didn't initialize in the standard way. // for some properties we don't want to use the application // default if they're missing. So we watch for them in the loop // below, and set them if not found So I'm changing it to match the standard way, and adding the now familiar clause to cover the case when the LoadUserSettings is disabled. Change-Id: I979b01340000056567a4baa9ace27f9f9d15e9b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108548 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 13198a2f9cfc..1e8691ca827b 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1326,6 +1326,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC bool bTabOverMarginValue = false; bool bPropLineSpacingShrinksFirstLine = false; bool bSubtractFlysAnchoredAtFlys = false; + bool bEmptyDbFieldHidesPara = false; bool bCollapseEmptyCellPara = false; const PropertyValue* currentDatabaseDataSource = nullptr; @@ -1423,6 +1424,8 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC bPropLineSpacingShrinksFirstLine = true; else if (rValue.Name == "SubtractFlysAnchoredAtFlys") bSubtractFlysAnchoredAtFlys = true; + else if (rValue.Name == "EmptyDbFieldHidesPara") + bEmptyDbFieldHidesPara = true; else if (rValue.Name == "CollapseEmptyCellPara") bCollapseEmptyCellPara = true; } @@ -1599,6 +1602,9 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC if (!bSubtractFlysAnchoredAtFlys && bAreUserSettingsFromDocument) xProps->setPropertyValue("SubtractFlysAnchoredAtFlys", makeAny(true)); + if (!bEmptyDbFieldHidesPara && bAreUserSettingsFromDocument) + xProps->setPropertyValue("EmptyDbFieldHidesPara", makeAny(false)); + if (!bCollapseEmptyCellPara) xProps->setPropertyValue("CollapseEmptyCellPara", makeAny(false)); diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index f4aadf7476ca..e5d43853e938 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -476,9 +476,6 @@ bool SwDocShell::Load( SfxMedium& rMedium ) if (m_xDoc->getIDocumentDrawModelAccess().GetDrawModel()) m_xDoc->getIDocumentDrawModelAccess().GetDrawModel()->SetAnchoredTextOverflowLegacy( true); - // legacy behaviour (not hiding paragraph) for Database (MailMerge) fields - m_xDoc->GetDocumentSettingManager().set(DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA, - false); } // Loading _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits