diff options
author | Justin Luth <justin.luth@collabora.com> | 2020-12-31 20:56:54 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2021-01-14 20:23:55 +0100 |
commit | 8466fae95acff67b25272170b49deb47146d2971 (patch) | |
tree | cd3f44375a688eb6b4ffe463bd28a74e8bccfebd /sw/source/filter/xml/xmlimp.cxx | |
parent | 9013666c5ad32c5733be7ae27e872ff0d1b3db7b (diff) |
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_luth@sil.org>
Diffstat (limited to 'sw/source/filter/xml/xmlimp.cxx')
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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)); |