diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-01-28 04:31:51 +0600 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-01-28 04:33:38 +0100 |
commit | c4a3b1503199037e83526244bffc6adc0c310216 (patch) | |
tree | bb28587f22d05788b7c381a7ba668673da1e7ce6 /cui/source/options | |
parent | ace5f5cbee7ea2c21ff9a3fe9b859b83a006edd6 (diff) |
Simplify massively over-engineered compatibility options
They seem to be designed with multi-dimensional flexibility in mind;
it is stored as an array of lists, each having a name and a module.
The name may mean a filter. It may have a special name "_user" with
unclear meaning.
But it only ever used a single item in the array, named "_default",
in a single module (swriter). Everything else was only read into a
hidden listbox in Compatibility dialog, and never shown nor used.
Make ir much simpler. Just use the "_default" item. It is possible
to expand it later, if needed; but the previous complexity was bad
for maintenance and adding new options.
Translatable descriptions of the options were moved from UI file
to sw/inc/strings.hrc, and used in a structure that clearly maps
them to respective identifiers, to avoid fragile hidden dependency
on order of different lists.
Change-Id: I78ac5add8a872613e1fb388e4b8cc4fbf4362adf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162651
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'cui/source/options')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 941164e5044f..1b8e6f58fde7 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1494,8 +1494,10 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) SvtScriptType nNewType = SvtLanguageOptions::GetScriptTypeOfLanguage( eNewLocale ); bool bNewCJK = bool( nNewType & SvtScriptType::ASIAN ); - SvtCompatibilityOptions aCompatOpts; - aCompatOpts.SetDefault( SvtCompatibilityEntry::Index::ExpandWordSpace, !bNewCJK ); + auto batch = comphelper::ConfigurationChanges::create(); + SvtCompatibilityDefault aCompatOpts(batch); + aCompatOpts.set(u"ExpandWordSpace"_ustr, !bNewCJK); + batch->commit(); } if(m_xDecimalSeparatorCB->get_state_changed_from_saved()) |