Kaydet (Commit) 54239670 authored tarafından Michael Stahl's avatar Michael Stahl

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: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 8f3df3a5
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment