summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-04-24 23:53:49 +0200
committerEike Rathke <erack@redhat.com>2013-04-25 00:01:08 +0200
commitbe35d10c9124d4559e54444ccd1f70b334047c13 (patch)
treeeef2d0fb33c4d1cca5d15dfd87051b8a1f79adf6 /i18npool
parent0cb65cee8a700afdcde945e5a8291b6498042bb9 (diff)
use LanguageTagIcu
Change-Id: I1e66fa3edb2ddf2b6d6f4cdd25104772ff02c70a
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/ordinalsuffix/ordinalsuffix.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
index 45306cfe52c9..953c8868eee4 100644
--- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
@@ -18,6 +18,8 @@
*/
#include <boost/scoped_ptr.hpp>
+#include <i18nlangtag/languagetag.hxx>
+#include <i18nlangtag/languagetagicu.hxx>
#include <comphelper/processfactory.hxx>
#include <string.h>
#include "ordinalsuffix.hxx"
@@ -25,8 +27,6 @@
#include <unicode/rbnf.h>
#include <unicode/normlzr.h>
-#define CSTR( ouStr ) OUStringToOString( ouStr, RTL_TEXTENCODING_UTF8 ).getStr( )
-
using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
@@ -72,10 +72,7 @@ uno::Sequence< OUString > SAL_CALL OrdinalSuffix::getOrdinalSuffix( sal_Int32 nN
// Get the value from ICU
UErrorCode nCode = U_ZERO_ERROR;
- const icu::Locale rIcuLocale(
- CSTR( aLocale.Language ),
- CSTR( aLocale.Country ),
- CSTR( aLocale.Variant ) );
+ const icu::Locale rIcuLocale( LanguageTagIcu::getIcuLocale( LanguageTag( aLocale)));
icu::RuleBasedNumberFormat formatter(icu::URBNF_ORDINAL, rIcuLocale, nCode);
if (!U_SUCCESS(nCode))