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

Michael Weghorn (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 20 08:18:34 UTC 2019


 sw/source/filter/xml/xmlimp.cxx |   67 ++++++++++++++++++++--------------------
 1 file changed, 34 insertions(+), 33 deletions(-)

New commits:
commit 469888757b751f6b510d98bf5456f041da3e44b5
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Fri Nov 15 12:02:44 2019 +0100
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Wed Nov 20 09:17:26 2019 +0100

    Use initializer list for unordered_set here
    
    Change-Id: I9099308834d7bf463bd92c07edc86b8e0aa1fe84
    Reviewed-on: https://gerrit.libreoffice.org/82785
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 0ba597d22b6f..43040d441db3 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1321,39 +1321,40 @@ 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");
-    aExcludeWhenNotLoadingUserSettings.insert("CharacterCompressionType");
-    aExcludeWhenNotLoadingUserSettings.insert("FieldAutoUpdate");
-    aExcludeWhenNotLoadingUserSettings.insert("ChartAutoUpdate");
-    aExcludeWhenNotLoadingUserSettings.insert("AddParaTableSpacing");
-    aExcludeWhenNotLoadingUserSettings.insert("AddParaTableSpacingAtStart");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintAnnotationMode");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintBlackFonts");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintControls");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintDrawings");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintGraphics");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintHiddenText");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintLeftPages");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintPageBackground");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintProspect");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintReversed");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintRightPages");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintFaxName");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintPaperFromSetup");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintTables");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintTextPlaceholder");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintSingleJobs");
-    aExcludeWhenNotLoadingUserSettings.insert("UpdateFromTemplate");
-    aExcludeWhenNotLoadingUserSettings.insert("PrinterIndependentLayout");
-    aExcludeWhenNotLoadingUserSettings.insert("PrintEmptyPages");
-    aExcludeWhenNotLoadingUserSettings.insert("ConsiderTextWrapOnObjPos");
-    aExcludeWhenNotLoadingUserSettings.insert("DoNotJustifyLinesWithManualBreak");
-    aExcludeWhenNotLoadingUserSettings.insert("ProtectForm");
-    aExcludeWhenNotLoadingUserSettings.insert("MsWordCompTrailingBlanks");
-    aExcludeWhenNotLoadingUserSettings.insert("SubtractFlysAnchoredAtFlys");
-    aExcludeWhenNotLoadingUserSettings.insert("EmptyDbFieldHidesPara");
+    std::unordered_set< OUString > aExcludeWhenNotLoadingUserSettings {
+        "ForbiddenCharacters",
+        "IsKernAsianPunctuation",
+        "CharacterCompressionType",
+        "FieldAutoUpdate",
+        "ChartAutoUpdate",
+        "AddParaTableSpacing",
+        "AddParaTableSpacingAtStart",
+        "PrintAnnotationMode",
+        "PrintBlackFonts",
+        "PrintControls",
+        "PrintDrawings",
+        "PrintGraphics",
+        "PrintHiddenText",
+        "PrintLeftPages",
+        "PrintPageBackground",
+        "PrintProspect",
+        "PrintReversed",
+        "PrintRightPages",
+        "PrintFaxName",
+        "PrintPaperFromSetup",
+        "PrintTables",
+        "PrintTextPlaceholder",
+        "PrintSingleJobs",
+        "UpdateFromTemplate",
+        "PrinterIndependentLayout",
+        "PrintEmptyPages",
+        "ConsiderTextWrapOnObjPos",
+        "DoNotJustifyLinesWithManualBreak",
+        "ProtectForm",
+        "MsWordCompTrailingBlanks",
+        "SubtractFlysAnchoredAtFlys",
+        "EmptyDbFieldHidesPara"
+    };
 
     SvtSaveOptions aSaveOpt;
     bool bIsUserSetting = aSaveOpt.IsLoadUserSettings();


More information about the Libreoffice-commits mailing list