diff options
author | Eike Rathke <erack@redhat.com> | 2013-07-11 16:46:20 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-07-11 17:48:14 +0200 |
commit | 00de85cc75e3501a5597c2f293407b1b76fef429 (patch) | |
tree | e8110972db71d069f7d8b88b3793d4938a1c8050 /include/i18nlangtag/languagetag.hxx | |
parent | 547affaf66ea063970438e321e98b0f788a3027c (diff) |
added getMatchingFallback()
Change-Id: I5805ab98049bd7dfd8ca1b58632f6c0115197bdd
Diffstat (limited to 'include/i18nlangtag/languagetag.hxx')
-rw-r--r-- | include/i18nlangtag/languagetag.hxx | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx index d779f9d921bf..bbda176a8f20 100644 --- a/include/i18nlangtag/languagetag.hxx +++ b/include/i18nlangtag/languagetag.hxx @@ -273,7 +273,7 @@ public: ::std::vector< OUString > getFallbackStrings() const; - /** @short search for an equal or at least for a similar locale in a list + /** @short Search for an equal or at least for a similar locale in a list of possible ones. @descr First search for a locale that is equal to the reference @@ -306,12 +306,39 @@ public: @return An iterator that points to the found element inside the given locale list. If no matching locale could be found it points to - the end of the list. + the beginning of the list. */ static ::std::vector< OUString >::const_iterator getFallback( const ::std::vector< OUString > & rList, const OUString & rReference ); + /** @short Search for an equal or for a similar locale in a list + of possible ones where at least the language matches. + + @descr First search for a locale that is equal to the reference + locale. + + If the reference locale could not be located, check for + "similar" locales, in the same order as obtained by + getFallbackStrings(). + + If no locale matches, rList.end() is returned. + + @param rList + the vector of possible locales. + + @param rReference + the reference locale. + + @return An iterator that points to the found element inside the given + locale list. If no matching locale could be found it points to + the end of the list. + */ + static ::std::vector< com::sun::star::lang::Locale >::const_iterator getMatchingFallback( + const ::std::vector< com::sun::star::lang::Locale > & rList, + const com::sun::star::lang::Locale & rReference ); + + /** Test equality of two LanguageTag, possibly resolving system locale. @param bResolveSystem |