diff options
author | Eike Rathke <erack@redhat.com> | 2013-01-09 16:48:52 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-01-09 16:59:47 +0100 |
commit | 241ccc2568dd685d224f8a2b051c3e3a018d9400 (patch) | |
tree | da12883cfc55e669e9fff14452b74c1825f4eff3 /linguistic/inc | |
parent | a0bf71323741c5c58b77651fe656c73419dbf09f (diff) |
resolved fdo#58503 restore awkward handling of empty locale for legacy
Partly reverts d7a5ec62e91ce3dc5b784815254218f16181f676
An empty locale was treated as LANGUAGE_NONE, effectively being
interpreted as absence or undetermined or multiple or all depending on
context. Restore this behavior as it was an undocumented feature of the
API.
Change-Id: If4b1641e776d10dea0d3037f7a62725c2b8d612c
Diffstat (limited to 'linguistic/inc')
-rw-r--r-- | linguistic/inc/linguistic/misc.hxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/linguistic/inc/linguistic/misc.hxx b/linguistic/inc/linguistic/misc.hxx index d3874d1a02ef..8b54d2889d4f 100644 --- a/linguistic/inc/linguistic/misc.hxx +++ b/linguistic/inc/linguistic/misc.hxx @@ -98,6 +98,24 @@ LocaleDataWrapper & GetLocaleDataWrapper( sal_Int16 nLang ); sal_Int32 LevDistance( const rtl::OUString &rTxt1, const rtl::OUString &rTxt2 ); +/** Convert Locale to LanguageType for legacy handling. + Linguistic specific handling of an empty locale denoting LANGUAGE_NONE. + Does not resolve empty locale as system locale. + */ +LNG_DLLPUBLIC LanguageType LinguLocaleToLanguage( const ::com::sun::star::lang::Locale& rLocale ); + +/** Convert LanguageType to Locale for legacy handling. + Linguistic specific handling of LANGUAGE_NONE resulting in an empty locale. + Avoid use! + */ +LNG_DLLPUBLIC ::com::sun::star::lang::Locale LinguLanguageToLocale( LanguageType nLanguage ); + +/** Checks if a LanguageType is one of the values that denote absence of + language or undetermined language or multiple languages, in short all + values used in linguistic context that do not denote a specific language. + */ +LNG_DLLPUBLIC bool LinguIsUnspecified( LanguageType nLanguage ); + ::com::sun::star::uno::Sequence< sal_Int16 > LocaleSeqToLangSeq( ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > &rLocaleSeq ); |