desktop/source/lib/init.cxx |   29 ++++++++++-------------------
 1 file changed, 10 insertions(+), 19 deletions(-)

New commits:
commit 1cd46ba9140b7f5f077d8e9da405b180857f008d
Author:     Gökay Şatır <gokaysa...@gmail.com>
AuthorDate: Wed May 31 11:58:09 2023 +0300
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jun 2 13:43:13 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>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 560d6bf990b1..58f9331cb992 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7219,27 +7219,18 @@ 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]);
         }
     }
 

Reply via email to