Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3670
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/70/3670/1
use LanguageTagIcu
Change-Id: I1e66fa3edb2ddf2b6d6f4cdd25104772ff02c70a
---
M i18npool/source/ordinalsuffix/ordinalsuffix.cxx
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
index 45306cf..953c886 100644
--- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
@@ -18,14 +18,14 @@
*/
#include <boost/scoped_ptr.hpp>
+#include <i18nlangtag/languagetag.hxx>
+#include <i18nlangtag/languagetagicu.hxx>
#include <comphelper/processfactory.hxx>
#include <string.h>
#include "ordinalsuffix.hxx"
#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;
@@ -72,10 +72,7 @@
// 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))
--
To view, visit https://gerrit.libreoffice.org/3670
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e66fa3edb2ddf2b6d6f4cdd25104772ff02c70a
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Eike Rathke <erack@redhat.com>
Context
- [PATCH] use LanguageTagIcu · Eike Rathke (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.