summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmlimp.cxx
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-12-31 18:24:48 +0300
committerMiklos Vajna <vmiklos@collabora.com>2021-01-12 17:18:44 +0100
commita1d6701105456248f6ff39766a6699f26a8f3d60 (patch)
tree8f6d0730738ecdd07bdc599b7d626254cb4b5fb4 /sw/source/filter/xml/xmlimp.cxx
parente828d62503d06ebde0e41dc2d6dcc87c2dc77173 (diff)
tdf#138544 sw LoadUserSettings: default DoNotJustifyLinesWithManualBreak
This is the second patch in the series. When you start a new document, Writer compat setting "Expand word space on lines with manual breaks in justified paragraphs" is on. Now, when saving and reloading it with LoadUserSettings disabled, it is still the program default of "on", instead of "off". So this one is slightly more dangerous because it will prevent setting old behaviours for MULTIPLE settings which are not listed in the UI. (Anything that trusts that ConsiderWrapOnObjPos to indicate a very old document.) The fact that we are explicitly not loading ConsiderWrapOnObjPos from the document should not imply that this document is an old one. At this far point away from StarOffice 8, it is probably safer to assume the document is new, not old. P.S. I'm pretty sure the reset of ExpandWordSpace was a complete error during a refactor. (At that point, it was the only item that defaulted to true.) The only scenario I can imagine is that at one point in time, ExpandWordSpace was not part of the SvtCompatibilityOptions, and so this would add it. But now it certainly is one of the options, and so this pointless pre-init is simply overwritten. Change-Id: Ibe160099839bcf40d5659f7d5246854c7c4fb5e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108546 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/filter/xml/xmlimp.cxx')
-rw-r--r--sw/source/filter/xml/xmlimp.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index d0266ef31c28..e164da851430 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1450,7 +1450,8 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
// finally, treat the non-default cases
// introduce boolean, that indicates a document, written by version prior SO8.
- const bool bDocumentPriorSO8 = !bConsiderWrapOnObjPos;
+ // If user settings are not loaded, we can't know if this is an old document. Better to assume no?
+ const bool bDocumentPriorSO8 = !bConsiderWrapOnObjPos && bAreUserSettingsFromDocument;
// Use old behaviour if this setting didn't exist, but only if this setting is being read from the document.
// (Obviously the setting doesn't exist if we are explicitly ignoring it, so then stick with program/user defaults)