[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-12-21 Thread Libreoffice Gerrit user
 i18npool/source/localedata/localedata.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e4fc7017ec672be095f1bc98c4f957de3c8ddae1
Author: Michael Meeks michael.me...@suse.com
Date:   Fri Dec 21 20:00:35 2012 +0100

getFunctionSymbolByName: make fall-back locale actually work

Change-Id: I7313cca3335e1b41df2a70fe968bc1e6386a1e36
(cherry picked from commit 896e326ace53bedf9b17fa624d260032b91bcfd1)

Signed-off-by: Eike Rathke er...@redhat.com

diff --git a/i18npool/source/localedata/localedata.cxx 
b/i18npool/source/localedata/localedata.cxx
index decd33f..af74991 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -447,7 +447,7 @@ oslGenericFunction SAL_CALL 
lcl_LookupTableHelper::getFunctionSymbolByName(
 for ( sal_Int16 i = 0; i  nbOfLocales; i++)
 {
 if (localeName.equalsAscii(aLibTable[i].pLocale) ||
-(bFallback  localeName == aFallback))
+(bFallback  aFallback.equalsAscii(aLibTable[i].pLocale)))
 {
 #ifndef DISABLE_DYNLOADING
 LocaleDataLookupTableItem* pCurrent = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-12-10 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/no_NO.xml |4 
 1 file changed, 4 insertions(+)

New commits:
commit 12281897cc5fa72357b6bce16d18d0356c7213d5
Author: Eike Rathke er...@redhat.com
Date:   Mon Dec 10 14:29:03 2012 +0100

fdo#52240 added [no-NO] date acceptance patterns D.M;D/M/Y;D/M;D/M Y

Also referenced by nb-NO and ny-NO
Changes as per http://erack.org/blog/archives/18-comments.html#c351

Change-Id: I9e07f4307800e99fdff21bccde91af4178b244f3
(cherry picked from commit 638993d9b80b3793dfd31db0dacba3746ceb98fd)
Reviewed-on: https://gerrit.libreoffice.org/1287
Reviewed-by: Kohei Yoshida kohei.yosh...@gmail.com
Tested-by: Kohei Yoshida kohei.yosh...@gmail.com

diff --git a/i18npool/source/localedata/data/no_NO.xml 
b/i18npool/source/localedata/data/no_NO.xml
index 2c01a21..beaf7a7 100644
--- a/i18npool/source/localedata/data/no_NO.xml
+++ b/i18npool/source/localedata/data/no_NO.xml
@@ -35,6 +35,10 @@
 MeasurementSystemMetric/MeasurementSystem
   /LC_CTYPE
   LC_FORMAT replaceFrom=[CURRENCY] replaceTo=[$kr-14]
+DateAcceptancePatternD.M/DateAcceptancePattern
+DateAcceptancePatternD/M/Y/DateAcceptancePattern
+DateAcceptancePatternD/M/DateAcceptancePattern
+DateAcceptancePatternD/M Y/DateAcceptancePattern
 FormatElement msgid=DateFormatskey1 default=true type=short 
usage=DATE formatindex=18
   FormatCodeDD.MM.YY/FormatCode
 /FormatElement
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-12-10 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/hr_HR.xml |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7d311177597d2f7e3bdf19a56b9f862da83588f4
Author: Eike Rathke er...@redhat.com
Date:   Mon Dec 10 14:36:31 2012 +0100

fdo#52240 added [hr-HR] date acceptance patterns D/M/Y;D/M

As per https://bugs.freedesktop.org/show_bug.cgi?id=52240#c59

(cherry picked from commit b1184f8a4e4a3949d38407c5f1d5155c2c2b42d5)

Change-Id: I83afc59e4ac71b18219ace60dcbcabafebd5b525
Reviewed-on: https://gerrit.libreoffice.org/1288
Reviewed-by: Kohei Yoshida kohei.yosh...@gmail.com
Tested-by: Kohei Yoshida kohei.yosh...@gmail.com

diff --git a/i18npool/source/localedata/data/hr_HR.xml 
b/i18npool/source/localedata/data/hr_HR.xml
index e5a0542..b9e25e7 100644
--- a/i18npool/source/localedata/data/hr_HR.xml
+++ b/i18npool/source/localedata/data/hr_HR.xml
@@ -36,6 +36,8 @@
   /LC_CTYPE
   LC_FORMAT replaceFrom=[CURRENCY] replaceTo=[$kn-41A]
 DateAcceptancePatternD.M/DateAcceptancePattern
+DateAcceptancePatternD/M/Y/DateAcceptancePattern
+DateAcceptancePatternD/M/DateAcceptancePattern
 FormatElement msgid=DateFormatskey1 default=false type=medium 
usage=DATE formatindex=34
   FormatCodeMM.YY/FormatCode
 /FormatElement
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-12-01 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/tr_TR.xml |   20 +---
 1 file changed, 17 insertions(+), 3 deletions(-)

New commits:
commit bc19a37be6a6c8538d8a7b07adedd754db17f1df
Author: Eike Rathke er...@redhat.com
Date:   Thu Nov 29 17:10:12 2012 +0100

resolved fdo#57668 additional date formats using '/' separator

Change-Id: Ib71fb25b8d5411b83f55649d9a18833470647eb3
Reviewed-on: https://gerrit.libreoffice.org/1196
Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/i18npool/source/localedata/data/tr_TR.xml 
b/i18npool/source/localedata/data/tr_TR.xml
index ca2d1ab..45ce90f 100644
--- a/i18npool/source/localedata/data/tr_TR.xml
+++ b/i18npool/source/localedata/data/tr_TR.xml
@@ -37,7 +37,9 @@
   LC_FORMAT
 DateAcceptancePatternD.M/DateAcceptancePattern
 DateAcceptancePatternD/M/DateAcceptancePattern
+DateAcceptancePatternD/M/Y/DateAcceptancePattern
 DateAcceptancePatternD-M/DateAcceptancePattern
+DateAcceptancePatternD-M-Y/DateAcceptancePattern
 FormatElement msgid=FixedFormatskey1 default=true type=medium 
usage=FIXED_NUMBER formatindex=0
   FormatCodeStandard/FormatCode
 /FormatElement
@@ -90,12 +92,12 @@
   FormatCodeDD.MM.YY/FormatCode
 /FormatElement
 FormatElement msgid=DateFormatskey9 default=true type=long 
usage=DATE formatindex=19
-  FormatCodeDD.MM.YY/FormatCode
+  FormatCodeD../FormatCode
 /FormatElement
-FormatElement msgid=DateFormatskey8 default=true type=medium 
usage=DATE formatindex=20
+FormatElement msgid=DateFormatskey8 default=false type=medium 
usage=DATE formatindex=20
   FormatCodeDD.MM.YY/FormatCode
 /FormatElement
-FormatElement msgid=DateFormatskey7 default=false type=medium 
usage=DATE formatindex=21
+FormatElement msgid=DateFormatskey7 default=true type=medium 
usage=DATE formatindex=21
   FormatCodeDD.MM./FormatCode
 /FormatElement
 FormatElement msgid=DateFormatskey10 default=false type=long 
usage=DATE formatindex=22
@@ -177,6 +179,18 @@
 FormatElement msgid=DateTimeFormatskey2 default=false type=medium 
usage=DATE_TIME formatindex=47
   FormatCodeDD.MM. HH:MM:SS/FormatCode
 /FormatElement
+FormatElement msgid=DateFormatskey22 default=false type=medium 
usage=DATE formatindex=51
+  FormatCodeDD/MM//FormatCode
+/FormatElement
+FormatElement msgid=DateFormatskey23 default=false type=short 
usage=DATE formatindex=52
+  FormatCodeDD/MM/YY/FormatCode
+/FormatElement
+FormatElement msgid=DateFormatskey24 default=false type=long 
usage=DATE formatindex=53
+  FormatCodeDD/MMM//FormatCode
+/FormatElement
+FormatElement msgid=DateTimeFormatskey3 default=false type=medium 
usage=DATE_TIME formatindex=54
+  FormatCodeDD/MM/ HH:MM:SS/FormatCode
+/FormatElement
   /LC_FORMAT
   LC_COLLATION ref=en_US /
   LC_SEARCH ref=en_US/
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-11-13 Thread Libreoffice Gerrit user
 i18npool/source/ordinalsuffix/ordinalsuffix.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 837aed5235fcf0468f13f12f29a0f498b92ab850
Author: Petr Mladek pmla...@suse.cz
Date:   Tue Nov 6 15:57:07 2012 +0100

fix build with icu-4.0

use functions already provided by icu-4.0

Change-Id: I238a499ae1bc2a7efeb4d61fbe780e24d7d36a7a
(cherry picked from commit 524461f1721d0fb7c5bd115d72ca82711e0ff950)

Signed-off-by: Caolán McNamara caol...@redhat.com

diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx 
b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
index a0760a0..3d7f560 100644
--- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
@@ -97,7 +97,9 @@ uno::Sequence OUString  SAL_CALL 
OrdinalSuffix::getOrdinalSuffix( sal_Int32 nN
 return retValue;
 
 icu::UnicodeString sFormatWithNoOrdinal;
-xNumberFormat-format((int32_t)nNumber, sFormatWithNoOrdinal, NULL, nCode);
+icu::Formattable ftmNumber((int32_t)nNumber);
+icu::FieldPosition icuPos;
+xNumberFormat-format(ftmNumber, sFormatWithNoOrdinal, icuPos, nCode);
 if (!U_SUCCESS(nCode))
 return retValue;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-11-13 Thread Libreoffice Gerrit user
 i18npool/source/ordinalsuffix/ordinalsuffix.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit bf26b6dd3a05eb3f6423fab5a815bbaf205f1649
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Nov 6 15:13:46 2012 +

WaE: duplicated variable name

Change-Id: Id42116f2ddfe679b1a995590e35a619ff8d82d7e
(cherry picked from commit fdc76a03f50e1291a90035befac67b8205c7e770)

Signed-off-by: Stephan Bergmann sberg...@redhat.com

diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx 
b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
index 3d7f560..4124c92 100644
--- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
@@ -98,8 +98,8 @@ uno::Sequence OUString  SAL_CALL 
OrdinalSuffix::getOrdinalSuffix( sal_Int32 nN
 
 icu::UnicodeString sFormatWithNoOrdinal;
 icu::Formattable ftmNumber((int32_t)nNumber);
-icu::FieldPosition icuPos;
-xNumberFormat-format(ftmNumber, sFormatWithNoOrdinal, icuPos, nCode);
+icu::FieldPosition icuPosA;
+xNumberFormat-format(ftmNumber, sFormatWithNoOrdinal, icuPosA, nCode);
 if (!U_SUCCESS(nCode))
 return retValue;
 
@@ -114,8 +114,8 @@ uno::Sequence OUString  SAL_CALL 
OrdinalSuffix::getOrdinalSuffix( sal_Int32 nN
 
 // format the string
 icu::UnicodeString sFormatWithOrdinal;
-icu::FieldPosition icuPos;
-formatter.format( (int32_t)nNumber, ruleSet, sFormatWithOrdinal, 
icuPos, nCode );
+icu::FieldPosition icuPosB;
+formatter.format((int32_t)nNumber, ruleSet, sFormatWithOrdinal, 
icuPosB, nCode);
 
 if (!U_SUCCESS(nCode))
 continue;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-10-24 Thread Libreoffice Gerrit user
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |4 
++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 607d0ceb066a30a490426a7e1aa60ad83fdb4ec5
Author: Lester lester.ka...@gmail.com
Date:   Tue Oct 23 15:27:33 2012 -0400

fdo#55732 display upper case greek letters in page numbering option

\n\nAll of the code for the constant defining greek upper case page 
numbering is correct, but the UI dialog that represents that constant displayed 
lower case greek letters, and vice versa. So, the dialog should display the 
proper characters.

Change-Id: Ib8d0a41928796fbed5f36162c35d6e1db2463e07
Reviewed-on: https://gerrit.libreoffice.org/904
Reviewed-by: Eike Rathke er...@redhat.com
Tested-by: Eike Rathke er...@redhat.com
(cherry picked from commit e89c99a8ce264173a9d9cbb6df09d7811d6b34cc)

Signed-off-by: Eike Rathke er...@redhat.com

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 8679b67..f380b16 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -942,8 +942,8 @@ static const Supported_NumberingType aSupportedTypes[] =
 {style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_N_SR, S_CYR_A ,  
S_CYR_B , ..,  S_CYR_A S_CYR_A ,  S_CYR_B S_CYR_B , ... (sr), LANG_ALL},
 {style::NumberingType::CHARS_PERSIAN,   NULL, LANG_CTL},
 {style::NumberingType::CHARS_PERSIAN_WORD,   NULL, LANG_CTL},
-{style::NumberingType::CHARS_GREEK_LOWER_LETTER,   C_GR_A ,  C_GR_B 
, ... (gr), LANG_ALL},
-{style::NumberingType::CHARS_GREEK_UPPER_LETTER,   S_GR_A ,  S_GR_B 
, ... (gr), LANG_ALL},
+{style::NumberingType::CHARS_GREEK_UPPER_LETTER,   C_GR_A ,  C_GR_B 
, ... (gr), LANG_ALL},
+{style::NumberingType::CHARS_GREEK_LOWER_LETTER,   S_GR_A ,  S_GR_B 
, ... (gr), LANG_ALL},
 };
 static const sal_Int32 nSupported_NumberingTypes = sizeof(aSupportedTypes) / 
sizeof(Supported_NumberingType);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-10-02 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/hu_HU.xml |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 29bd9606cf7c915a61f31418cf187de8f5aa84e9
Author: László Németh nem...@numbertext.org
Date:   Sat Sep 29 00:05:34 2012 +0200

Add back compatible Hungarian date format acceptance

Change-Id: I6b6d62cda241250db89cdcabaa04952d36e1acfd
Reviewed-on: https://gerrit.libreoffice.org/720
Reviewed-by: Thorsten Behrens tbehr...@suse.com
Tested-by: Thorsten Behrens tbehr...@suse.com
Signed-off-by: Andras Timar ati...@suse.com

diff --git a/i18npool/source/localedata/data/hu_HU.xml 
b/i18npool/source/localedata/data/hu_HU.xml
index dc3be12..8ad831e 100644
--- a/i18npool/source/localedata/data/hu_HU.xml
+++ b/i18npool/source/localedata/data/hu_HU.xml
@@ -35,6 +35,8 @@
 MeasurementSystemmetric/MeasurementSystem
   /LC_CTYPE
   LC_FORMAT
+DateAcceptancePatternM-D/DateAcceptancePattern
+DateAcceptancePatternM.D/DateAcceptancePattern
 FormatElement msgid=FixedFormatskey1 default=true type=medium 
usage=FIXED_NUMBER formatindex=0
   FormatCodeStandard/FormatCode
 /FormatElement
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-09-06 Thread Libreoffice Gerrit user
 i18npool/source/ordinalsuffix/ordinalsuffix.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 966c1bd122d8258dd8b1abfe638de7b1ce0d3c98
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Sep 5 10:00:37 2012 +0100

fdo#38242: Make autocorrect of 1st to 1 + superscripted st work again

It surely doesn't matter if the result of normalization is unchanged

(cherry picked from commit defe079d455ccc958fd0128e8a8cf0e4aeb5cd9c)

Change-Id: I87dfd0dadee33897f5df4b0dc532166a8bd9d7e5
Signed-off-by: Michael Stahl mst...@redhat.com

diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx 
b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
index 95e1341..aff018f 100644
--- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
@@ -89,7 +89,7 @@ uno::Sequence OUString  SAL_CALL 
OrdinalSuffix::getOrdinalSuffix( sal_Int32 nN
 icu::UnicodeString normalized;
 nCode = U_ZERO_ERROR;
 icu::Normalizer::normalize( icuRet, UNORM_NFKC, 0, normalized, 
nCode );
-if ( U_SUCCESS( nCode )  ( normalized != icuRet ) )
+if ( U_SUCCESS( nCode ) )
 {
 // Convert the normalized UnicodeString to OUString
 OUString sValue( reinterpret_castconst sal_Unicode *( 
normalized.getBuffer( ) ), normalized.length() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-09-06 Thread Libreoffice Gerrit user
 i18npool/source/ordinalsuffix/ordinalsuffix.cxx |  102 
 1 file changed, 69 insertions(+), 33 deletions(-)

New commits:
commit d344d772fc2490d02efc81bd6a5d155f013efd76
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Sep 5 11:31:10 2012 +0100

Resolves: fdo#54486 ensure ordinal format has non-ordinal prefix

Make sure that the ordinal format and the non-ordinal format match at the
start, so that the expectation can be verified that there is some trailing
ordinal suffix which can be extracted.

I'm not at all sure that this will be true for all languages.

Change-Id: Ib89a51cdd743db12bfe6e723a9acb61d9fe5e6ce
(cherry picked from commit a05357ab69712bec53c2d8d17efbbf25907ff9b8)

Signed-off-by: Michael Stahl mst...@redhat.com

diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx 
b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
index aff018f..a0760a0 100644
--- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
@@ -26,6 +26,7 @@
  *
  /
 
+#include boost/scoped_ptr.hpp
 #include comphelper/processfactory.hxx
 #include string.h
 #include ordinalsuffix.hxx
@@ -53,6 +54,23 @@ OrdinalSuffix::~OrdinalSuffix()
 {
 }
 
+namespace
+{
+OUString mungeUnicodeStringToOUString(const icu::UnicodeString rIn, 
UErrorCode rCode)
+{
+// Apply NFKC normalization to get normal letters
+icu::UnicodeString normalized;
+icu::Normalizer::normalize(rIn, UNORM_NFKC, 0, normalized, rCode);
+// Convert the normalized UnicodeString to OUString
+OUString sRet = (U_SUCCESS(rCode))
+? OUString(reinterpret_castconst sal_Unicode 
*(normalized.getBuffer()), normalized.length())
+: OUString();
+// replace any minus signs with hyphen-minus so that negative numbers
+// from the simple number formatter and heavy-duty pattern formatter
+// agree as to their negative number sign
+return sRet.replace(0x2212, '-');
+}
+}
 
 /*
  * For this method to properly return the ordinal suffix for other locales
@@ -69,46 +87,64 @@ uno::Sequence OUString  SAL_CALL 
OrdinalSuffix::getOrdinalSuffix( sal_Int32 nN
 CSTR( aLocale.Language ),
 CSTR( aLocale.Country ),
 CSTR( aLocale.Variant ) );
-icu::RuleBasedNumberFormat formatter(
-icu::URBNF_ORDINAL, rIcuLocale, nCode );
 
-if ( U_SUCCESS( nCode ) )
+icu::RuleBasedNumberFormat formatter(icu::URBNF_ORDINAL, rIcuLocale, 
nCode);
+if (!U_SUCCESS(nCode))
+return retValue;
+
+boost::scoped_ptrNumberFormat 
xNumberFormat(icu::NumberFormat::createInstance(rIcuLocale, nCode));
+if (!U_SUCCESS(nCode))
+return retValue;
+
+icu::UnicodeString sFormatWithNoOrdinal;
+xNumberFormat-format((int32_t)nNumber, sFormatWithNoOrdinal, NULL, nCode);
+if (!U_SUCCESS(nCode))
+return retValue;
+
+OUString sValueWithNoOrdinal = 
mungeUnicodeStringToOUString(sFormatWithNoOrdinal, nCode);
+if (!U_SUCCESS(nCode))
+return retValue;
+
+int32_t nRuleSets = formatter.getNumberOfRuleSetNames( );
+for (int32_t i = 0; i  nRuleSets; ++i)
 {
-int32_t nRuleSets = formatter.getNumberOfRuleSetNames( );
-for ( int32_t i = 0; i  nRuleSets; i++ )
-{
-icu::UnicodeString ruleSet = formatter.getRuleSetName( i );
-// format the string
-icu::UnicodeString icuRet;
-icu::FieldPosition icuPos;
-formatter.format( (int32_t)nNumber, ruleSet, icuRet, icuPos, nCode 
);
-
-if ( U_SUCCESS( nCode ) )
-{
-// Apply NFKC normalization to get normal letters
-icu::UnicodeString normalized;
-nCode = U_ZERO_ERROR;
-icu::Normalizer::normalize( icuRet, UNORM_NFKC, 0, normalized, 
nCode );
-if ( U_SUCCESS( nCode ) )
-{
-// Convert the normalized UnicodeString to OUString
-OUString sValue( reinterpret_castconst sal_Unicode *( 
normalized.getBuffer( ) ), normalized.length() );
-
-// Remove the number to get the prefix
-sal_Int32 len = OUString::valueOf( nNumber ).getLength( );
-
-sal_Int32 newLength = retValue.getLength() + 1;
-retValue.realloc( newLength );
-retValue[ newLength - 1 ] = sValue.copy( len );
-}
-}
-}
+icu::UnicodeString ruleSet = formatter.getRuleSetName(i);
+
+// format the string
+icu::UnicodeString sFormatWithOrdinal;
+icu::FieldPosition icuPos;
+formatter.format( (int32_t)nNumber, ruleSet, sFormatWithOrdinal, 
icuPos, nCode );
+
+if (!U_SUCCESS(nCode))
+continue;
+
+OUString 

[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-08-29 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/hr_HR.xml |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9019bbf37b0460407823d98134f87f355af54123
Author: Eike Rathke er...@redhat.com
Date:   Tue Aug 28 13:35:53 2012 +0200

fdo#52240 added D.M date acceptance pattern to [hr-HR]

Change-Id: I682bd186b571973acbe98a00af7f6a83ce83e9d4
Reviewed-on: https://gerrit.libreoffice.org/498
Reviewed-by: Kohei Yoshida kohei.yosh...@gmail.com
Tested-by: Kohei Yoshida kohei.yosh...@gmail.com

diff --git a/i18npool/source/localedata/data/hr_HR.xml 
b/i18npool/source/localedata/data/hr_HR.xml
index a6fa91a..e5a0542 100644
--- a/i18npool/source/localedata/data/hr_HR.xml
+++ b/i18npool/source/localedata/data/hr_HR.xml
@@ -35,6 +35,7 @@
 MeasurementSystemMetric/MeasurementSystem
   /LC_CTYPE
   LC_FORMAT replaceFrom=[CURRENCY] replaceTo=[$kn-41A]
+DateAcceptancePatternD.M/DateAcceptancePattern
 FormatElement msgid=DateFormatskey1 default=false type=medium 
usage=DATE formatindex=34
   FormatCodeMM.YY/FormatCode
 /FormatElement
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/source

2012-07-20 Thread Markus Mohrhard
 i18npool/source/localedata/data/de_AT.xml |1 +
 i18npool/source/localedata/data/de_CH.xml |1 +
 i18npool/source/localedata/data/de_LI.xml |1 +
 i18npool/source/localedata/data/de_LU.xml |1 +
 4 files changed, 4 insertions(+)

New commits:
commit 41306f222d7f3aa3fedcd2a9a91fd7558449a24e
Author: Eike Rathke er...@redhat.com
Date:   Fri Jul 20 17:51:39 2012 +0200

fdo#52240 added abbreviated date acceptance patterns for [de-{AT,CH,LI,LU}]

Change-Id: I589cedcd2db0208b03d1e28babbb493912f20c78

diff --git a/i18npool/source/localedata/data/de_AT.xml 
b/i18npool/source/localedata/data/de_AT.xml
index dde647e..69e93fc 100644
--- a/i18npool/source/localedata/data/de_AT.xml
+++ b/i18npool/source/localedata/data/de_AT.xml
@@ -35,6 +35,7 @@
 MeasurementSystemmetric/MeasurementSystem
   /LC_CTYPE
   LC_FORMAT
+DateAcceptancePatternD.M./DateAcceptancePattern
 FormatElement msgid=FixedFormatskey1 default=true type=medium 
usage=FIXED_NUMBER formatindex=0
   FormatCodeStandard/FormatCode
 /FormatElement
diff --git a/i18npool/source/localedata/data/de_CH.xml 
b/i18npool/source/localedata/data/de_CH.xml
index 7349e04..772e004 100644
--- a/i18npool/source/localedata/data/de_CH.xml
+++ b/i18npool/source/localedata/data/de_CH.xml
@@ -38,6 +38,7 @@
 MeasurementSystemmetric/MeasurementSystem
   /LC_CTYPE
   LC_FORMAT
+DateAcceptancePatternD.M./DateAcceptancePattern
 FormatElement msgid=FixedFormatskey1 default=true type=medium 
usage=FIXED_NUMBER formatindex=0
   FormatCodeStandard/FormatCode
 /FormatElement
diff --git a/i18npool/source/localedata/data/de_LI.xml 
b/i18npool/source/localedata/data/de_LI.xml
index 6e320b1..4abcc9e 100644
--- a/i18npool/source/localedata/data/de_LI.xml
+++ b/i18npool/source/localedata/data/de_LI.xml
@@ -35,6 +35,7 @@
 MeasurementSystemmetric/MeasurementSystem
   /LC_CTYPE
   LC_FORMAT
+DateAcceptancePatternD.M./DateAcceptancePattern
 FormatElement msgid=FixedFormatskey1 default=true type=medium 
usage=FIXED_NUMBER formatindex=0
   FormatCodeStandard/FormatCode
 /FormatElement
diff --git a/i18npool/source/localedata/data/de_LU.xml 
b/i18npool/source/localedata/data/de_LU.xml
index dc733c2..69a50bd 100644
--- a/i18npool/source/localedata/data/de_LU.xml
+++ b/i18npool/source/localedata/data/de_LU.xml
@@ -35,6 +35,7 @@
 MeasurementSystemmetric/MeasurementSystem
   /LC_CTYPE
   LC_FORMAT
+DateAcceptancePatternD.M./DateAcceptancePattern
 FormatElement msgid=FixedFormatskey1 default=true type=medium 
usage=FIXED_NUMBER formatindex=0
   FormatCodeStandard/FormatCode
 /FormatElement
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits