summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-08-30 20:23:02 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-08-31 08:35:06 +0000
commit76538731fb60c8563c5538101bdafe5434b681b8 (patch)
tree54f51fbd52b7b557431c94a1cf25d28e420c0287
parente3cc5adb5999c51aa732befdfbe328c8e885fb22 (diff)
Resolves: tdf#83376 do not let linguistic tools fall back to known languages
Falling back to known locales was necessary before the new language tag implementation that can register "unknown" tags on the fly. In fact here we want to handle tags unknown to us and not fall back to worst case en-US even, so that dictionaries, grammar checkers, thesauri et al for any language tag can be used with such tagged document content. Change-Id: I06e54f41e00e69779b4c0cbbc891f250545a17d2 (cherry picked from commit 04311182b6fadcbdeef7aec15c7eea0240ee628c) Reviewed-on: https://gerrit.libreoffice.org/28505 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--linguistic/source/lngsvcmgr.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index a1c06675a51b..5023d6eb913a 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -866,7 +866,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
LanguageType nLang = LANGUAGE_NONE;
if (!aKeyText.isEmpty())
- nLang = LanguageTag::convertToLanguageTypeWithFallback( aKeyText );
+ nLang = LanguageTag::convertToLanguageType( aKeyText );
GetSpellCheckerDsp_Impl( false ); // don't set service list, it will be done below
pSpellDsp->SetServiceList( LanguageTag::convertToLocale(nLang), aSvcImplNames );
@@ -890,7 +890,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
LanguageType nLang = LANGUAGE_NONE;
if (!aKeyText.isEmpty())
- nLang = LanguageTag::convertToLanguageTypeWithFallback( aKeyText );
+ nLang = LanguageTag::convertToLanguageType( aKeyText );
if (SvtLinguConfig().HasGrammarChecker())
{
@@ -917,7 +917,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
LanguageType nLang = LANGUAGE_NONE;
if (!aKeyText.isEmpty())
- nLang = LanguageTag::convertToLanguageTypeWithFallback( aKeyText );
+ nLang = LanguageTag::convertToLanguageType( aKeyText );
GetHyphenatorDsp_Impl( false ); // don't set service list, it will be done below
pHyphDsp->SetServiceList( LanguageTag::convertToLocale(nLang), aSvcImplNames );
@@ -941,7 +941,7 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
LanguageType nLang = LANGUAGE_NONE;
if (!aKeyText.isEmpty())
- nLang = LanguageTag::convertToLanguageTypeWithFallback( aKeyText );
+ nLang = LanguageTag::convertToLanguageType( aKeyText );
GetThesaurusDsp_Impl( false ); // don't set service list, it will be done below
pThesDsp->SetServiceList( LanguageTag::convertToLocale(nLang), aSvcImplNames );