summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/lib/init.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c54fb771080c..4cf69495f10c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -91,6 +91,8 @@
#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
#include <com/sun/star/linguistic2/XSpellChecker.hpp>
+#include <com/sun/star/i18n/Calendar2.hpp>
+#include <com/sun/star/i18n/LocaleCalendar2.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
@@ -5661,6 +5663,14 @@ static void preloadData()
}
std::cerr << "\n";
+ // Hack to load and cache the module liblocaledata_others.so which is not loaded normally
+ // (when loading dictionaries of just non-Asian locales). Creating a XCalendar4 of one Asian locale
+ // will cheaply load this missing "others" locale library. Appending an Asian locale in
+ // LOK_WHITELIST_LANGUAGES env-var also works but at the cost of loading that dictionary.
+ css::uno::Reference< css::i18n::XCalendar4 > xCal = css::i18n::LocaleCalendar2::create(comphelper::getProcessComponentContext());
+ css::lang::Locale aAsianLocale = {"hi", "IN", ""};
+ xCal->loadDefaultCalendar(aAsianLocale);
+
// preload all available thesauri
css::uno::Reference<linguistic2::XThesaurus> xThesaurus(xLngSvcMgr->getThesaurus());
css::uno::Reference<linguistic2::XSupportedLocales> xThesLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);