added isOnTheFlyID()

Change-Id: Ifddbec485814e3287e671e6bc4059689ca3f6c93
This commit is contained in:
Eike Rathke
2013-09-20 15:39:06 +02:00
parent e81359a9a3
commit 01bde208ac
2 changed files with 14 additions and 0 deletions

View File

@@ -126,6 +126,17 @@ static LanguageType getNextOnTheFlyLanguage()
}
// static
bool LanguageTag::isOnTheFlyID( LanguageType nLang )
{
LanguageType nPri = MsLangId::getPrimaryLanguage( nLang);
LanguageType nSub = MsLangId::getSubLanguage( nLang);
return
LANGUAGE_ON_THE_FLY_START <= nPri && nPri <= LANGUAGE_ON_THE_FLY_END &&
LANGUAGE_ON_THE_FLY_SUB_START <= nSub && nSub <= LANGUAGE_ON_THE_FLY_SUB_END;
}
/** A reference holder for liblangtag data de/initialization, one static
instance. Currently implemented such that the first "ref" inits and dtor
(our library deinitialized) tears down.

View File

@@ -484,6 +484,9 @@ public:
*/
static com::sun::star::lang::Locale convertToLocaleWithFallback( const OUString& rBcp47 );
/** If nLang is a generated on-the-fly LangID */
static bool isOnTheFlyID( LanguageType nLang );
typedef ::boost::shared_ptr< LanguageTagImpl > ImplPtr;
private: