[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Mar 8 09:49:49 UTC 2019


 sw/source/filter/xml/xmlimp.cxx |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 5423967041fa1a4442cbae816a96d236fd48f4a3
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Mar 6 12:45:43 2019 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Fri Mar 8 10:49:15 2019 +0100

    sw: ODF import: try to fix aExcludeWhenNotLoadingUserSettings
    
    In SwXMLImport::SetConfigurationSettings() there is a list of settings
    that will be ignored/not loaded form the file if IsLoadUserSettings()
    is false, which is presumably not the default.
    
    The beginning of this list is obviously settings that can be set via
    Tools->Options, but the end is mostly a bunch of Word-compat layout
    settings that cannot be set in the UI.
    
    Let's assume some cargo-culting happened there (this function is tricky
    and underdocumented anyway), and replace the end of the list with those
    settings that have been added to Tools->Options->Writer->Compatibility
    in the last years, since those can be called "user settings".
    
    Change-Id: I6ea4a5da4033ca3512d71e4123b47d46e20bf596
    Reviewed-on: https://gerrit.libreoffice.org/68803
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 28f0b9e27479..7742dd6bbb9b 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1323,6 +1323,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
 
     std::unordered_set< OUString > aExcludeAlways;
     aExcludeAlways.insert("LinkUpdateMode");
+    // this should contain things that are actually user-settable, via Tools->Options
     std::unordered_set< OUString > aExcludeWhenNotLoadingUserSettings;
     aExcludeWhenNotLoadingUserSettings.insert("ForbiddenCharacters");
     aExcludeWhenNotLoadingUserSettings.insert("IsKernAsianPunctuation");
@@ -1348,14 +1349,12 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
     aExcludeWhenNotLoadingUserSettings.insert("UpdateFromTemplate");
     aExcludeWhenNotLoadingUserSettings.insert("PrinterIndependentLayout");
     aExcludeWhenNotLoadingUserSettings.insert("PrintEmptyPages");
-    aExcludeWhenNotLoadingUserSettings.insert("SmallCapsPercentage66");
-    aExcludeWhenNotLoadingUserSettings.insert("TabOverflow");
-    aExcludeWhenNotLoadingUserSettings.insert("UnbreakableNumberings");
-    aExcludeWhenNotLoadingUserSettings.insert("ClippedPictures");
-    aExcludeWhenNotLoadingUserSettings.insert("BackgroundParaOverDrawings");
-    aExcludeWhenNotLoadingUserSettings.insert("TabOverMargin");
-    aExcludeWhenNotLoadingUserSettings.insert("PropLineSpacingShrinksFirstLine");
+    aExcludeWhenNotLoadingUserSettings.insert("ConsiderTextWrapOnObjPos");
+    aExcludeWhenNotLoadingUserSettings.insert("DoNotJustifyLinesWithManualBreak");
+    aExcludeWhenNotLoadingUserSettings.insert("ProtectForm");
+    aExcludeWhenNotLoadingUserSettings.insert("MsWordCompTrailingBlanks");
     aExcludeWhenNotLoadingUserSettings.insert("SubtractFlysAnchoredAtFlys");
+    aExcludeWhenNotLoadingUserSettings.insert("EmptyDbFieldHidesPara");
 
     sal_Int32 nCount = aConfigProps.getLength();
     const PropertyValue* pValues = aConfigProps.getConstArray();


More information about the Libreoffice-commits mailing list