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

added isOnTheFlyID()

Change-Id: Ifddbec485814e3287e671e6bc4059689ca3f6c93
üst e81359a9
...@@ -126,6 +126,17 @@ static LanguageType getNextOnTheFlyLanguage() ...@@ -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 /** A reference holder for liblangtag data de/initialization, one static
instance. Currently implemented such that the first "ref" inits and dtor instance. Currently implemented such that the first "ref" inits and dtor
(our library deinitialized) tears down. (our library deinitialized) tears down.
......
...@@ -484,6 +484,9 @@ public: ...@@ -484,6 +484,9 @@ public:
*/ */
static com::sun::star::lang::Locale convertToLocaleWithFallback( const OUString& rBcp47 ); 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; typedef ::boost::shared_ptr< LanguageTagImpl > ImplPtr;
private: private:
......
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