summaryrefslogtreecommitdiffstats
path: root/i18npool/inc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-03-13 16:35:46 +0100
committerEike Rathke <erack@redhat.com>2013-03-13 16:48:12 +0100
commitfb26196ce64979ab6dc6c82c0fbdeedb126a3433 (patch)
treeac64c22c90d8ac98e9ae0346e39bbefb5e4ec119 /i18npool/inc
parentdrop unused resources and toggle label to activate replacement widget (diff)
downloadcore-fb26196ce64979ab6dc6c82c0fbdeedb126a3433.tar.gz
core-fb26196ce64979ab6dc6c82c0fbdeedb126a3433.zip
added LanguageTag::equals(), fdo#62278 related
Change-Id: I6471f8eaa46d9203c75569436b233a09fe337910
Diffstat (limited to 'i18npool/inc')
-rw-r--r--i18npool/inc/i18npool/languagetag.hxx24
1 files changed, 22 insertions, 2 deletions
diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx
index ff8266d2de79..7dedc8f16bbc 100644
--- a/i18npool/inc/i18npool/languagetag.hxx
+++ b/i18npool/inc/i18npool/languagetag.hxx
@@ -236,10 +236,30 @@ public:
*/
::std::vector< OUString > getFallbackStrings() const;
- /* Test equality of two LangageTag. */
+ /** Test equality of two LanguageTag, possibly resolving system locale.
+
+ @param bResolveSystem
+ If TRUE, resolve empty language tags denoting the system
+ locale to the real locale used before comparing.
+ If FALSE, the behavior is identical to operator==(), system
+ locales are not resolved first.
+ */
+ bool equals( const LanguageTag & rLanguageTag, bool bResolveSystem = false ) const;
+
+ /** Test equality of two LanguageTag.
+
+ Does NOT resolve system, i.e. if the system locale is en-US
+ LanguageTag("")==LanguageTag("en-US") returns false! Use
+ equals(...,true) instead if system locales shall be resolved.
+ */
bool operator==( const LanguageTag & rLanguageTag ) const;
- /* Test inequality of two LangageTag. */
+ /** Test inequality of two LanguageTag.
+
+ Does NOT resolve system, i.e. if the system locale is en-US
+ LanguageTag("")!=LanguageTag("en-US") returns true! Use
+ !equals(,...true) instead if system locales shall be resolved.
+ */
bool operator!=( const LanguageTag & rLanguageTag ) const;
private: