desktop/source/lib/init.cxx | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-)
New commits: commit bf9897bc11a5ee06197ce566214456f796f68a34 Author: Marco Cecchetti <marco.cecche...@collabora.com> AuthorDate: Fri Jun 2 16:02:07 2023 +0200 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Oct 11 15:21:11 2023 +0200 Removing unused variable in preLoadShortCutAccelerators When all warnings are treated as errors the following error was reported: desktop/source/lib/init.cxx: OUString language = LanguageTag(installedLocales[i]).getLocale().Language; The problem started after commit 1cd46ba9140b7f5f077d8e9da405b180857f008d. Remove the allowed language check from UI languages. Change-Id: Id1f4269fe262b61b4fb05d61bf9c64a747275c28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152561 Reviewed-by: Gökay ŞATIR <gokaysa...@collabora.com> Tested-by: Aron Budea <aron.bu...@collabora.com> (cherry picked from commit b0fa2ea7decadae61ad10e340698a8dd4af45e6e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157813 Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 387eb95e0fa7..fc57d748d5d4 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7521,8 +7521,6 @@ static void preLoadShortCutAccelerators() for (sal_Int32 i = 0; i < installedLocales.getLength(); i++) { - OUString language = LanguageTag(installedLocales[i]).getLocale().Language; - // Set the UI language to current one, before creating the accelerator. std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); officecfg::Setup::L10N::ooLocale::set(installedLocales[i], batch); commit 7c36e6ec7b00fa6be8ef5adbc7fd38b90a2c64e3 Author: Gökay Şatır <gokaysa...@gmail.com> AuthorDate: Wed May 31 11:58:09 2023 +0300 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Oct 11 15:20:57 2023 +0200 Remove the allowed language check from UI languages. Allowed langauges list is for spell checking algorithms. No need to use it for UI shortcuts. Signed-off-by: Gökay Şatır <gokaysa...@gmail.com> Change-Id: I996861b79247269e9b788b008fe6fc26e5ef44c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152416 Tested-by: Andras Timar <andras.ti...@collabora.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> (cherry picked from commit 1cd46ba9140b7f5f077d8e9da405b180857f008d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157812 Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 40c11e54d080..387eb95e0fa7 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7523,27 +7523,18 @@ static void preLoadShortCutAccelerators() { OUString language = LanguageTag(installedLocales[i]).getLocale().Language; - if (!comphelper::LibreOfficeKit::isAllowlistedLanguage(language)) - { - // Language is listed by COOL and also installed in core. We can create the short cut accelerator. - - // Set the UI language to current one, before creating the accelerator. - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); - officecfg::Setup::L10N::ooLocale::set(installedLocales[i], batch); - batch->commit(); + // Set the UI language to current one, before creating the accelerator. + std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); + officecfg::Setup::L10N::ooLocale::set(installedLocales[i], batch); + batch->commit(); - // Supported module names: Writer, Calc, Draw, Impress - std::vector<OUString> supportedModuleNames = { "com.sun.star.text.TextDocument", "com.sun.star.sheet.SpreadsheetDocument", "com.sun.star.drawing.DrawingDocument", "com.sun.star.presentation.PresentationDocument" }; - // Create the accelerators. - for (std::size_t j = 0; j < supportedModuleNames.size(); j++) - { - OUString key = supportedModuleNames[j] + installedLocales[i]; - acceleratorConfs[key] = svt::AcceleratorExecute::lok_createNewAcceleratorConfiguration(::comphelper::getProcessComponentContext(), supportedModuleNames[j]); - } - } - else + // Supported module names: Writer, Calc, Draw, Impress + std::vector<OUString> supportedModuleNames = { "com.sun.star.text.TextDocument", "com.sun.star.sheet.SpreadsheetDocument", "com.sun.star.drawing.DrawingDocument", "com.sun.star.presentation.PresentationDocument" }; + // Create the accelerators. + for (std::size_t j = 0; j < supportedModuleNames.size(); j++) { - std::cerr << "Language is installed in core but not in the list of COOL languages: " << language << "\n"; + OUString key = supportedModuleNames[j] + installedLocales[i]; + acceleratorConfs[key] = svt::AcceleratorExecute::lok_createNewAcceleratorConfiguration(::comphelper::getProcessComponentContext(), supportedModuleNames[j]); } }