diff options
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/spellcheck/spell/sspellimp.cxx | 4 | ||||
-rw-r--r-- | lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 694bc1aa27e4..12b9e240fa24 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -20,6 +20,7 @@ #include <com/sun/star/uno/Reference.h> #include <com/sun/star/linguistic2/SpellFailure.hpp> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <cppuhelper/factory.hxx> #include <cppuhelper/supportsservice.hxx> @@ -156,6 +157,9 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales() { for (auto const& locale : aLocaleNames) { + if (!comphelper::LibreOfficeKit::isWhitelistedLanguage(locale)) + continue; + aLocaleNamesSet.insert(locale); } } diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 88a6550ddf5e..ce1d4a07f492 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/linguistic2/XSpellChecker1.hpp> #include <i18nlangtag/languagetag.hxx> #include <tools/debug.hxx> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <osl/mutex.hxx> #include <unotools/pathoptions.hxx> @@ -174,6 +175,9 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales() sal_Int32 nLen2 = aLocaleNames.getLength(); for (k = 0; k < nLen2; ++k) { + if (!comphelper::LibreOfficeKit::isWhitelistedLanguage(aLocaleNames[k])) + continue; + aLocaleNamesSet.insert( aLocaleNames[k] ); } } |