summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx6
-rw-r--r--include/i18nlangtag/languagetag.hxx5
2 files changed, 11 insertions, 0 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 054c7c3c154d..be6fa03f13b6 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -2086,6 +2086,12 @@ bool LanguageTag::operator!=( const LanguageTag & rLanguageTag ) const
}
+bool LanguageTag::operator<( const LanguageTag & rLanguageTag ) const
+{
+ return getLanguageType() < rLanguageTag.getLanguageType();
+}
+
+
// static
LanguageTagImpl::Extraction LanguageTagImpl::simpleExtract( const OUString& rBcp47,
OUString& rLanguage, OUString& rScript, OUString& rCountry, OUString& rVariants )
diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx
index b8a63479951f..7f06f922b3cd 100644
--- a/include/i18nlangtag/languagetag.hxx
+++ b/include/i18nlangtag/languagetag.hxx
@@ -399,6 +399,11 @@ public:
*/
bool operator!=( const LanguageTag & rLanguageTag ) const;
+ /** Test this less than that.
+
+ For sorted containers. Internally uses the LanguageType for comparison.
+ */
+ bool operator<( const LanguageTag & rLanguageTag ) const;
/** Convert MS-LangID to Locale.