convertLanguageToLocaleImpl() speed-up a gazillion en-US fallback cases
Change-Id: I7f9290383eabcf3733f15f8f45193ee04db9852f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134953 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
This commit is contained in:
parent
aee953d7b6
commit
fd45045cc3
1 changed files with 10 additions and 0 deletions
|
@ -952,6 +952,16 @@ IsoLangOtherEntry const aImplPrivateUseEntries[] =
|
|||
void MsLangId::Conversion::convertLanguageToLocaleImpl( LanguageType nLang,
|
||||
css::lang::Locale & rLocale, bool bIgnoreOverride )
|
||||
{
|
||||
if (nLang == LANGUAGE_ENGLISH_US)
|
||||
{
|
||||
// Speed-up a gazillion fallback cases, not iterating through
|
||||
// aImplBcp47CountryEntries nor aImplIsoLangScriptEntries.
|
||||
rLocale.Language = "en";
|
||||
rLocale.Country = "US";
|
||||
rLocale.Variant.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
const Bcp47CountryEntry* pBcp47EntryOverride = nullptr;
|
||||
const IsoLanguageScriptCountryEntry* pScriptEntryOverride = nullptr;
|
||||
const IsoLanguageCountryEntry* pEntryOverride = nullptr;
|
||||
|
|
Loading…
Reference in a new issue