diff options
-rw-r--r-- | i18npool/Library_i18npool.mk | 1 | ||||
-rw-r--r-- | i18npool/source/breakiterator/breakiterator_unicode.cxx | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk index 955579f5abdd..5fe9e2cf3a36 100644 --- a/i18npool/Library_i18npool.mk +++ b/i18npool/Library_i18npool.mk @@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_libraries,i18npool,\ cppu \ cppuhelper \ i18nlangtag \ + i18nlangtagicu \ i18nutil \ sal \ $(gb_UWINAPI) \ diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx index 5b24f8131242..620bba10c5a8 100644 --- a/i18npool/source/breakiterator/breakiterator_unicode.cxx +++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx @@ -19,6 +19,8 @@ #include <breakiterator_unicode.hxx> #include <localedata.hxx> +#include <i18nlangtag/languagetag.hxx> +#include <i18nlangtag/languagetagicu.hxx> #include <unicode/uchar.h> #include <unicode/locid.h> #include <unicode/rbbi.h> @@ -148,10 +150,7 @@ void SAL_CALL BreakIterator_Unicode::loadICUBreakIterator(const com::sun::star:: } if (!icuBI->aBreakIterator) { - icu::Locale icuLocale( - OUStringToOString(rLocale.Language, RTL_TEXTENCODING_ASCII_US).getStr(), - OUStringToOString(rLocale.Country, RTL_TEXTENCODING_ASCII_US).getStr(), - OUStringToOString(rLocale.Variant, RTL_TEXTENCODING_ASCII_US).getStr()); + icu::Locale icuLocale( LanguageTagIcu::getIcuLocale( LanguageTag( rLocale))); status = U_ZERO_ERROR; switch (rBreakType) { |