summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorGökay Şatır <gokaysatir@gmail.com>2023-05-31 11:58:09 +0300
committerAndras Timar <andras.timar@collabora.com>2023-06-02 13:43:13 +0200
commit1cd46ba9140b7f5f077d8e9da405b180857f008d (patch)
tree8837e751f43f6962f5ce1e5ed5e0315ec4fad034 /desktop
parentf1ff0918b11ea2f15267759af8412f208ee39783 (diff)
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 <gokaysatir@gmail.com> Change-Id: I996861b79247269e9b788b008fe6fc26e5ef44c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152416 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx29
1 files changed, 10 insertions, 19 deletions
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]);
}
}