Kaydet (Commit) 78280848 authored tarafından Eike Rathke's avatar Eike Rathke

eliminated lookupFallbackLanguage(LanguageType)

Change-Id: I2c69fce56151d4afcf5a68c29fd6755ff4f3b8dd
üst a829a352
......@@ -767,12 +767,6 @@ static const MsLangId::IsoLangEntry & lcl_lookupFallbackEntry( LanguageType nLan
return aLastResortFallbackEntry;
}
// static
LanguageType MsLangId::Conversion::lookupFallbackLanguage( LanguageType nLang )
{
return lcl_lookupFallbackEntry( nLang).mnLang;
}
// static
::com::sun::star::lang::Locale MsLangId::Conversion::lookupFallbackLocale( LanguageType nLang )
......
......@@ -1120,22 +1120,12 @@ LanguageTag & LanguageTag::makeFallback()
{
if (!mbIsFallback)
{
if (mbInitializedLangID)
{
LanguageType nLang1 = getLanguageType();
LanguageType nLang2 = MsLangId::Conversion::lookupFallbackLanguage( nLang1);
if (nLang1 != nLang2)
reset( nLang2);
}
else
{
const lang::Locale& rLocale1 = getLocale();
lang::Locale aLocale2( MsLangId::Conversion::lookupFallbackLocale( rLocale1));
if ( rLocale1.Language != aLocale2.Language ||
rLocale1.Country != aLocale2.Country ||
rLocale1.Variant != aLocale2.Variant)
reset( aLocale2);
}
const lang::Locale& rLocale1 = getLocale( true);
lang::Locale aLocale2( MsLangId::Conversion::lookupFallbackLocale( rLocale1));
if ( rLocale1.Language != aLocale2.Language ||
rLocale1.Country != aLocale2.Country ||
rLocale1.Variant != aLocale2.Variant)
reset( aLocale2);
mbIsFallback = true;
}
return *this;
......
......@@ -247,8 +247,6 @@ public:
LanguageType nLang, OUString& rLangStr, OUString& rCountry );
I18NLANGTAG_DLLPRIVATE static LanguageType lookupFallbackLanguage( LanguageType nLang );
I18NLANGTAG_DLLPRIVATE static ::com::sun::star::lang::Locale lookupFallbackLocale(
const ::com::sun::star::lang::Locale & rLocale );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment