Kaydet (Commit) be35d10c authored tarafından Eike Rathke's avatar Eike Rathke

use LanguageTagIcu

Change-Id: I1e66fa3edb2ddf2b6d6f4cdd25104772ff02c70a
üst 0cb65cee
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
*/ */
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <i18nlangtag/languagetag.hxx>
#include <i18nlangtag/languagetagicu.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <string.h> #include <string.h>
#include "ordinalsuffix.hxx" #include "ordinalsuffix.hxx"
...@@ -25,8 +27,6 @@ ...@@ -25,8 +27,6 @@
#include <unicode/rbnf.h> #include <unicode/rbnf.h>
#include <unicode/normlzr.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::i18n;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
using namespace ::com::sun::star; using namespace ::com::sun::star;
...@@ -72,10 +72,7 @@ uno::Sequence< OUString > SAL_CALL OrdinalSuffix::getOrdinalSuffix( sal_Int32 nN ...@@ -72,10 +72,7 @@ uno::Sequence< OUString > SAL_CALL OrdinalSuffix::getOrdinalSuffix( sal_Int32 nN
// Get the value from ICU // Get the value from ICU
UErrorCode nCode = U_ZERO_ERROR; UErrorCode nCode = U_ZERO_ERROR;
const icu::Locale rIcuLocale( const icu::Locale rIcuLocale( LanguageTagIcu::getIcuLocale( LanguageTag( aLocale)));
CSTR( aLocale.Language ),
CSTR( aLocale.Country ),
CSTR( aLocale.Variant ) );
icu::RuleBasedNumberFormat formatter(icu::URBNF_ORDINAL, rIcuLocale, nCode); icu::RuleBasedNumberFormat formatter(icu::URBNF_ORDINAL, rIcuLocale, nCode);
if (!U_SUCCESS(nCode)) if (!U_SUCCESS(nCode))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment