[Libreoffice-commits] core.git: i18npool/source

2021-05-05 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/en_HK.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 581ac7e27ae6f8faf197c4f6962e05e9bed37351
Author: Eike Rathke 
AuthorDate: Wed May 5 22:31:46 2021 +0200
Commit: Eike Rathke 
CommitDate: Thu May 6 00:40:12 2021 +0200

Derive en_HK calendar from en_US instead of en_GB

Reason is that en_US start day of week is Sunday and en_GB is to
be changed to Monday but en_HK is to be kept on Sunday.
See also https://lh.2xlibre.net/locale/en_HK/ that does not
override First day of week (first_weekday).

Change-Id: I7f1b4059a23c8a6cdf6e30a3a6d18e2b911f4974
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115159
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/en_HK.xml 
b/i18npool/source/localedata/data/en_HK.xml
index e0d913b912ac..ec8d53fb4b6b 100644
--- a/i18npool/source/localedata/data/en_HK.xml
+++ b/i18npool/source/localedata/data/en_HK.xml
@@ -24,7 +24,7 @@
   
   
   
-  
+  
   
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2021-04-10 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/ja_JP.xml |   30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit cdab3bec73a0a5137b8d102f5781f88231721db3
Author: Eike Rathke 
AuthorDate: Sat Apr 10 18:10:30 2021 +0200
Commit: Eike Rathke 
CommitDate: Sat Apr 10 23:00:04 2021 +0200

Quote literals in {ja-JP} date and time format codes

Because when loading number formats from ODF literal text is
enquoted that resulted in duplicated formats that differed only in
quoted literals vs unquoted literals with identical functionality,
but unnecessarily polluting the number formats list.

Since

commit 5d1042cbd25b22babaf8b30bc4edff6f70750b5e
CommitDate: Sat Apr 10 03:49:37 2021 +0200

ODF load: use AAA/ instead of NN/NNN(N) for implicit
secondary calendar

these predefined format codes now load actually identical.

Change-Id: I02b5367ecd8ddab4419a56ba4d1c3ac4233142b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113925
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/ja_JP.xml 
b/i18npool/source/localedata/data/ja_JP.xml
index d75f9712cf72..9319d07f9036 100644
--- a/i18npool/source/localedata/data/ja_JP.xml
+++ b/i18npool/source/localedata/data/ja_JP.xml
@@ -114,7 +114,7 @@
   YY/M/D
 
 
-  年MM月DD日()
+  "年"MM"月"DD"日("")"
 
 
   YY/MM/DD
@@ -123,31 +123,31 @@
   /MM/DD
 
 
-  YY年M月D日
+  YY"年"M"月"D"日"
 
 
-  年M月D日
+  "年"M"月"D"日"
 
 
-  GGGE年M月D日
+  GGGE"年"M"月"D"日"
 
 
-  年M月D日
+  "年"M"月"D"日"
 
 
-  GGGE年M月D日()
+  GGGE"年"M"月"D"日("")"
 
 
-  YY年M月D日(AAA)
+  YY"年"M"月"D"日("AAA")"
 
 
-  GGGE年M月D日(AAA)
+  GGGE"年"M"月"D"日("AAA")"
 
 
-  年M月D日(AAA)
+  "年"M"月"D"日("AAA")"
 
 
-  年M月D日()
+  "年"M"月"D"日("")"
 
 
   "年("GGGE"年)"MM"月"DD"日"
@@ -169,13 +169,13 @@
   YY/MM
 
 
-  M月D日
+  M"月"D"日"
 
 
-  M月
+  M"月"
 
 
-  YY年 QQ
+  YY"年 "QQ
 
 
   WW 1
@@ -202,10 +202,10 @@
   [HH]:MM:SS.00
 
 
-  H時MM分
+  H"時"MM"分"
 
 
-  H時MM分SS秒
+  H"時"MM"分"SS"秒"
 
 
   YY/MM/DD HH:MM
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sc/source

2021-04-05 Thread Mike Kaganski (via logerrit)
 i18npool/source/search/levdis.cxx  |   62 +
 i18npool/source/search/levdis.hxx  |4 --
 sc/source/filter/html/htmlpars.cxx |   28 +---
 3 files changed, 11 insertions(+), 83 deletions(-)

New commits:
commit 995b3186fa2126d1b299052a90a75cf32d5bfa26
Author: Mike Kaganski 
AuthorDate: Mon Apr 5 15:12:04 2021 +0300
Commit: Mike Kaganski 
CommitDate: Mon Apr 5 15:16:23 2021 +0200

Use std algorithms here

Change-Id: Ib7bb92cca1f52067f9030b6c6fdc088409ca10ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113601
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/i18npool/source/search/levdis.cxx 
b/i18npool/source/search/levdis.cxx
index 5842abd1eef5..dd9f8fbf587a 100644
--- a/i18npool/source/search/levdis.cxx
+++ b/i18npool/source/search/levdis.cxx
@@ -56,6 +56,7 @@
 */
 
 #include 
+#include 
 
 #include "levdis.hxx"
 
@@ -119,7 +120,7 @@ int WLevDistance::WLD( const sal_Unicode* cString, 
sal_Int32 nStringLen )
 nP = 0; // a '?' could be any character.
 else
 // Minimum of replacement and deletion+insertion weighting
-nP = Min3( nRepP0, nRepP0, nDelR0 + nInsQ0 );
+nP = std::min({ nRepP0, nRepP0, nDelR0 + nInsQ0 });
 npDistance[0] = nInsQ0; // start with simple insert
 npDistance[1] = nInsQ0;
 npDistance[2] = nInsQ0;
@@ -150,7 +151,7 @@ int WLevDistance::WLD( const sal_Unicode* cString, 
sal_Int32 nStringLen )
 }
 }
 }
-nSPMin = Min3( npDistance[0], npDistance[1], npDistance[2] );
+nSPMin = std::min({ npDistance[0], npDistance[1], npDistance[2] });
 }
 
 // calculate distance matrix
@@ -203,7 +204,7 @@ int WLevDistance::WLD( const sal_Unicode* cString, 
sal_Int32 nStringLen )
 // WLD( X(i), Y(j) ) = min( WLD( X(i-1), Y(j-1) ) + p(i,j) ,
 //  WLD( X(i)  , Y(j-1) ) + q  ,
 //  WLD( X(i-1), Y(j)   ) + r  )
-npDistance[i] = Min3( d1 + nPij, d2 + nQ, npDistance[i-1] + nR );
+npDistance[i] = std::min({ d1 + nPij, d2 + nQ, npDistance[i-1] + 
nR });
 if ( npDistance[i] < nSPMin )
 nSPMin = npDistance[i];
 if ( bSplitCount )
@@ -263,63 +264,27 @@ void WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool 
bRelaxed )
 if ( nX < 0 ) nX = 0;   // only positive values
 if ( nY < 0 ) nY = 0;
 if ( nZ < 0 ) nZ = 0;
-if (0 == Min3( nX, nY, nZ ))// at least one 0
+if (0 == std::min({ nX, nY, nZ })) // at least one 0
 {
 int nMid, nMax;
-nMax = Max3( nX, nY, nZ );  // either 0 for three 0s or Max
+nMax = std::max({ nX, nY, nZ }); // either 0 for three 0s or Max
 if ( 0 == (nMid = Mid3( nX, nY, nZ )) ) // even two 0
 nLimit = nMax;  // either 0 or the only one >0
 else// one is 0
-nLimit = LCM( nMid, nMax );
+nLimit = std::lcm( nMid, nMax );
 }
 else// all three of them are not 0
-nLimit = LCM( LCM( nX, nY ), nZ );
+nLimit = std::lcm(std::lcm(nX, nY), nZ);
 nRepP0 = ( nX ? nLimit / nX : nLimit + 1 );
 nInsQ0 = ( nY ? nLimit / nY : nLimit + 1 );
 nDelR0 = ( nZ ? nLimit / nZ : nLimit + 1 );
 bSplitCount = bRelaxed;
 }
 
-// greatest common divisor according to Euklid (chaindivision)
-// special case: 0 plus anything produces 1
-int WLevDistance::GCD( int a, int b )
-{
-if ( !a || !b )
-return 1;
-if ( a < 0 ) a = -a;
-if ( b < 0 ) b = -b;
-do
-{
-if ( a > b )
-a -= int(a / b) * b;
-else
-b -= int(b / a) * a;
-} while ( a && b );
-return( a ? a : b);
-}
-
-// least common multiple : a * b / GCD(a,b)
-int WLevDistance::LCM( int a, int b )
-{
-if ( a > b )// decrease overflow chance
-return( (a / GCD(a,b)) * b );
-else
-return( (b / GCD(a,b)) * a );
-}
-
-// Minimum of three values
-inline int WLevDistance::Min3( int x, int y, int z )
-{
-if ( x < y )
-return std::min(x, z);
-else
-return std::min(y, z);
-}
-
 // The value in the middle
 int WLevDistance::Mid3( int x, int y, int z )
 {
-int min = Min3(x,y,z);
+int min = std::min({ x, y, z });
 if ( x == min )
 return std::min(y, z);
 else if ( y == min )
@@ -328,15 +293,6 @@ int WLevDistance::Mid3( int x, int y, int z )
 return std::min(x, y);
 }
 
-// Maximum of three values
-int WLevDistance::Max3( int x, int y, int z )
-{
-if ( x > y )
-return std::max(x, z);
-else
-return std::max(y, z);
-}
-
 // initialize data from CTOR
 void WLevDistance::InitData( const sal_Unicode* cPattern )
 {
diff --git a/i18npool/source/search/levdis.hxx 

[Libreoffice-commits] core.git: i18npool/source

2021-04-01 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/nl_BE.xml |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit a66653805782df67431c462bf8f890a154066cf0
Author: Eike Rathke 
AuthorDate: Thu Apr 1 11:27:59 2021 +0200
Commit: Eike Rathke 
CommitDate: Thu Apr 1 12:38:16 2021 +0200

Resolves: tdf#136839 {nl-BE} leading currency symbol

Change-Id: Iaa9065a078ae63aca8fe4226b5c20859e3366f85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113446
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/nl_BE.xml 
b/i18npool/source/localedata/data/nl_BE.xml
index 8d2d4b15df7d..efbca5745019 100644
--- a/i18npool/source/localedata/data/nl_BE.xml
+++ b/i18npool/source/localedata/data/nl_BE.xml
@@ -87,22 +87,22 @@
   0,00%
 
 
-  #.##0 [$BF-813];-#.##0 [$BF-813]
+  [$BF-813] #.##0;[$BF-813] -#.##0
 
 
-  #.##0,00 [$BF-813];-#.##0,00 [$BF-813]
+  [$BF-813] #.##0,00;[$BF-813] -#.##0,00
 
 
-  #.##0 [$BF-813];[RED]-#.##0 [$BF-813]
+  [$BF-813] #.##0;[RED][$BF-813] -#.##0
 
 
-  #.##0,00 [$BF-813];[RED]-#.##0,00 [$BF-813]
+  [$BF-813] #.##0,00;[RED][$BF-813] -#.##0,00
 
 
-  #.##0,00 CCC
+  CCC #.##0,00
 
 
-  #.##0,-- [$BF-813];[RED]-#.##0,-- [$BF-813]
+  [$BF-813] #.##0,--;[RED][$BF-813] -#.##0,--
 
 
   D/MM/JJ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2021-03-22 Thread Jun NOGATA (via logerrit)
 i18npool/source/localedata/data/ja_JP.xml |   48 +++---
 1 file changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 17965775f80f6beb7a88286a8127f5f9c78ef8e1
Author: Jun NOGATA 
AuthorDate: Thu Dec 31 15:00:55 2020 +0900
Commit: Mike Kaganski 
CommitDate: Tue Mar 23 05:17:44 2021 +0100

Fix Japanese old monthly name

Change-Id: I8c5ade8bfbf609ae7f606bcb412856355c3bb3a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108531
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/i18npool/source/localedata/data/ja_JP.xml 
b/i18npool/source/localedata/data/ja_JP.xml
index 58d76c89417d..d75f9712cf72 100644
--- a/i18npool/source/localedata/data/ja_JP.xml
+++ b/i18npool/source/localedata/data/ja_JP.xml
@@ -401,63 +401,63 @@
   
 
   jan
-  1月
-  一月
+  睦月
+  睦月
 
 
   feb
-  2月
-  二月
+  如月
+  如月
 
 
   mar
-  3月
-  三月
+  弥生
+  弥生
 
 
   apr
-  4月
-  四月
+  卯月
+  卯月
 
 
   may
-  5月
-  五月
+  皐月
+  皐月
 
 
   jun
-  6月
-  六月
+  水無月
+  水無月
 
 
   jul
-  7月
-  七月
+  文月
+  文月
 
 
   aug
-  8月
-  八月
+  葉月
+  葉月
 
 
   sep
-  9月
-  九月
+  長月
+  長月
 
 
   oct
-  10月
-  十月
+  神無月
+  神無月
 
 
   nov
-  11月
-  十一月
+  霜月
+  霜月
 
 
   dec
-  12月
-  十二月
+  師走
+  師走
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2021-03-21 Thread Jun NOGATA (via logerrit)
 i18npool/source/localedata/data/ja_JP.xml |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 8362c4b304cb7573df987a867683d17dc7b0fcf0
Author: Jun NOGATA 
AuthorDate: Thu Dec 31 18:20:10 2020 +0900
Commit: Eike Rathke 
CommitDate: Sun Mar 21 14:23:15 2021 +0100

Add mixed Gregorian and Japanese gengou date format.

Change-Id: I34c5c0cb1aaa72ee3cc1df3e1e6375c32891
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108532
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/ja_JP.xml 
b/i18npool/source/localedata/data/ja_JP.xml
index 280094564bd2..58d76c89417d 100644
--- a/i18npool/source/localedata/data/ja_JP.xml
+++ b/i18npool/source/localedata/data/ja_JP.xml
@@ -149,6 +149,12 @@
 
   年M月D日()
 
+
+  "年("GGGE"年)"MM"月"DD"日"
+
+
+  GGGE"年(""年)"MM"月"DD"日"
+
 
   MM.DD
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2021-02-12 Thread Aditya Pratap Singh (via logerrit)
 i18npool/source/indexentry/indexentrysupplier_default.cxx |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 8ad6257d456c595a47669846fc3ef5337653bd03
Author: Aditya Pratap Singh 
AuthorDate: Mon Feb 1 21:57:25 2021 +0530
Commit: Mike Kaganski 
CommitDate: Fri Feb 12 14:01:45 2021 +0100

tdf#42982 Add descriptions to some runtime exceptions

Change-Id: Ie970367f1b3df3324cc56e467ae93eb7155e05eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110261
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx 
b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index 5e541f139708..d3f4acb83924 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -173,7 +173,8 @@ void Index::makeIndexKeys(const lang::Locale , 
std::u16string_view algor
 keyStr = LocaleDataImpl::get()->getIndexKeysByAlgorithm(LOCALE_EN,
 
LocaleDataImpl::get()->getDefaultIndexAlgorithm(LOCALE_EN));
 if (keyStr.isEmpty())
-throw RuntimeException();
+throw RuntimeException(
+"Index::makeIndexKeys: No index keys returned by algorithm");
 }
 
 sal_Int16 len = sal::static_int_cast( keyStr.getLength() );
@@ -192,7 +193,8 @@ void Index::makeIndexKeys(const lang::Locale , 
std::u16string_view algor
 switch(curr) {
 case u'-': {
 if (key_count <= 0 || i + 1 >= len)
-throw RuntimeException();
+throw RuntimeException("Index::makeIndexKeys: 
key_count<=0||"
+"'-' is the last char of 
KeyString");
 for (curr = keyStr[++i]; key_count < MAX_KEYS && 
keys[key_count-1].key < curr; key_count++) {
 keys[key_count].key = keys[key_count-1].key+1;
 keys[key_count].desc.clear();
@@ -217,13 +219,13 @@ void Index::makeIndexKeys(const lang::Locale , 
std::u16string_view algor
 [[fallthrough]];
 case u'(': {
 if (key_count <= 0)
-throw RuntimeException();
+throw RuntimeException("Index::makeIndexKeys: 
key_count<=0");
 
 sal_Int16 end = i+1;
 for (; end < len && keyStr[end] != close; end++) ;
 
 if (end >= len) // no found
-throw RuntimeException();
+throw RuntimeException("Index::makeIndexKeys: Closing 
bracket not found");
 if (close == ')')
 keys[key_count-1].desc = keyStr.copy(i+1, end-i-1);
 else {
@@ -261,12 +263,12 @@ void Index::init(const lang::Locale , const 
OUString& algorithm)
 if (!scriptList.hasElements()) {
 scriptList = LocaleDataImpl::get()->getUnicodeScripts(LOCALE_EN);
 if (!scriptList.hasElements())
-throw RuntimeException();
+throw RuntimeException("Index::init: scriptList is empty");
 }
 
 table_count = sal::static_int_cast( scriptList.getLength() );
 if (table_count > MAX_TABLES)
-throw RuntimeException();
+throw RuntimeException("Index::init: Length of scriptList is too big");
 
 collator->loadCollatorAlgorithm(algorithm, rLocale, 
CollatorOptions::CollatorOptions_IGNORE_CASE_ACCENT);
 sal_Int16 j=0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2021-01-27 Thread Stephan Bergmann (via logerrit)
 i18npool/source/nativenumber/nativenumbersupplier.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit fad5b7b9cf936bf6df49e2ac28977f350db24253
Author: Stephan Bergmann 
AuthorDate: Wed Jan 27 15:06:43 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Jan 27 17:16:20 2021 +0100

Use std::u16string_view instead of OUString in one place

...due to which an upcoming loplugin:stringliteralvar improvement would
otherwise have suggested to turn the MinusChar array into an 
OUStringLiteral,
but which would have lead to awkward code elsewhere.  (And the code is a bit
more efficient this way now anyway, of course.  The remaining

  OUString numberChar, multiplierChar, decimalChar, separatorChar;

might benefit from a similar change, but they didn't interfere with the
loplugin:stringliteralvar improvement, so are left alone at least for now.)

Change-Id: I41e3ef987450cbd29d3663a9aeefda336d798170
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110019
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx 
b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index fd487c7de0ea..66a5655deed7 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -335,11 +335,11 @@ OUString NativeToAscii(const OUString& inStr,
 sal_Int32 count = 0, index;
 sal_Int32 i;
 
-OUString numberChar, multiplierChar, decimalChar, minusChar, 
separatorChar;
+OUString numberChar, multiplierChar, decimalChar, separatorChar;
 numberChar = OUString(NumberChar[0], 10*NumberChar_Count);
 multiplierChar = OUString(MultiplierChar_7_CJK[0], 
ExponentCount_7_CJK*Multiplier_Count);
 decimalChar = OUString(DecimalChar, NumberChar_Count);
-minusChar = OUString(MinusChar, NumberChar_Count);
+std::u16string_view const minusChar(MinusChar, NumberChar_Count);
 separatorChar = OUString(
 reinterpret_cast(SeparatorChar), NumberChar_Count);
 
@@ -369,7 +369,7 @@ OUString NativeToAscii(const OUString& inStr,
 // Only when decimal point is followed by numbers,
 // it will be convert to ASCII decimal point
 newStr[count] = DecimalChar[NumberChar_HalfWidth];
-else if (minusChar.indexOf(str[i]) >= 0 &&
+else if (minusChar.find(str[i]) != std::u16string_view::npos &&
 (i < nCount-1 && (numberChar.indexOf(str[i+1]) >= 0 ||
   multiplierChar.indexOf(str[i+1]) >= 
0)))
 // Only when minus is followed by numbers,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source include/editeng lotuswordpro/source sal/qa starmath/source svtools/source sw/qa unotools/qa vcl/source

2020-12-23 Thread Stephan Bergmann (via logerrit)
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |2 -
 include/editeng/itemtype.hxx  |2 -
 lotuswordpro/source/filter/lwpsilverbullet.cxx|6 
+--
 sal/qa/rtl/uri/rtl_testuri.cxx|   20 
+-
 starmath/source/mathmlexport.cxx  |4 +-
 svtools/source/misc/sampletext.cxx|8 
++--
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |2 -
 sw/qa/extras/ww8export/ww8export.cxx  |2 -
 unotools/qa/unit/testGetEnglishSearchName.cxx |   10 
++---
 vcl/source/gdi/gdimtf.cxx |2 -
 10 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit b5c532154cb974de04f2a430712cd947e1bcc98a
Author: Stephan Bergmann 
AuthorDate: Tue Dec 22 20:14:43 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Dec 23 09:14:01 2020 +0100

Use char16_t string literals

Change-Id: I0a8b577957ac1d4cad5fc1163f244012a8391a77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108216
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 2d55e1fd0974..d352aec6f9de 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -419,7 +419,7 @@ static
 void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult )
 {
 OUStringBuffer aTemp(64);
-static const sal_Unicode asPersianWord_conjunction_data[] = 
{0x20,0x0648,0x20,0};
+static const sal_Unicode asPersianWord_conjunction_data[] = u" \u0648 ";
 OUString asPersianWord_conjunction( asPersianWord_conjunction_data );
 unsigned char nSection = 0;
 
diff --git a/include/editeng/itemtype.hxx b/include/editeng/itemtype.hxx
index 19d2a19b4ee3..2e2115eb7766 100644
--- a/include/editeng/itemtype.hxx
+++ b/include/editeng/itemtype.hxx
@@ -29,7 +29,7 @@ class Color;
 class IntlWrapper;
 // static and prototypes -
 
-const sal_Unicode cpDelim[] = { ',' , ' ', '\0' };
+const sal_Unicode cpDelim[] = u", ";
 
 EDITENG_DLLPUBLIC OUString GetMetricText( tools::Long nVal, MapUnit eSrcUnit, 
MapUnit eDestUnit, const IntlWrapper * pIntl );
 OUString GetColorString( const Color& rCol );
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx 
b/lotuswordpro/source/filter/lwpsilverbullet.cxx
index 5c6a5ca45030..76b4810c1427 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.cxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx
@@ -282,19 +282,19 @@ OUString 
LwpSilverBullet::GetNumCharByStyleID(LwpFribParaNumber const * pParaNum
 break;
 case NUMCHAR_Chinese1:
 {
-sal_Unicode const sBuf[13] = 
{0x58f9,0x002c,0x0020,0x8d30,0x002c,0x0020,0x53c1,0x002c,0x0020,0x002e,0x002e,0x002e,0x0};
+sal_Unicode const sBuf[13] = u"\u58f9\u002c\u0020\u8d30, \u53c1, ...";
 strNumChar = OUString(sBuf);
 }
 break;
 case NUMCHAR_Chinese2:
 {
-sal_Unicode const sBuf[13] = 
{0x4e00,0x002c,0x0020,0x4e8c,0x002c,0x0020,0x4e09,0x002c,0x0020,0x002e,0x002e,0x002e,0x0};
+sal_Unicode const sBuf[13] = u"\u4e00, \u4e8c, \u4e09, ...";
 strNumChar = OUString(sBuf);
 }
 break;
 case NUMCHAR_Chinese3:
 {
-sal_Unicode const sBuf[13] = 
{0x7532,0x002c,0x0020,0x4e59,0x002c,0x0020,0x4e19,0x002c,0x0020,0x002e,0x002e,0x002e,0x0};
+sal_Unicode const sBuf[13] = u"\u7532, \u4e59, \u4e19, ...";
 strNumChar = OUString(sBuf);
 }
 break;
diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx
index fc7e1d30a751..e2d076b19127 100644
--- a/sal/qa/rtl/uri/rtl_testuri.cxx
+++ b/sal/qa/rtl/uri/rtl_testuri.cxx
@@ -358,7 +358,7 @@ void Test::test_Uri() {
 // Check encode with unusual text encodings:
 
 {
-sal_Unicode const aText1U[] = { ' ', '!', 0x0401, 0x045F, 0 };
+sal_Unicode const aText1U[] = u" !\u0401\u045F";
 aText1 = OUString(aText1U);
 aText2 = "%20!%A1%FF";
 CPPUNIT_ASSERT_EQUAL_MESSAGE(
@@ -374,10 +374,10 @@ void Test::test_Uri() {
 aText2, rtl_UriDecodeWithCharset, 
RTL_TEXTENCODING_ISO_8859_5));
 }
 {
-sal_Unicode const aText1U[] = { ' ', '!', 0x0401, 0x0700, 0x045F, 0 };
+sal_Unicode const aText1U[] = u" !\u0401\u0700\u045F";
 aText1 = OUString(aText1U);
-sal_Unicode const aText2U[] = {
-'%', '2', '0', '!', '%', 'A', '1', 0x0700, '%', 'F', 'F', 0 };
+sal_Unicode const aText2U[] =
+u"%20!%A1\u0700%FF";
 aText2 = 

[Libreoffice-commits] core.git: i18npool/source

2020-12-20 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/LocaleNode.cxx |   25 +
 1 file changed, 25 insertions(+)

New commits:
commit ff804ebff0c94e8780f01dde80c402afd3a5d208
Author: Eike Rathke 
AuthorDate: Sun Dec 20 19:24:36 2020 +0100
Commit: Eike Rathke 
CommitDate: Sun Dec 20 22:11:08 2020 +0100

Check Calendar unoid for unknown and duplicates

https://gerrit.libreoffice.org/c/core/+/108015 tried to add
another Gregorian calendar with a made-up "gregorian_en" unoid.
Prevent that already at build time.

Change-Id: Id1bed6bea28b9c80e75b03753cdb367d3160dac1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108055
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index 3040f3312d42..34c77516cc73 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -1559,6 +1560,23 @@ void LCCalendarNode::generateCode (const OFileWriter 
) const
 std::unique_ptr nbOfGenitiveMonths( new 
sal_Int16[nbOfCalendars] );
 std::unique_ptr nbOfPartitiveMonths( new 
sal_Int16[nbOfCalendars] );
 std::unique_ptr nbOfEras( new sal_Int16[nbOfCalendars] );
+
+// Known allowed calendar identifiers (unoid) and whether used or not.
+// Of course there must be an implementation for new to be added
+// identifiers.. see data/locale.dtd
+std::map< OUString, bool > aCalendars;
+aCalendars["buddhist"]   = false;
+aCalendars["gengou"] = false;
+aCalendars["gregorian"]  = false;
+aCalendars["hanja"]  = false;
+aCalendars["hanja_yoil"] = false;
+aCalendars["hijri"]  = false;
+aCalendars["jewish"] = false;
+aCalendars["ROC"]= false;
+// Not in ODF:
+aCalendars["dangi"]  = false;
+aCalendars["persian"]= false;
+
 sal_Int16 j;
 sal_Int16 i;
 bool bHasGregorian = false;
@@ -1571,6 +1589,13 @@ void LCCalendarNode::generateCode (const OFileWriter 
) const
 bool bGregorian = calendarID == "gregorian";
 if (!bHasGregorian)
 bHasGregorian = bGregorian;
+auto calIt = aCalendars.find(calendarID);
+if (calIt == aCalendars.end())
+incErrorStr( "Error: unknown Calendar unoid: %s\n", calendarID);
+else if (calIt->second)
+incErrorStr( "Error: duplicate Calendar unoid: %s\n", calendarID);
+else
+calIt->second = true;
 str = calNode -> getAttr().getValueByName("default");
 of.writeDefaultParameter("Calendar", str, i);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-11-03 Thread Caolán McNamara (via logerrit)
 i18npool/source/calendar/calendar_gregorian.cxx |8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit ba1dc6fcb9f5df0b397effb20e2f58bb8c734879
Author: Caolán McNamara 
AuthorDate: Tue Nov 3 14:10:31 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 3 21:56:53 2020 +0100

presumably 'true' is sufficient in all cases

Change-Id: I9366193085a4c46ef64f0a9660e51b8678ca35f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105252
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/i18npool/source/calendar/calendar_gregorian.cxx 
b/i18npool/source/calendar/calendar_gregorian.cxx
index f05fc96009ca..1da80995b1d1 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -360,13 +360,7 @@ Calendar_gregorian::setLocalDateTime( double fTimeInDays )
 "Calendar_gregorian::setLocalDateTime: " << std::fixed << fM << " 
rounded to " << fR);
 int32_t nZoneOffset, nDSTOffset;
 UErrorCode status = U_ZERO_ERROR;
-body->getTimeZone().getOffset( fR,
-#if U_ICU_VERSION_MAJOR_NUM >= 68
-true,
-#else
-TRUE,
-#endif
-nZoneOffset, nDSTOffset, status );
+body->getTimeZone().getOffset( fR, true, nZoneOffset, nDSTOffset, status );
 
 if ( !U_SUCCESS(status) ) throw ERROR;
 status = U_ZERO_ERROR;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-11-01 Thread Rene Engelhard (via logerrit)
 i18npool/source/calendar/calendar_gregorian.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 9cdcc20dee02a13e065b6117ff0d574e567c6112
Author: Rene Engelhard 
AuthorDate: Sun Nov 1 18:30:49 2020 +0100
Commit: Eike Rathke 
CommitDate: Sun Nov 1 23:39:37 2020 +0100

fix build with ICU 68

use standard true.


/home/rene/LibreOffice/git/master/i18npool/source/calendar/calendar_gregorian.cxx:
 In member function 'virtual void 
i18npool::Calendar_gregorian::setLocalDateTime(double)':

/home/rene/LibreOffice/git/master/i18npool/source/calendar/calendar_gregorian.cxx:363:40:
 error: 'TRUE' was not declared in this scope
  363 | body->getTimeZone().getOffset( fR, TRUE, nZoneOffset, 
nDSTOffset, status );
  |^~~~

/usr/include/unicode/umachine.h says:

@deprecated ICU 68 Use standard "true" instead.

Change-Id: I45d2b0afa6a9043767af5c2cf41ba24377f2cdc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105151
Tested-by: René Engelhard 
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/calendar/calendar_gregorian.cxx 
b/i18npool/source/calendar/calendar_gregorian.cxx
index 69fb08797ab3..f05fc96009ca 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -360,7 +360,14 @@ Calendar_gregorian::setLocalDateTime( double fTimeInDays )
 "Calendar_gregorian::setLocalDateTime: " << std::fixed << fM << " 
rounded to " << fR);
 int32_t nZoneOffset, nDSTOffset;
 UErrorCode status = U_ZERO_ERROR;
-body->getTimeZone().getOffset( fR, TRUE, nZoneOffset, nDSTOffset, status );
+body->getTimeZone().getOffset( fR,
+#if U_ICU_VERSION_MAJOR_NUM >= 68
+true,
+#else
+TRUE,
+#endif
+nZoneOffset, nDSTOffset, status );
+
 if ( !U_SUCCESS(status) ) throw ERROR;
 status = U_ZERO_ERROR;
 body->setTime( fR - (nZoneOffset + nDSTOffset), status );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-10-30 Thread Stephan Bergmann (via logerrit)
 i18npool/source/localedata/LocaleNode.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 8d6c7085e9981d5f91525ae5cf44c426b4cf777c
Author: Stephan Bergmann 
AuthorDate: Fri Oct 30 15:17:31 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Oct 30 17:35:06 2020 +0100

Remove unnecessary include

...introduced with 7a09d67e1c76db7cb6a87a2ceaa6de7325342b75 "convert some 
more
long -> tools::Long"

Change-Id: Ia565aea1eae4b3e03939c58f22e4263a4334ec80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105070
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index aeceec1a5d25..adc7669e6bdd 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -28,7 +28,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include "LocaleNode.hxx"
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-10-28 Thread Noel Grandin (via logerrit)
 i18npool/source/localedata/LocaleNode.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit a6c2ba4746a0ca94b3060be714e424f4be8667bf
Author: Noel Grandin 
AuthorDate: Wed Oct 28 17:54:46 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 28 20:46:11 2020 +0100

std::set->o3tl::sorted_vector in LocaleNode

Change-Id: I633d396bb2cbeaa6829de543fab6ce3726ad11ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104968
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index 93c6b461e77f..aeceec1a5d25 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -37,8 +38,8 @@
 // NOTE: MUST match the Locale versionDTD attribute defined in data/locale.dtd
 #define LOCALE_VERSION_DTD "2.0.3"
 
-typedef ::std::set< OUString > NameSet;
-typedef ::std::set< sal_Int16 > ValueSet;
+typedef ::o3tl::sorted_vector< OUString > NameSet;
+typedef ::o3tl::sorted_vector< sal_Int16 > ValueSet;
 
 namespace cssi = ::com::sun::star::i18n;
 
@@ -827,7 +828,7 @@ void LCFormatNode::generateCode (const OFileWriter ) 
const
 if (bShowNextFreeFormatIndex)
 {
 sal_Int16 nNext = i18npool::nFirstFreeFormatIndex;
-std::set::const_iterator it( aFormatIndexSet.find( nNext));
+auto it = aFormatIndexSet.find( nNext);
 if (it != aFormatIndexSet.end())
 {
 // nFirstFreeFormatIndex already used, find next free including 
gaps.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-09-29 Thread Julien Nabet (via logerrit)
 i18npool/source/localedata/data/fr_BF.xml |8 -
 i18npool/source/localedata/data/fr_TG.xml |  152 +-
 2 files changed, 155 insertions(+), 5 deletions(-)

New commits:
commit f11dc8335c9bae837823c14d059388b8d5965dcb
Author: Julien Nabet 
AuthorDate: Tue Sep 29 21:14:19 2020 +0200
Commit: Eike Rathke 
CommitDate: Wed Sep 30 01:16:27 2020 +0200

tdf#137009: except Togo, all French locales in African don't use AM/PM

See https://bugs.documentfoundation.org/show_bug.cgi?id=137009#c4

Change-Id: I01612e79ffd947c1a4c0cf252d71bda48bc3ef8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103638
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/fr_BF.xml 
b/i18npool/source/localedata/data/fr_BF.xml
index 72ccc852f0da..7f4661b8edb4 100644
--- a/i18npool/source/localedata/data/fr_BF.xml
+++ b/i18npool/source/localedata/data/fr_BF.xml
@@ -162,16 +162,16 @@
 
   WW
 
-
+
   HH:MM
 
-
+
   HH:MM:SS
 
-
+
   HH:MM AM/PM
 
-
+
   HH:MM:SS AM/PM
 
 
diff --git a/i18npool/source/localedata/data/fr_TG.xml 
b/i18npool/source/localedata/data/fr_TG.xml
index a322f88b329d..4f369c538e10 100644
--- a/i18npool/source/localedata/data/fr_TG.xml
+++ b/i18npool/source/localedata/data/fr_TG.xml
@@ -20,7 +20,157 @@
 
   
   
-  
+  
+D/M
+D.M.Y
+D-M-Y
+
+  Standard
+
+
+  0
+
+
+  0,00
+
+
+  # ##0
+
+
+  # ##0,00
+
+
+  # ###,00
+
+
+  0,00E+000
+
+
+  0,00E+00
+
+
+  ##0,00E+00
+
+
+  0" "%
+
+
+  0,00" "%
+
+
+  # ##0 [CURRENCY];-# ##0 [CURRENCY]
+
+
+  # ##0,00 [CURRENCY];-# ##0,00 [CURRENCY]
+
+
+  # ##0 [CURRENCY];[RED]-# ##0 [CURRENCY]
+
+
+  # ##0,00 [CURRENCY];[RED]-# ##0,00 [CURRENCY]
+
+
+  # ##0,00 CCC
+
+
+  # ##0,-- [CURRENCY];[RED]-# ##0,-- [CURRENCY]
+
+
+  D/MM/YY
+
+
+  DD  
+
+
+  DD/MM/YY
+
+
+  DD/MM/
+
+
+  D MMM YY
+
+
+  D MMM 
+
+
+  D MMM 
+
+
+  D  
+
+
+  D  YY
+
+
+  NN DD/MMM/YY
+
+
+  NN D MMM YY
+
+
+  NN D  
+
+
+  D  
+
+
+  MM/DD
+
+
+  YY-MM-DD
+  ISO 8601
+
+
+  -MM-DD
+  ISO 8601
+
+
+  MM/YY
+
+
+  MMM/DD
+
+
+  
+
+
+  QQ YY
+
+
+  WW
+
+
+  HH:MM
+
+
+  HH:MM:SS
+
+
+  HH:MM AM/PM
+
+
+  HH:MM:SS AM/PM
+
+
+  [HH]:MM:SS
+
+
+  MM:SS,00
+
+
+  [HH]:MM:SS,00
+
+
+  DD/MM/YY HH:MM
+
+
+  DD/MM/ HH:MM:SS AM/PM
+
+
+  DD/MM/ HH:MM
+
+  
   
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-09-05 Thread Stephan Bergmann (via logerrit)
 i18npool/source/textconversion/textconversion_zh.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d211909bb95f99b5adc6d49f60610f4d0676afbd
Author: Stephan Bergmann 
AuthorDate: Sat Sep 5 18:33:27 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Sat Sep 5 22:28:21 2020 +0200

Simplify comparison between OUString and raw pointer

...avoiding the construction of an intermediary temporary OUString, 
assuming the
given `word` will never contain embedded NUL characters.

(This change is a prerequisite for making the OUString ctor taking a raw 
pointer
explicit.)

Change-Id: I3b500557abb3554e9dfda63ef30b22c6c06c99c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102084
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/i18npool/source/textconversion/textconversion_zh.cxx 
b/i18npool/source/textconversion/textconversion_zh.cxx
index d45baa553e53..23689c0b568e 100644
--- a/i18npool/source/textconversion/textconversion_zh.cxx
+++ b/i18npool/source/textconversion/textconversion_zh.cxx
@@ -218,7 +218,8 @@ TextConversion_zh::getWordConversion(const OUString& aText, 
sal_Int32 nStartPos,
 
 while (bottom <= top && !found) {
 current = (top + bottom) / 2;
-const sal_Int32 result = word.compareTo(wordData + 
entry[current]);
+const sal_Int32 result = rtl_ustr_compare(
+word.getStr(), wordData + entry[current]);
 if (result < 0)
 top = current - 1;
 else if (result > 0)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source include/rtl sal/CompilerTest_sal_rtl_oustring.mk sal/Module_sal.mk sal/qa sal/rtl sal/util sc/source stoc/source svl/source svtools/source svx/source sw

2020-09-03 Thread Stephan Bergmann (via logerrit)
 i18npool/source/localedata/LocaleNode.cxx |2 
 include/rtl/stringutils.hxx   |1 
 include/rtl/ustring.h |   35 
 include/rtl/ustring.hxx   |  888 +++---
 sal/CompilerTest_sal_rtl_oustring.mk  |   16 
 sal/Module_sal.mk |2 
 sal/qa/rtl/strings/compile-oustring.cxx   |   45 
 sal/qa/rtl/strings/test_oustring_compare.cxx  |6 
 sal/qa/rtl/strings/test_oustring_stringliterals.cxx   |   56 -
 sal/qa/rtl/strings/test_strings_replace.cxx   |3 
 sal/rtl/ustring.cxx   |   11 
 sal/util/sal.map  |5 
 sc/source/filter/excel/xecontent.cxx  |2 
 stoc/source/typeconv/convert.cxx  |2 
 svl/source/numbers/zformat.cxx|2 
 svtools/source/dialogs/PlaceEditDialog.cxx|2 
 svx/source/gallery2/gallery1.cxx  |2 
 sw/source/filter/ww8/ww8par5.cxx  |2 
 sw/source/ui/dbui/mmaddressblockpage.cxx  |2 
 xmlsecurity/source/helper/documentsignaturehelper.cxx |2 
 20 files changed, 338 insertions(+), 748 deletions(-)

New commits:
commit 1b43cceaea2084a0489db68cd0113508f34b6643
Author: Stephan Bergmann 
AuthorDate: Thu Sep 3 21:04:01 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 4 07:55:15 2020 +0200

Make many OUString functions take std::u16string_view parameters

...instead of having individual overloads for OUString, OUStringLiteral, and
literal char16_t const[N].  (The variants taking OUString are still needed 
for
!LIBO_INTERNAL_ONLY, though.  The variants taking ASCII-only literal char
const[N] are also left in place.)

This nicely reduces the number of needed overloads.  std::u16string_view 
allows
to pass as arguments:

* OUString
* OUStringLiteral
* OUStringChar  (with the necessary conversion added now)
* OUStringNumber
* u"..." char16_t string literals
* u"..."sv std::u16string_view literals
* std::u16string, plain char16_t*, and more

A notable exceptions is OUStringConcat, which now needs to be wrapped in
OUString(...), see the handful of places that needed to be adapted.

One caveat is the treatment of embedded NUL characters, as

  std::u16string_view(u"x\0y")

constructs a view of size 1, while only

  u"x\0y"sv

constructs a view of size 3 (which matches the old behavior of overloads for
literal char16_t const[N] via the ConstCharArrayDetector<>::TypeUtf16
machinery).  See the new checkEmbeddedNul in
sal/qa/rtl/strings/test_oustring_stringliterals.cxx.

The functions that have been changed are generally those that:

* already take a string of determined length, so that using 
std::u16string_view,
  which is always constructed with a determined length, is no pessimization
  (e.g., there are operator == overloads taking plain pointers, which do not
  need to determine the string length upfront);

* could not benefit from the fact that the passed-in argument is an OUString
  (e.g., the corresponding operator = overload can reuse the passed-in
  OUString's rtl_uString pData member);

* do not run into overload resolution ambiguity issues, like the comparison
  operators would do.

One inconsistency that showed up is that while the original

  replaceAll(OUString const &, OUString const &, sal_Int32 fromIndex = 0)

overload takes an optional third fromIndex argument, the existing replaceAll
overloads taking OUStringLiteral and literal char16_t const[N] arguments did
not.  Fixing that required a new (LIBO_INTERNAL_ONLY)
rtl_uString_newReplaceAllFromIndexUtf16LUtf16L (with test code in
sal/qa/rtl/strings/test_strings_replace.cxx).

Another issue was posed by test code in
sal/qa/rtl/strings/test_oustring_stringliterals.cxx that used the
RTL_STRING_UNITTEST-only OUString(Except*CharArrayDetector) ctors to verify 
that
certain function calls should not compile (and would compile under
RTL_STRING_UNITTEST by taking those Except*CharArrayDetector converted to
OUString as arguments).  Those problematic "should fail to compile" tests 
have
been converted into a new CompilerTest_sal_rtl_oustring.

Change-Id: Id72e8c4cc338258cadad00ddc6ea5b9da2e1f780
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102020
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index b0d9156ddbb9..e5123969644c 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -794,7 +794,7 @@ void 

[Libreoffice-commits] core.git: i18npool/source

2020-09-01 Thread Caolán McNamara (via logerrit)
 i18npool/source/textconversion/textconversion_zh.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 78aea95703c0111f333b28c690e6b46aae77bf45
Author: Caolán McNamara 
AuthorDate: Tue Sep 1 09:09:48 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 1 17:28:36 2020 +0200

cid#1466573 Dereference after null check

Change-Id: Ie8f5c015d32b67ad9148c1d0bb8d73425a5b563a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101827
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/i18npool/source/textconversion/textconversion_zh.cxx 
b/i18npool/source/textconversion/textconversion_zh.cxx
index 3f7ff96d8a15..d45baa553e53 100644
--- a/i18npool/source/textconversion/textconversion_zh.cxx
+++ b/i18npool/source/textconversion/textconversion_zh.cxx
@@ -212,7 +212,7 @@ TextConversion_zh::getWordConversion(const OUString& aText, 
sal_Int32 nStartPos,
 }
 }
 
-if (!found && index[len+1] - index[len] > 0) {
+if (wordData && !found && index[len+1] - index[len] > 0) {
 sal_Int32 bottom = static_cast(index[len]);
 sal_Int32 top = static_cast(index[len+1]) - 1;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-08-28 Thread Attila Szűcs (via logerrit)
 i18npool/source/collator/data/hu_charset.txt |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 0baa63eb00cf42712584dc87cc9874df1195c24a
Author: Attila Szűcs 
AuthorDate: Fri Aug 28 10:12:17 2020 +0200
Commit: László Németh 
CommitDate: Fri Aug 28 14:25:30 2020 +0200

tdf#122759 sc: fix Autofilter case sensitivity for Hungarian

Remove case sensitivity from NON case-sensitive Hungarian collator
in i18npool, added by commit 7b1eb6313c0d2621c364df1724c69d28f8267841
(tdf#11 fix Hungarian sorting). It seems, this doesn't affect
Writer, where it's possible to choose case-sensitive sorting, too.

Note: Handling of space is still a problem for normal text,
i.e. sorting according to Hungarian orthography, see
commit 7618490d334409c3fc4167f32732537ef738647f
(tdf#123204 hu_HU collation: don't ignore special characters).

Co-authored-by: Tibor Nagy (NISZ)

Change-Id: I667eb5e22401a7fcef0e6e6111c48ce7d9c4aaf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101527
Reviewed-by: László Németh 
Tested-by: László Németh 

diff --git a/i18npool/source/collator/data/hu_charset.txt 
b/i18npool/source/collator/data/hu_charset.txt
index f38ecfd5c7b6..027bea7e230c 100644
--- a/i18npool/source/collator/data/hu_charset.txt
+++ b/i18npool/source/collator/data/hu_charset.txt
@@ -20,9 +20,6 @@
 # Collation of Hungarian letters
 #
 
-[caseLevel on]
-[caseFirst lower]
-
 # Because of the different requirements of Writer and Calc,
 # don't ignore the special characters, yet.
 # See tdf#123204 "EDITING Not all special characters appear in the AutoFilter 
window"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source include/editeng offapi/com sw/qa

2020-08-09 Thread László Németh (via logerrit)
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |8 
+
 include/editeng/svxenum.hxx   |1 
 offapi/com/sun/star/style/NumberingType.idl   |6 

 sw/qa/extras/odfexport/data/rovas-numbering.odt   |binary
 sw/qa/extras/odfexport/odfexport.cxx  |   14 
++
 5 files changed, 28 insertions(+), 1 deletion(-)

New commits:
commit f4ca7ea13102dfbc0a62e925b6fe4dbe6fd0bf99
Author: László Németh 
AuthorDate: Sun Aug 2 10:41:25 2020 +0200
Commit: László Németh 
CommitDate: Sun Aug 9 12:37:13 2020 +0200

tdf#135573 sw: add Székely rovás (Old Hungarian) numerals

Change-Id: Ic309fc9b07186ce0b86ca54028d62e0fafd104fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99950
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 936f1620ad73..119cc76b4f61 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -942,6 +942,11 @@ DefaultNumberingProvider::makeNumberingString( const 
Sequence());
 }
 
+DECLARE_ODFEXPORT_TEST(testRovasNumbering, "rovas-numbering.odt")
+{
+CPPUNIT_ASSERT_EQUAL(1, getPages());
+auto xNumberingRules
+= 
getProperty>(getParagraph(1), 
"NumberingRules");
+comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 68
+// - Actual  : 4
+// i.e. numbering type was ARABIC, not SZEKELY_ROVAS.
+
CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::SZEKELY_ROVAS),
+ aMap["NumberingType"].get());
+}
+
 DECLARE_ODFEXPORT_TEST(testPageContentBottom, "page-content-bottom.odt")
 {
 CPPUNIT_ASSERT_EQUAL(1, getShapes());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-07-29 Thread Mihkel Tõnnov (via logerrit)
 i18npool/source/localedata/data/et_EE.xml |   32 +++---
 1 file changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 16c93afefb59ae1be7aff75803054b2d4cc4b642
Author: Mihkel Tõnnov 
AuthorDate: Thu Jul 23 02:57:54 2020 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jul 29 20:59:42 2020 +0200

tdf#130154: update locale data for Estonian [et-EE] - follow-up

Follow-up for 4804d969bacd25ad586b3bf70d3dc8c27adb48ef:
* change abbreviations to omit trailing periods, as officially preferred
* add quotes around literal characters in date formats
  (so those formats wouldn't be mistakenly detected as "user-defined")
* revert sorting of a few date formats for backwards compatibility's sake:
  - when opening files created in 7.0, previous versions shouldn't add
". a" anymore to formats that aren't supposed to have it

Change-Id: I666273aa32e7ca363aa929b8a1fd83bf46533f6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99264
Tested-by: Adolfo Jayme Barrientos 
Reviewed-by: Christian Lohmaier 

diff --git a/i18npool/source/localedata/data/et_EE.xml 
b/i18npool/source/localedata/data/et_EE.xml
index 5154760778ce..bdc06c16f5fe 100644
--- a/i18npool/source/localedata/data/et_EE.xml
+++ b/i18npool/source/localedata/data/et_EE.xml
@@ -47,8 +47,8 @@
   „
   ”
 
-e.l.
-p.l.
+e.l
+p.l
 metric
   
   
@@ -111,7 +111,7 @@
   DD.MM.YY
 
 
-  D.  
+  D.  ". a"
 
 
   D.M.
@@ -122,17 +122,17 @@
 
   D. M 
 
-
-  D. MMM 
+
+  D. MMM ". a"
 
-
-  D. MMM . a
+
+  D. MMM 
 
 
-  D.  
+  D.  ". a"
 
 
-  D.  . a
+  D.  
 
 
   NN, D. M 
@@ -141,10 +141,10 @@
   NN, D. MMM 
 
 
-  NN, D.  
+  NN, D.  ". a"
 
 
-  D.  . a
+  DD.  ". a"
 
 
   MM-DD
@@ -172,13 +172,13 @@
   WW
 
 
-  WW. "nädal"
+  WW". nädal"
 
 
-  WW. "nädal" 
+  WW". nädal "
 
 
-  NN, D.  . a
+  NN, D.  
 
 
   D.MM.
@@ -250,8 +250,8 @@
 0
 1
 2
- jj.
- jj.
+ jj
+ jj
   
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-07-23 Thread Andras Timar (via logerrit)
 i18npool/source/collator/collator_unicode.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 082a6eb7f26f684020e8e086fd4c2fea28c49b3a
Author: Andras Timar 
AuthorDate: Fri Jun 19 11:05:36 2020 +0200
Commit: Andras Timar 
CommitDate: Thu Jul 23 13:46:23 2020 +0200

tdf#132082 Fix a crash in LOKit (Japanese-only)

Change-Id: I09c8d3a129c0d1d2fab561add0447869156b193f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96693
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/i18npool/source/collator/collator_unicode.cxx 
b/i18npool/source/collator/collator_unicode.cxx
index b046546ad12f..39037cf2e77b 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -395,6 +395,11 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& 
rAlgorithm, const lang::
 icu::Locale icuLocale( LanguageTagIcu::getIcuLocale( LanguageTag( 
rLocale),
 "", rAlgorithm.isEmpty() ? OUString("") : "collation=" 
+ rAlgorithm));
 
+// FIXME: apparently we get here in LOKit case only. When the 
language is Japanese, we pass "ja@collation=phonetic (alphanumeric first)" to 
ICU
+// and ICU does not like this (U_ILLEGAL_ARGUMENT_ERROR). 
Subsequently LOKit crashes, because collator is nullptr.
+if (!strcmp(icuLocale.getLanguage(), "ja"))
+icuLocale = icu::Locale::getJapanese();
+
 // load ICU collator
 collator.reset( static_cast( 
icu::Collator::createInstance(icuLocale, status) ) );
 if (! U_SUCCESS(status)) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sw/qa

2020-07-21 Thread Michael Stahl (via logerrit)
 i18npool/source/breakiterator/breakiterator_unicode.cxx |5 +
 sw/qa/extras/layout/data/no-line-break-at-slash.fodt|   50 
 sw/qa/extras/layout/layout.cxx  |   40 
 3 files changed, 94 insertions(+), 1 deletion(-)

New commits:
commit a916e2253df2bf1415c25fb7f974e0d16b615d03
Author: Michael Stahl 
AuthorDate: Mon Jul 20 20:22:55 2020 +0200
Commit: Michael Stahl 
CommitDate: Tue Jul 21 13:17:47 2020 +0200

i18npool: don't break line at slash '/'

If sw text formatting gets the result of the special-case code added to
the "word boundary break" condition, it may call again the next time
with the preceding index, and fall into the "Line boundary break"
condition, which hence also needs to special case '/'.

(regression from ICU 60, 9206a08ada00e8762c4a634f242bd566028964bb)

Change-Id: I2aaefbc7b25af157e0a6ef15fabaa71bff1e8d9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99104
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx 
b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index 2d2ac437b430..7c79b99ec028 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -499,7 +499,10 @@ LineBreakResults SAL_CALL 
BreakIterator_Unicode::getLineBreak(
 icu::BreakIterator* pLineBI = line.mpValue->mpBreakIterator.get();
 bool GlueSpace=true;
 while (GlueSpace) {
-if (pLineBI->preceding(nStartPos + 1) == nStartPos) { //Line boundary 
break
+// don't break with Slash U+002F SOLIDUS at end of line; see "else" 
below!
+if (pLineBI->preceding(nStartPos + 1) == nStartPos
+&& (nStartPos == 0 || Text[nStartPos - 1] != '/'))
+{ //Line boundary break
 lbr.breakIndex = nStartPos;
 lbr.breakType = BreakType::WORDBOUNDARY;
 } else if (hOptions.rHyphenator.is()) { //Hyphenation break
diff --git a/sw/qa/extras/layout/data/no-line-break-at-slash.fodt 
b/sw/qa/extras/layout/data/no-line-break-at-slash.fodt
new file mode 100644
index ..e900594fa0c8
--- /dev/null
+++ b/sw/qa/extras/layout/data/no-line-break-at-slash.fodt
@@ -0,0 +1,50 @@
+
+
+http://openoffice.org/2009/office; 
xmlns:css3t="http://www.w3.org/TR/css3-text/; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#; 
xmlns:xhtml="http://www.w3.org/1999/xhtml; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema; 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:rpt="http://openoffice.org/2005/report; 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:dc="http://purl.org/dc/eleme
 nts/1.1/" xmlns:ooo="http://openoffice.org/2004/office; 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw; 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer; 
xmlns:oooc="http://openoffice.org/2004/calc; 
xmlns:tableooo="http://openoffice.org/2009/table; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:math="http://www.w3.org/1998/Math/MathML; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0
 " xmlns:dom="http://www.w3.org/2001/xml-events; 
xmlns:xforms="http://www.w3.org/2002/xforms; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ 
+  
+  
+  
+ 
+ 
+  
+   
+   
+
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+
+   
+   
+   
+  
+ 
+ 
+  
+ 
+ 
+  
+   
+   Blah blah bla bla bla Foostrasse 13/c/2, 
etc.
+  
+ 
+
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 5d70eec259b2..06bef3c37a10 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -1163,6 +1163,46 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, 

[Libreoffice-commits] core.git: i18npool/source solenv/bin

2020-07-14 Thread Noel Grandin (via logerrit)
 i18npool/source/search/i18nsearch.component |5 +-
 i18npool/source/search/textsearch.cxx   |   66 ++--
 solenv/bin/native-code.py   |3 -
 3 files changed, 11 insertions(+), 63 deletions(-)

New commits:
commit c6642e6c2366741eba893f2e91a6bc2761df7c35
Author: Noel Grandin 
AuthorDate: Tue Jul 14 09:52:39 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 14 12:03:46 2020 +0200

i18npool/i18nsearch: create instances with uno constructors

See tdf#74608 for motivation.

Change-Id: I5f8113393120fdad192f7347109a2186db141acb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98708
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/search/i18nsearch.component 
b/i18npool/source/search/i18nsearch.component
index ddb591f98b5f..fe7f48c26587 100644
--- a/i18npool/source/search/i18nsearch.component
+++ b/i18npool/source/search/i18nsearch.component
@@ -18,8 +18,9 @@
  -->
 
 http://openoffice.org/2010/uno-components;>
-  
+xmlns="http://openoffice.org/2010/uno-components;>
+  
 
 
   
diff --git a/i18npool/source/search/textsearch.cxx 
b/i18npool/source/search/textsearch.cxx
index 2bbd11ac0acb..abeceb993b06 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -1540,25 +1540,10 @@ SearchResult TextSearch::WildcardSrchBkwrd( const 
OUString& searchStr, sal_Int32
 }
 
 
-const char cSearchImpl[] = "com.sun.star.util.TextSearch_i18n";
-
-static uno::Sequence< OUString > getServiceName_Static()
-{
-uno::Sequence< OUString > aRet(2);
-aRet[0] = "com.sun.star.util.TextSearch";
-aRet[1] = "com.sun.star.util.TextSearch2";
-return aRet;
-}
-
-static OUString getImplementationName_Static()
-{
-return cSearchImpl;
-}
-
 OUString SAL_CALL
 TextSearch::getImplementationName()
 {
-return getImplementationName_Static();
+return "com.sun.star.util.TextSearch_i18n";
 }
 
 sal_Bool SAL_CALL TextSearch::supportsService(const OUString& rServiceName)
@@ -1569,53 +1554,14 @@ sal_Bool SAL_CALL TextSearch::supportsService(const 
OUString& rServiceName)
 Sequence< OUString > SAL_CALL
 TextSearch::getSupportedServiceNames()
 {
-Sequence< OUString > aRet { getServiceName_Static() };
-return aRet;
-}
-
-static css::uno::Reference< css::uno::XInterface >
-TextSearch_CreateInstance(
-const css::uno::Reference<
-css::lang::XMultiServiceFactory >& rxMSF )
-{
-return css::uno::Reference<
-css::uno::XInterface >(
-static_cast(new TextSearch(
-comphelper::getComponentContext( rxMSF ) )) );
+return { "com.sun.star.util.TextSearch", "com.sun.star.util.TextSearch2" };
 }
 
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT void*
-i18nsearch_component_getFactory( const char* sImplementationName,
- void* _pServiceManager,
- SAL_UNUSED_PARAMETER void* )
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+i18npool_TextSearch_get_implementation(
+css::uno::XComponentContext* context , css::uno::Sequence 
const&)
 {
-void* pRet = nullptr;
-
-css::lang::XMultiServiceFactory* pServiceManager =
-static_cast< css::lang::XMultiServiceFactory* >
-( _pServiceManager );
-css::uno::Reference<
-css::lang::XSingleServiceFactory > xFactory;
-
-if ( 0 == rtl_str_compare( sImplementationName, cSearchImpl) )
-{
-css::uno::Sequence< OUString > aServiceNames { getServiceName_Static() 
};
-xFactory = ::cppu::createSingleFactory(
-pServiceManager, getImplementationName_Static(),
-_CreateInstance, aServiceNames );
-}
-
-if ( xFactory.is() )
-{
-xFactory->acquire();
-pRet = xFactory.get();
-}
-
-return pRet;
+return cppu::acquire(new TextSearch(context));
 }
 
-} // extern "C"
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 11705d74e644..d310cbdb2811 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -25,7 +25,6 @@ core_factory_list = [
 ("libfsstoragelo.a", "fsstorage_component_getFactory"),
 ("libhyphenlo.a", "hyphen_component_getFactory"),
 ("libi18npoollo.a", "i18npool_component_getFactory"),
-("libi18nsearchlo.a", "i18nsearch_component_getFactory"),
 ("libinvocadaptlo.a", "invocadapt_component_getFactory"),
 ("liblnthlo.a", "lnth_component_getFactory", "#ifndef IOS"),
 ("liblocalebe1lo.a", "localebe1_component_getFactory"),
@@ -240,6 +239,8 @@ core_constructor_list = [
 "com_sun_star_i18n_Transliteration_IGNORE_KANA_get_implementation",
 "com_sun_star_i18n_Transliteration_IGNORE_WIDTH_get_implementation",
 "com_sun_star_text_DefaultNumberingProvider_get_implementation",
+# i18nsearch/sourceh/search/i18nsearch.component
+

[Libreoffice-commits] core.git: i18npool/source

2020-07-13 Thread Baurzhan Muftakhidinov (via logerrit)
 i18npool/source/localedata/data/kk_KZ.xml |   39 +-
 1 file changed, 23 insertions(+), 16 deletions(-)

New commits:
commit a3c3ab7394f578340c33e6e1cd8da13196a8b596
Author: Baurzhan Muftakhidinov 
AuthorDate: Sun Jul 12 18:57:09 2020 +0200
Commit: Eike Rathke 
CommitDate: Mon Jul 13 21:45:27 2020 +0200

tdf#134755 Update locale data for Kazakh [kk-KZ]

Change-Id: I47e920a98833f71bd5c8db0a0590a4f8cdcb83b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98465
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/kk_KZ.xml 
b/i18npool/source/localedata/data/kk_KZ.xml
index 121ab7ac887e..e2c913c5fea0 100644
--- a/i18npool/source/localedata/data/kk_KZ.xml
+++ b/i18npool/source/localedata/data/kk_KZ.xml
@@ -39,7 +39,7 @@



-  ж.
+   ж.
 
 
   „
@@ -47,11 +47,11 @@
   «
   »
 
-күндіз
-кешкі
+AM
+PM
 metric
   
-  
+  
 D.M
 
   General
@@ -168,16 +168,16 @@
 
   WW
 
-
+
   HH:MM
 
-
+
   HH:MM:SS
 
-
+
   HH:MM AM/PM
 
-
+
   HH:MM:SS AM/PM
 
 
@@ -193,7 +193,7 @@
   DD.MM.YY HH:MM
 
 
-  DD.MM. HH:MM:SS AM/PM
+  DD.MM. HH:MM:SS
 
 
   DD.MM. HH:MM
@@ -226,7 +226,7 @@
 
 
   mon
-  Дб
+  Дс
   Дүйсенбі
 
 
@@ -247,7 +247,7 @@
 
   fri
   Жм
-  Жума
+  Жұма
 
 
   sat
@@ -258,8 +258,8 @@
   
 
   jan
-  Қан
-  Қантар
+  Қаң
+  Қаңтар
 
 
   feb
@@ -299,7 +299,7 @@
 
   sep
   Қыр
-  Қырқүйек
+  Қыркүйек
 
 
   oct
@@ -337,6 +337,13 @@
   
   
 
+  KZT
+  ₸
+  KZT
+  Қазақстан теңгесі
+  2
+
+
   KZT
   тңг
   KZT
@@ -354,8 +361,8 @@
   
   
 
-  Ақиқат
-  Жалған
+  ақиқат
+  жалған
   бірінші тоқсан
   екінші тоқсан
   үшінші тоқсан
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-07-03 Thread Noel Grandin (via logerrit)
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |   31 
+++---
 1 file changed, 11 insertions(+), 20 deletions(-)

New commits:
commit 3c1026bd793ebd81a94a9bf8514553aea23ce375
Author: Noel Grandin 
AuthorDate: Fri Jul 3 10:49:52 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 3 13:11:41 2020 +0200

only loop over props once

Change-Id: If41314c90397199c14c91fe65ed41243ac385dae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97827
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index ae1e77055e88..648e55be3b07 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -621,30 +621,21 @@ DefaultNumberingProvider::makeNumberingString( const 
Sequence>=prefix;
- } catch (Exception&) {
-//prefix _must_ be empty here!
- }
- try {
-getPropertyByName(aProperties, "Suffix", false)  >>=suffix;
- } catch (Exception&) {
-//suffix _must_ be empty here!
- }
- try {
-getPropertyByName(aProperties, "NumberingType", true)   >>=numType;
- } catch (Exception& ) {
-numType = -1;
- }
- try {
-getPropertyByName(aProperties, "Value", true)   >>=number;
- } catch (Exception& ) {
-number = -1;
+ for (auto const & prop : aProperties)
+ {
+ if (prop.Name == "Prefix")
+ prop.Value >>= prefix;
+ else if (prop.Name == "Suffix")
+ prop.Value >>= suffix;
+ else if (prop.Name == "NumberingType")
+ prop.Value >>= numType;
+ else if (prop.Name == "Value")
+ prop.Value >>= number;
  }
 
  if( number <= 0 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-06-14 Thread Julien Nabet (via logerrit)
 i18npool/source/calendar/calendarImpl.cxx |   62 ++
 1 file changed, 30 insertions(+), 32 deletions(-)

New commits:
commit 19ac9f49a215a45e3cde835d06d37e3fec4ba4af
Author: Julien Nabet 
AuthorDate: Fri Jun 12 17:20:14 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun Jun 14 13:21:11 2020 +0200

Replace ERROR macro and trace exception (i18npool/calendarImpl)

Change-Id: Ie06a19b902e4dc12914fe0f2328a5abafa85368e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96208
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/calendar/calendarImpl.cxx 
b/i18npool/source/calendar/calendarImpl.cxx
index 8a288bcb6c31..f2959f0b3d46 100644
--- a/i18npool/source/calendar/calendarImpl.cxx
+++ b/i18npool/source/calendar/calendarImpl.cxx
@@ -31,8 +31,6 @@ using namespace ::com::sun::star::i18n;
 
 namespace i18npool {
 
-#define ERROR RuntimeException()
-
 CalendarImpl::CalendarImpl() : 
m_xContext(comphelper::getProcessComponentContext())
 {
 }
@@ -40,7 +38,7 @@ CalendarImpl::CalendarImpl() : 
m_xContext(comphelper::getProcessComponentContext
 CalendarImpl::CalendarImpl(const Reference< XComponentContext > ) : 
m_xContext(rxContext)
 {
 if (!m_xContext.is())
-throw ERROR;
+throw RuntimeException("CalendarImpl::CalendarImpl: empty m_xContext");
 }
 
 CalendarImpl::~CalendarImpl()
@@ -53,7 +51,7 @@ CalendarImpl::loadDefaultCalendarTZ( const css::lang::Locale& 
rLocale, const OUS
 const Sequence< Calendar2 > xC = 
LocaleDataImpl::get()->getAllCalendars2(rLocale);
 auto pCal = std::find_if(xC.begin(), xC.end(), [](const Calendar2& rCal) { 
return rCal.Default; });
 if (pCal == xC.end())
-throw ERROR;
+throw RuntimeException("CalendarImpl::loadDefaultCalendarTZ: no 
default calendar found for this locale");
 loadCalendarTZ(pCal->Name, rLocale, rTimeZone);
 }
 
@@ -85,7 +83,7 @@ CalendarImpl::loadCalendarTZ( const OUString& uniqueID, const 
css::lang::Locale&
 }
 
 if ( !xI.is() )
-throw ERROR;
+throw RuntimeException("CalendarImpl::loadCalendarTZ: no calendar 
found for this locale");
 xCalendar.set(xI, UNO_QUERY);
 
 if (!rTimeZone.isEmpty())
@@ -103,7 +101,7 @@ CalendarImpl::loadCalendarTZ( const OUString& uniqueID, 
const css::lang::Locale&
 if ( !xCalendar.is() )
 {
 xCalendar = xOldCalendar;
-throw ERROR;
+throw RuntimeException("CalendarImpl::loadCalendarTZ: no calendar 
found for this locale, should use old one?");
 }
 
 try
@@ -118,14 +116,14 @@ CalendarImpl::loadCalendarTZ( const OUString& uniqueID, 
const css::lang::Locale&
 
 if (!bTimeZone)
 // The calendar is usable but is not in the expected time zone.
-throw ERROR;
+throw RuntimeException("CalendarImpl::loadCalendarTZ: the calendar is 
usable but is not in the expected time zone");
 }
 
 Calendar2 SAL_CALL
 CalendarImpl::getLoadedCalendar2()
 {
 if (!xCalendar.is())
-throw ERROR;
+throw RuntimeException("CalendarImpl::getLoadedCalendar2: no 
calendar");
 return xCalendar->getLoadedCalendar2();
 }
 
@@ -133,7 +131,7 @@ CalendarImpl::getLoadedCalendar2()
 CalendarImpl::getLoadedCalendar()
 {
 if (!xCalendar.is())
-throw ERROR;
+throw RuntimeException("CalendarImpl::getLoadedCalendar: no calendar");
 return xCalendar->getLoadedCalendar();
 }
 
@@ -151,7 +149,7 @@ void SAL_CALL
 CalendarImpl::setDateTime( double fTimeInDays )
 {
 if (!xCalendar.is())
-throw ERROR;
+throw RuntimeException("CalendarImpl::setDateTime: no calendar");
 xCalendar->setDateTime( fTimeInDays );
 }
 
@@ -159,7 +157,7 @@ double SAL_CALL
 CalendarImpl::getDateTime()
 {
 if (!xCalendar.is())
-throw ERROR;
+throw RuntimeException("CalendarImpl::getDateTime: no calendar");
 return xCalendar->getDateTime();
 }
 
@@ -167,7 +165,7 @@ void SAL_CALL
 CalendarImpl::setLocalDateTime( double fTimeInDays )
 {
 if (!xCalendar.is())
-throw ERROR;
+throw RuntimeException("CalendarImpl::setLocalDateTime: no calendar");
 xCalendar->setLocalDateTime( fTimeInDays );
 }
 
@@ -175,7 +173,7 @@ double SAL_CALL
 CalendarImpl::getLocalDateTime()
 {
 if (!xCalendar.is())
-throw ERROR;
+throw RuntimeException("CalendarImpl::getLocalDateTime: no calendar");
 return xCalendar->getLocalDateTime();
 }
 
@@ -193,7 +191,7 @@ OUString SAL_CALL
 CalendarImpl::getUniqueID()
 {
 if (!xCalendar.is())
-throw ERROR;
+throw RuntimeException("CalendarImpl::getUniqueID: no calendar");
 return xCalendar->getUniqueID();
 }
 
@@ -201,7 +199,7 @@ void SAL_CALL
 CalendarImpl::setValue( sal_Int16 fieldIndex, sal_Int16 value )
 {
 if (!xCalendar.is())
-throw ERROR;
+throw RuntimeException("CalendarImpl::setValue: no calendar");
 xCalendar->setValue( fieldIndex, value );
 }
 
@@ -209,7 +207,7 @@ 

[Libreoffice-commits] core.git: i18npool/source include/test include/vbahelper linguistic/source oox/source pyuno/source sc/qa sd/qa sd/source

2020-05-21 Thread Noel Grandin (via logerrit)
 i18npool/source/localedata/localedata.cxx|7 -
 include/test/testinteractionhandler.hxx  |   12 +--
 include/vbahelper/vbacollectionimpl.hxx  |9 +-
 linguistic/source/hhconvdic.cxx  |7 -
 oox/source/core/xmlfilterbase.cxx|4 -
 oox/source/export/drawingml.cxx  |3 
 oox/source/helper/propertymap.cxx|   42 +--
 pyuno/source/module/pyuno_util.cxx   |5 -
 sc/qa/extras/new_cond_format.cxx |6 -
 sd/qa/unit/export-tests-ooxml1.cxx   |3 
 sd/qa/unit/export-tests-ooxml2.cxx   |   16 +---
 sd/qa/unit/import-tests-smartart.cxx |3 
 sd/qa/unit/import-tests.cxx  |   12 +--
 sd/source/ui/framework/configuration/ConfigurationTracer.cxx |8 +-
 14 files changed, 63 insertions(+), 74 deletions(-)

New commits:
commit 639511d7194726b188a2ecae9b3489a250532d03
Author: Noel Grandin 
AuthorDate: Thu May 21 09:05:51 2020 +0200
Commit: Noel Grandin 
CommitDate: Thu May 21 12:29:46 2020 +0200

use for-range on Sequence in i18npool..sd

Change-Id: I19eba57bc6058c317473d0746f06699a09ba2830
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94608
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/localedata/localedata.cxx 
b/i18npool/source/localedata/localedata.cxx
index d72d28e12298..4a8e565dc8e1 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -1260,7 +1260,6 @@ LocaleDataImpl::getContinuousNumberingLevels( const 
lang::Locale& rLocale )
 
 if ( func )
 {
-int i;
 // invoke function
 sal_Int16 nStyles;
 sal_Int16 nAttributes;
@@ -1268,12 +1267,12 @@ LocaleDataImpl::getContinuousNumberingLevels( const 
lang::Locale& rLocale )
 
 // allocate memory for nAttributes attributes for each of the nStyles 
styles.
 Sequence< Sequence > pv( nStyles );
-for( i=0; i( nAttributes );
+for( auto& i : pv ) {
+i = Sequence( nAttributes );
 }
 
 sal_Unicode const *** pStyle = p0;
-for( i=0;  i 
xApprove(rContinuations[i], css::uno::UNO_QUERY);
+css::uno::Reference xApprove(cont, 
css::uno::UNO_QUERY);
 if (xApprove.is())
 xApprove->select();
 }
@@ -121,23 +121,23 @@ public:
 }
 mbPasswordRequested = true;
 
-for (sal_Int32 i = 0; i < rContinuations.getLength(); ++i)
+for (auto const & cont : rContinuations)
 {
 if (mode == css::task::PasswordRequestMode_PASSWORD_REENTER)
 {   // cancel re-enter of wrong password, to avoid infinite loop
-css::uno::Reference const 
xAbort(rContinuations[i], css::uno::UNO_QUERY);
+css::uno::Reference const 
xAbort(cont, css::uno::UNO_QUERY);
 if (xAbort.is())
 xAbort->select();
 }
 else if (bIsRequestPasswordToModify)
 {
-css::uno::Reference const 
xIPW2(rContinuations[i], css::uno::UNO_QUERY);
+css::uno::Reference const 
xIPW2(cont, css::uno::UNO_QUERY);
 xIPW2->setPasswordToModify(msPassword);
 xIPW2->select();
 }
 else
 {
-css::uno::Reference const 
xIPW(rContinuations[i], css::uno::UNO_QUERY);
+css::uno::Reference const 
xIPW(cont, css::uno::UNO_QUERY);
 if (xIPW.is())
 {
 xIPW->setPassword(msPassword);
diff --git a/include/vbahelper/vbacollectionimpl.hxx 
b/include/vbahelper/vbacollectionimpl.hxx
index e2441457643f..9bb537e84f17 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -248,13 +248,12 @@ protected:
 
 if( mbIgnoreCase )
 {
-css::uno::Sequence< OUString > sElementNames = 
m_xNameAccess->getElementNames();
-for( sal_Int32 i = 0; i < sElementNames.getLength(); i++ )
+const css::uno::Sequence< OUString > sElementNames = 
m_xNameAccess->getElementNames();
+for( const OUString& rName : sElementNames )
 {
-OUString aName = sElementNames[i];
-if( aName.equalsIgnoreAsciiCase( sIndex ) )
+if( rName.equalsIgnoreAsciiCase( sIndex ) )
 {
-return createCollectionObject( m_xNameAccess->getByName( 
aName ) );
+return createCollectionObject( m_xNameAccess->getByName( 
rName ) );
 }
 }
 }
diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx
index 

[Libreoffice-commits] core.git: i18npool/source

2020-05-18 Thread Mihkel Tõnnov (via logerrit)
 i18npool/source/localedata/data/et_EE.xml |  126 --
 1 file changed, 87 insertions(+), 39 deletions(-)

New commits:
commit 4804d969bacd25ad586b3bf70d3dc8c27adb48ef
Author: Mihkel Tõnnov 
AuthorDate: Fri May 15 00:05:40 2020 +0200
Commit: Eike Rathke 
CommitDate: Tue May 19 01:45:35 2020 +0200

tdf#130154: update locale data for Estonian [et-EE]

* fix MinimalDaysInFirstWeek (supposed to be 4, not 1)
* fix FollowPageWord ("jj." = "ja järgmine/järgmised", not "pp.")
* fix Era DefaultAbbrvName & DefaultFullName to official spellings
* add DefaultNarrowName for months (using Roman numerals)
* translate TimeAM, TimePM - not commonly used, but abbreviations exist
* changes to date formats:
  - add some that are used, but were missing
  - remove those that aren't commonly used or which are ungrammatical
  - switch to more sensible defaults
  - minor re-sorting into more logical order

Change-Id: I2cf585febe7f100b2b63a94a3fd957a381adc131
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94256
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/et_EE.xml 
b/i18npool/source/localedata/data/et_EE.xml
index 219faf3990f4..5154760778ce 100644
--- a/i18npool/source/localedata/data/et_EE.xml
+++ b/i18npool/source/localedata/data/et_EE.xml
@@ -47,8 +47,8 @@
   „
   ”
 
-AM
-PM
+e.l.
+p.l.
 metric
   
   
@@ -110,67 +110,103 @@
 
   DD.MM.YY
 
-
-  DD.  . a
+
+  D.  
 
-
-  D.M.YY
+
+  D.M.
 
-
+
   DD.MM.
 
-
-  D. MMM YY
-
-
-  D. MMM . a
+
+  D. M 
 
-
-  D. MMM. 
+
+  D. MMM 
 
-
-  D.  . a
+
+  D. MMM . a
 
-
+
   D.  
 
-
-  NN, D. MMM YY
+
+  D.  . a
 
-
-  NN, DD. MMM YY
+
+  NN, D. M 
 
-
-  NN, D.  . a
+
+  NN, D. MMM 
 
-
-  D. , . a
+
+  NN, D.  
+
+
+  D.  . a
 
 
   MM-DD
 
-
+
   YY-MM-DD
 
 
   -MM-DD
   ISO 8601
 
-
-  MM.YY
+
+  M 
 
-
-  DD. MMM
+
+  D. MMM
 
 
   
 
 
-  QQ YY
+  QQ 
 
-
+
   WW
 
+
+  WW. "nädal"
+
+
+  WW. "nädal" 
+
+
+  NN, D.  . a
+
+
+  D.MM.
+
+
+  D.M.YY
+
+
+  D. 
+
+
+  DD.MM
+
+
+  D.MM
+
+
+   
+
+
+  MMM 
+
+
+   Q
+
+
+  Q YY
+
 
   HH:MM
 
@@ -214,8 +250,8 @@
 0
 1
 2
-p.
-pp.
+ jj.
+ jj.
   
   
 
@@ -261,79 +297,91 @@
   jan
   jaan
   jaanuar
+  I
 
 
   feb
   veebr
   veebruar
+  II
 
 
   mar
   märts
   märts
+  III
 
 
   apr
   apr
   aprill
+  IV
 
 
   may
   mai
   mai
+  V
 
 
   jun
   juuni
   juuni
+  VI
 
 
   jul
   juuli
   juuli
+  VII
 
 
   aug
   aug
   august
+  VIII
 
 
   sep
   sept
   september
+  IX
 
 
   oct
   okt
   oktoober
+  X
 
 
   nov
   nov
   november
+  XI
 
 
   dec
   dets
   detsember
+  XII
 
   
   
 
   bc
-  e.m.a.
-  enne meie aega
+  e.m.a
+  enne meie ajaarvamist
 
 
   ad
-  m.a.j.
-  meie aja järgi
+  m.a.j
+  meie ajaarvamise järgi
 
   
   
 mon
   
-  1
+  4
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-05-15 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/zh_CN.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6193bf1541be95c3679cdc5c4a96d4ab5fc5218c
Author: Eike Rathke 
AuthorDate: Thu May 14 20:47:44 2020 +0200
Commit: Eike Rathke 
CommitDate: Fri May 15 19:58:04 2020 +0200

Change [zh-CN] keyword 'General' to '常规', tdf#88233

Change-Id: I2f822a839724c7b4c2129d7f1bd1cce025b9289c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94254
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/zh_CN.xml 
b/i18npool/source/localedata/data/zh_CN.xml
index 8b2b93b82d27..814c6db9ba48 100644
--- a/i18npool/source/localedata/data/zh_CN.xml
+++ b/i18npool/source/localedata/data/zh_CN.xml
@@ -61,7 +61,7 @@
 M月D日
 
 
-  General
+  常规
 
 
   0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-05-06 Thread Tor Lillqvist (via logerrit)
 i18npool/source/collator/gencoll_rule.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d7edac51367fe92c2659afdfd6e4d7c771dc5229
Author: Tor Lillqvist 
AuthorDate: Tue May 5 18:58:32 2020 +0300
Commit: Andras Timar 
CommitDate: Thu May 7 07:08:44 2020 +0200

ICU requires that a collator charset data array is four-byte-aligned

See workdir/UnpackedTarball/icu/source/common/utrie2.cpp, the
U_POINTER_MASK_LSB() check:

if( length<=0 || (U_POINTER_MASK_LSB(data, 3)!=0) ||
valueBits<0 || UTRIE2_COUNT_VALUE_BITS<=valueBits
) {
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}

Apparently the data pointer there is always a multiple of four bytes
from the start of the data array that the gencoll_rule code generates.

Change-Id: I9b98b01b49b5800e1db8b077a4221b82d59510bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93507
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93603
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/i18npool/source/collator/gencoll_rule.cxx 
b/i18npool/source/collator/gencoll_rule.cxx
index 091ff6b2fa90..2d55e0c8917d 100644
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ b/i18npool/source/collator/gencoll_rule.cxx
@@ -50,7 +50,7 @@ static void data_write(char* file, char* name, sal_uInt8 
*data, sal_Int32 len)
 fprintf(fp, "\nextern \"C\" {\n");
 
 // generate main dict. data array
-fprintf(fp, "\nstatic const sal_uInt8 %s[] = {", name);
+fprintf(fp, "\nalignas(4) static const sal_uInt8 %s[] = {", name);
 
 sal_Int32 count = 0;
 for (sal_Int32 i = 0; i < len; i++) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-04-27 Thread Ian Barkley-Yeung (via logerrit)
 i18npool/source/breakiterator/breakiteratorImpl.cxx |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 27306e08a22e554f6f5bebccca4f778ae731
Author: Ian Barkley-Yeung 
AuthorDate: Sun Apr 26 20:18:33 2020 -0700
Commit: Stephan Bergmann 
CommitDate: Mon Apr 27 09:40:47 2020 +0200

tdf#42982: Improve UNO API error reporting

Improve error repoting in BreakIteratorImpl

Change-Id: I0be64a758ed81b7a720c8b26af14de6b51cc5dbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92955
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx 
b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index a6ce162270ef..5037a7c63474 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -53,7 +53,9 @@ BreakIteratorImpl::~BreakIteratorImpl()
 sal_Int32 SAL_CALL BreakIteratorImpl::nextCharacters( const OUString& Text, 
sal_Int32 nStartPos,
 const Locale , sal_Int16 nCharacterIteratorMode, sal_Int32 
nCount, sal_Int32& nDone )
 {
-if (nCount < 0) throw RuntimeException();
+if (nCount < 0)
+throw RuntimeException("BreakIteratorImpl::nextCharacters: expected 
nCount >=0, got "
+   + OUString::number(nCount));
 
 return LBI->nextCharacters( Text, nStartPos, rLocale, 
nCharacterIteratorMode, nCount, nDone);
 }
@@ -61,7 +63,9 @@ sal_Int32 SAL_CALL BreakIteratorImpl::nextCharacters( const 
OUString& Text, sal_
 sal_Int32 SAL_CALL BreakIteratorImpl::previousCharacters( const OUString& 
Text, sal_Int32 nStartPos,
 const Locale& rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 
nCount, sal_Int32& nDone )
 {
-if (nCount < 0) throw RuntimeException();
+if (nCount < 0)
+throw RuntimeException("BreakIteratorImpl::previousCharacters: 
expected nCount >=0, got "
+   + OUString::number(nCount));
 
 return LBI->previousCharacters( Text, nStartPos, rLocale, 
nCharacterIteratorMode, nCount, nDone);
 }
@@ -647,7 +651,7 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const 
Locale& rLocale)
 return xBI;
 }
 }
-throw RuntimeException();
+throw RuntimeException("getLocaleSpecificBreakIterator: iterator not 
found");
 }
 
 OUString SAL_CALL
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-04-20 Thread Noel Grandin (via logerrit)
 i18npool/source/breakiterator/breakiterator_unicode.cxx |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 65aeb5a630b5a9996ca3fdd2ab9750548dc7cc23
Author: Noel Grandin 
AuthorDate: Mon Apr 20 14:41:47 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Apr 20 20:54:18 2020 +0200

fix regression

from
commit c5424e19338a3edaec3f0459c8ac5d53ca92d9fe
loplugin:useuniqueptr in i18npool
which would have resulted in the block at line 245 inside
  #if (U_ICU_VERSION_MAJOR_NUM < 58)
never doing anything

spotted while doing improvements to my make_shared plugin

Change-Id: I79c664c7e4a051f3c764cb49d99870b51b19ce55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92567
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx 
b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index b756fbbdbee2..2d2ac437b430 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -152,7 +152,7 @@ void BreakIterator_Unicode::loadICUBreakIterator(const 
css::lang::Locale& rLocal
 udata_setAppData("OpenOffice", OpenOffice_dat, );
 if ( !U_SUCCESS(status) ) throw uno::RuntimeException();
 
-std::unique_ptr rbi;
+std::shared_ptr rbi;
 
 if (breakRules.getLength() > breakType && 
!breakRules[breakType].isEmpty())
 {
@@ -168,13 +168,13 @@ void BreakIterator_Unicode::loadICUBreakIterator(const 
css::lang::Locale& rLocal
 break;  // do
 }
 
-rbi.reset(new 
OOoRuleBasedBreakIterator(udata_open("OpenOffice", "brk",
-OUStringToOString(breakRules[breakType], 
RTL_TEXTENCODING_ASCII_US).getStr(), ), status));
+rbi = 
std::make_shared(udata_open("OpenOffice", "brk",
+OUStringToOString(breakRules[breakType], 
RTL_TEXTENCODING_ASCII_US).getStr(), ), status);
 
 if (U_SUCCESS(status))
 {
 icuBI->mpValue = std::make_shared();
-icuBI->mpValue->mpBreakIterator = std::move( rbi);
+icuBI->mpValue->mpBreakIterator = rbi;
 theBIMap.insert( std::make_pair( aBIMapRuleTypeKey, 
icuBI->mpValue));
 }
 else
@@ -202,11 +202,11 @@ void BreakIterator_Unicode::loadICUBreakIterator(const 
css::lang::Locale& rLocal
 OString aUDName = rtl::OStringView(rule) + "_" + aLanguage;
 UDataMemory* pUData = udata_open("OpenOffice", "brk", 
aUDName.getStr(), );
 if( U_SUCCESS(status) )
-rbi.reset(new OOoRuleBasedBreakIterator( pUData, status));
+rbi = std::make_shared( pUData, 
status);
 if ( U_SUCCESS(status) )
 {
 icuBI->mpValue = std::make_shared();
-icuBI->mpValue->mpBreakIterator = std::move( rbi);
+icuBI->mpValue->mpBreakIterator = rbi;
 theBIMap.insert( std::make_pair( aBIMapRuleKey, 
icuBI->mpValue));
 }
 else
@@ -228,11 +228,11 @@ void BreakIterator_Unicode::loadICUBreakIterator(const 
css::lang::Locale& rLocal
 status = U_ZERO_ERROR;
 pUData = udata_open("OpenOffice", "brk", rule, );
 if( U_SUCCESS(status) )
-rbi.reset(new OOoRuleBasedBreakIterator( pUData, 
status));
+rbi = std::make_shared( 
pUData, status);
 if ( U_SUCCESS(status) )
 {
 icuBI->mpValue = std::make_shared();
-icuBI->mpValue->mpBreakIterator = std::move( rbi);
+icuBI->mpValue->mpBreakIterator = rbi;
 theBIMap.insert( std::make_pair( aBIMapRuleOnlyKey, 
icuBI->mpValue));
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-04-07 Thread DaeHyun Sung (via logerrit)
 i18npool/source/collator/data/ko_charset.txt | 1354 ++-
 1 file changed, 1118 insertions(+), 236 deletions(-)

New commits:
commit b3363960f97dcb7eaa10dfa708d71198a345924c
Author: DaeHyun Sung 
AuthorDate: Sat Jan 18 21:21:05 2020 +0900
Commit: Eike Rathke 
CommitDate: Wed Apr 8 00:54:44 2020 +0200

fix Korean Hangul Syllable Character order tdf#130067

i18npool/source/collator/data/ko_charset.txt
Korean Hangul syllables ordering is wrong.
Some hangul syllables are dissapeared on the text file.

Hangul Syllable ordering is already specified on Unicode Code chart.

Ref. Hangul Syllables Range: AC00–D7AF
https://unicode.org/charts/PDF/UAC00.pdf

That commit applies only Hangul Syllables range.
Korean Hanja[한자/漢字] range will require investigation.
hanja[한자/漢字] is korean name for chinese character.

Change-Id: I31e5cbf04294ee3bd6bff3277f9fe1328530ac3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87018
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/collator/data/ko_charset.txt 
b/i18npool/source/collator/data/ko_charset.txt
index 4c0b2ea0eb2e..4e5de8916ad2 100644
--- a/i18npool/source/collator/data/ko_charset.txt
+++ b/i18npool/source/collator/data/ko_charset.txt
@@ -19,242 +19,1124 @@
 # Collation rule for Korean charset
 
 & [top]
-<가<각
-<간<갇<갈<갉<갊<감<갑<값<갓<갔
-<강<갖<갗<같<갚<갛<개<객<갠<갤
-<갬<갭<갯<갰<갱<갸<갹<갼<걀<걋
-<걍<걔<걘<걜<거<걱<건<걷<걸<걺
-<검<겁<것<겄<겅<겆<겉<겊<겋<게
-<겐<겔<겜<겝<겟<겠<겡<겨<격<겪
-<견<겯<결<겸<겹<겻<겼<경<곁<계
-<곈<곌<곕<곗<고<곡<곤<곧<골<곪
-<곬<곯<곰<곱<곳<공<곶<과<곽<관
-<괄<괆<괌<괍<괏<광<괘<괜<괠<괩
-<괬<괭<괴<괵<괸<괼<굄<굅<굇<굉
-<교<굔<굘<굡<굣<구<국<군<굳<굴
-<굵<굶<굻<굼<굽<굿<궁<궂<궈<궉
-<권<궐<궜<궝<궤<궷<귀<귁<귄<귈
-<귐<귑<귓<규<균<귤<그<극<근<귿
-<글<긁<금<급<긋<긍<긔<기<긱<긴
-<긷<길<긺<김<깁<깃<깅<깆<깊<까
-<깍<깎<깐<깔<깖<깜<깝<깟<깠<깡
-<깥<깨<깩<깬<깰<깸<깹<깻<깼<깽
-<꺄<꺅<꺌<꺼<꺽<꺾<껀<껄<껌<껍
-<껏<껐<껑<께<껙<껜<껨<껫<껭<껴
-<껸<껼<꼇<꼈<꼍<꼐<꼬<꼭<꼰<꼲
-<꼴<꼼<꼽<꼿<꽁<꽂<꽃<꽈<꽉<꽐
-<꽜<꽝<꽤<꽥<꽹<꾀<꾄<꾈<꾐<꾑
-<꾕<꾜<꾸<꾹<꾼<꿀<꿇<꿈<꿉<꿋
-<꿍<꿎<꿔<꿜<꿨<꿩<꿰<꿱<꿴<꿸
-<뀀<뀁<뀄<뀌<뀐<뀔<뀜<뀝<뀨<끄
-<끅<끈<끊<끌<끎<끓<끔<끕<끗<끙
-<끝<끼<끽<낀<낄<낌<낍<낏<낑<나
-<낙<낚<난<낟<날<낡<낢<남<납<낫
-<났<낭<낮<낯<낱<낳<내<낵<낸<낼
-<냄<냅<냇<냈<냉<냐<냑<냔<냘<냠
-<냥<너<넉<넋<넌<널<넒<넓<넘<넙
-<넛<넜<넝<넣<네<넥<넨<넬<넴<넵
-<넷<넸<넹<녀<녁<년<녈<념<녑<녔
-<녕<녘<녜<녠<노<녹<논<놀<놂<놈
-<놉<놋<농<높<놓<놔<놘<놜<놨<뇌
-<뇐<뇔<뇜<뇝<뇟<뇨<뇩<뇬<뇰<뇹
-<뇻<뇽<누<눅<눈<눋<눌<눔<눕<눗
-<눙<눠<눴<눼<뉘<뉜<뉠<뉨<뉩<뉴
-<뉵<뉼<늄<늅<늉<느<늑<는<늘<늙
-<늚<늠<늡<늣<능<늦<늪<늬<늰<늴
-<니<닉<닌<닐<닒<님<닙<닛<닝<닢
-<다<닥<닦<단<닫<달<닭<닮<닯<닳
-<담<답<닷<닸<당<닺<닻<닿<대<댁
-<댄<댈<댐<댑<댓<댔<댕<댜<더<덕
-<덖<던<덛<덜<덞<덟<덤<덥<덧<덩
-<덫<덮<데<덱<덴<델<뎀<뎁<뎃<뎄
-<뎅<뎌<뎐<뎔<뎠<뎡<뎨<뎬<도<독
-<돈<돋<돌<돎<돐<돔<돕<돗<동<돛
-<돝<돠<돤<돨<돼<됐<되<된<될<됨
-<됩<됫<됴<두<둑<둔<둘<둠<둡<둣
-<둥<둬<뒀<뒈<뒝<뒤<뒨<뒬<뒵<뒷
-<뒹<듀<듄<듈<듐<듕<드<득<든<듣
-<들<듦<듬<듭<듯<등<듸<디<딕<딘
-<딛<딜<딤<딥<딧<딨<딩<딪<따<딱
-<딴<딸<땀<땁<땃<땄<땅<땋<때<땍
-<땐<땔<땜<땝<땟<땠<땡<떠<떡<떤
-<떨<떪<떫<떰<떱<떳<떴<떵<떻<떼
-<떽<뗀<뗄<뗌<뗍<뗏<뗐<뗑<뗘<뗬
-<또<똑<똔<똘<똥<똬<똴<뙈<뙤<뙨
-<뚜<뚝<뚠<뚤<뚫<뚬<뚱<뛔<뛰<뛴
-<뛸<뜀<뜁<뜅<뜨<뜩<뜬<뜯<뜰<뜸
-<뜹<뜻<띄<띈<띌<띔<띕<띠<띤<띨
-<띰<띱<띳<띵<라<락<란<랄<람<랍
-<랏<랐<랑<랒<랖<랗<래<랙<랜<랠
-<램<랩<랫<랬<랭<랴<략<랸<럇<량
-<러<럭<런<럴<럼<럽<럿<렀<렁<렇
-<레<렉<렌<렐<렘<렙<렛<렝<려<력
-<련<렬<렴<렵<렷<렸<령<례<롄<롑
-<롓<로<록<론<롤<롬<롭<롯<롱<롸
-<롼<뢍<뢨<뢰<뢴<뢸<룀<룁<룃<룅
-<료<룐<룔<룝<룟<룡<루<룩<룬<룰
-<룸<룹<룻<룽<뤄<뤘<뤠<뤼<뤽<륀
-<륄<륌<륏<륑<류<륙<륜<률<륨<륩
-<륫<륭<르<륵<른<를<름<릅<릇<릉
-<릊<릍<릎<리<릭<린<릴<림<립<릿
-<링<마<막<만<많<맏<말<맑<맒<맘
-<맙<맛<망<맞<맡<맣<매<맥<맨<맬
-<맴<맵<맷<맸<맹<맺<먀<먁<먈<먕
-<머<먹<먼<멀<멂<멈<멉<멋<멍<멎
-<멓<메<멕<멘<멜<멤<멥<멧<멨<멩
-<며<멱<면<멸<몃<몄<명<몇<몌<모
-<목<몫<몬<몰<몲<몸<몹<못<몽<뫄
-<뫈<뫘<뫙<뫼<묀<묄<묍<묏<묑<묘
-<묜<묠<묩<묫<무<묵<묶<문<묻<물
-<묽<묾<뭄<뭅<뭇<뭉<뭍<뭏<뭐<뭔
-<뭘<뭡<뭣<뭬<뮈<뮌<뮐<뮤<뮨<뮬
-<뮴<뮷<므<믄<믈<믐<믓<미<믹<민
-<믿<밀<밂<밈<밉<밋<밌<밍<및<밑
-<바<박<밖<밗<반<받<발<밝<밞<밟
-<밤<밥<밧<방<밭<배<백<밴<밸<뱀
-<뱁<뱃<뱄<뱅<뱉<뱌<뱍<뱐<뱝<버
-<벅<번<벋<벌<벎<범<법<벗<벙<벚
-<베<벡<벤<벧<벨<벰<벱<벳<벴<벵
-<벼<벽<변<별<볍<볏<볐<병<볕<볘
-<볜<보<복<볶<본<볼<봄<봅<봇<봉
-<봐<봔<봤<봬<뵀<뵈<뵉<뵌<뵐<뵘
-<뵙<뵤<뵨<부<북<분<붇<불<붉<붊
-<붐<붑<붓<붕<붙<붚<붜<붤<붰<붸
-<뷔<뷕<뷘<뷜<뷩<뷰<뷴<뷸<븀<븃
-<븅<브<븍<븐<블<븜<븝<븟<비<빅
-<빈<빌<빎<빔<빕<빗<빙<빚<빛<빠
-<빡<빤<빨<빪<빰<빱<빳<빴<빵<빻
-<빼<빽<뺀<뺄<뺌<뺍<뺏<뺐<뺑<뺘
-<뺙<뺨<뻐<뻑<뻔<뻗<뻘<뻠<뻣<뻤
-<뻥<뻬<뼁<뼈<뼉<뼘<뼙<뼛<뼜<뼝
-<뽀<뽁<뽄<뽈<뽐<뽑<뽕<뾔<뾰<뿅
-<뿌<뿍<뿐<뿔<뿜<뿟<뿡<쀼<쁑<쁘
-<쁜<쁠<쁨<쁩<삐<삑<삔<삘<삠<삡
-<삣<삥<사<삭<삯<산<삳<살<삵<삶
-<삼<삽<삿<샀<상<샅<새<색<샌<샐
-<샘<샙<샛<샜<생<샤<샥<샨<샬<샴
-<샵<샷<샹<섀<섄<섈<섐<섕<서<석
-<섞<섟<선<섣<설<섦<섧<섬<섭<섯
-<섰<성<섶<세<섹<센<셀<셈<셉<셋
-<셌<셍<셔<셕<션<셜<셤<셥<셧<셨
-<셩<셰<셴<셸<솅<소<속<솎<손<솔
-<솖<솜<솝<솟<송<솥<솨<솩<솬<솰
-<솽<쇄<쇈<쇌<쇔<쇗<쇘<쇠<쇤<쇨
-<쇰<쇱<쇳<쇼<쇽<숀<숄<숌<숍<숏
-<숑<수<숙<순<숟<술<숨<숩<숫<숭
-<숯<숱<숲<숴<쉈<쉐<쉑<쉔<쉘<쉠
-<쉥<쉬<쉭<쉰<쉴<쉼<쉽<쉿<슁<슈
-<슉<슐<슘<슛<슝<스<슥<슨<슬<슭
-<슴<습<슷<승<시<식<신<싣<실<싫
-<심<십<싯<싱<싶<싸<싹<싻<싼<쌀
-<쌈<쌉<쌌<쌍<쌓<쌔<쌕<쌘<쌜<쌤
-<쌥<쌨<쌩<썅<써<썩<썬<썰<썲<썸
-<썹<썼<썽<쎄<쎈<쎌<쏀<쏘<쏙<쏜
-<쏟<쏠<쏢<쏨<쏩<쏭<쏴<쏵<쏸<쐈
-<쐐<쐤<쐬<쐰<쐴<쐼<쐽<쑈<쑤<쑥
-<쑨<쑬<쑴<쑵<쑹<쒀<쒔<쒜<쒸<쒼
-<쓩<쓰<쓱<쓴<쓸<쓺<쓿<씀<씁<씌
-<씐<씔<씜<씨<씩<씬<씰<씸<씹<씻
-<씽<아<악<안<앉<않<알<앍<앎<앓
-<암<압<앗<았<앙<앝<앞<애<액<앤
-<앨<앰<앱<앳<앴<앵<야<약<얀<얄
-<얇<얌<얍<얏<양<얕<얗<얘<얜<얠
-<얩<어<억<언<얹<얻<얼<얽<얾<엄
-<업<없<엇<었<엉<엊<엌<엎<에<엑
-<엔<엘<엠<엡<엣<엥<여<역<엮<연
-<열<엶<엷<염<엽<엾<엿<였<영<옅
-<옆<옇<예<옌<옐<옘<옙<옛<옜<오
-<옥<온<올<옭<옮<옰<옳<옴<옵<옷
-<옹<옻<와<왁<완<왈<왐<왑<왓<왔
-<왕<왜<왝<왠<왬<왯<왱<외<왹<왼
-<욀<욈<욉<욋<욍<요<욕<욘<욜<욤
-<욥<욧<용<우<욱<운<울<욹<욺<움
-<웁<웃<웅<워<웍<원<월<웜<웝<웠
-<웡<웨<웩<웬<웰<웸<웹<웽<위<윅
-<윈<윌<윔<윕<윗<윙<유<육<윤<율
-<윰<윱<윳<융<윷<으<윽<은<을<읊
-<음<읍<읏<응<읒<읓<읔<읕<읖<읗
-<의<읜<읠<읨<읫<이<익<인<일<읽
-<읾<잃<임<입<잇<있<잉<잊<잎<자
-<작<잔<잖<잗<잘<잚<잠<잡<잣<잤
-<장<잦<재<잭<잰<잴<잼<잽<잿<쟀
-<쟁<쟈<쟉<쟌<쟎<쟐<쟘<쟝<쟤<쟨
-<쟬<저<적<전<절<젊<점<접<젓<정
-<젖<제<젝<젠<젤<젬<젭<젯<젱<져
-<젼<졀<졈<졉<졌<졍<졔<조<족<존
-<졸<졺<좀<좁<좃<종<좆<좇<좋<좌

[Libreoffice-commits] core.git: i18npool/source

2020-04-02 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/vi_VN.xml |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 28ccea8b7feed20d33e2ca7d6197d947dbbad848
Author: Eike Rathke 
AuthorDate: Thu Apr 2 18:14:14 2020 +0200
Commit: Eike Rathke 
CommitDate: Thu Apr 2 18:54:35 2020 +0200

Resolves: tdf#131829 [vi-VN] set currency VND decimals to 0

Change-Id: I865d6b3dcb7f3bff037a4015aa98db2fa2578672
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91593
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/vi_VN.xml 
b/i18npool/source/localedata/data/vi_VN.xml
index c2ee30b98bbc..2203461443b5 100644
--- a/i18npool/source/localedata/data/vi_VN.xml
+++ b/i18npool/source/localedata/data/vi_VN.xml
@@ -90,19 +90,19 @@
   #.##0 [CURRENCY];-#.##0 [CURRENCY]
 
 
-  #.##0,00 [CURRENCY];-#.##0,00 [CURRENCY]
+  #.##0 [CURRENCY];-#.##0 [CURRENCY]
 
 
   #.##0 [CURRENCY];[RED]-#.##0 [CURRENCY]
 
 
-  #.##0,00 [CURRENCY];[RED]-#.##0,00 [CURRENCY]
+  #.##0 [CURRENCY];[RED]-#.##0 [CURRENCY]
 
 
-  #.##0,00 CCC
+  #.##0 CCC
 
 
-  #.##0,-- [CURRENCY];[RED]-#.##0,-- [CURRENCY]
+  #.##0 [CURRENCY];[RED]-#.##0 [CURRENCY]
 
 
   D/M/YY
@@ -342,7 +342,7 @@
   ₫
   VND
   Việt Nam Đồng
-  2
+  0
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-03-31 Thread Johnny_M (via logerrit)
 i18npool/source/search/textsearch.cxx |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 3a1a27b1c25c96632b7bb1cfa81ca204e5bc043c
Author: Johnny_M 
AuthorDate: Fri Mar 27 13:20:41 2020 +0100
Commit: Michael Weghorn 
CommitDate: Tue Mar 31 15:27:21 2020 +0200

Translate German variable names

Ende -> End

Change-Id: I47faa58be14d9e608a4fad61279026d676c185c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91207
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/i18npool/source/search/textsearch.cxx 
b/i18npool/source/search/textsearch.cxx
index da4d9cada678..1c74a085a03d 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -685,15 +685,15 @@ SearchResult TextSearch::NSrchFrwrd( const OUString& 
searchStr, sal_Int32 startP
 OUString sSearchKey = bUsePrimarySrchStr ? sSrchStr : sSrchStr2;
 
 sal_Int32 nSuchIdx = searchStr.getLength();
-sal_Int32 nEnde = endPos;
+sal_Int32 nEnd = endPos;
 if( !nSuchIdx || !sSearchKey.getLength() || sSearchKey.getLength() > 
nSuchIdx )
 return aRet;
 
 
-if( nEnde < sSearchKey.getLength() )  // position inside the search region 
?
+if( nEnd < sSearchKey.getLength() )   // position inside the search region 
?
 return aRet;
 
-nEnde -= sSearchKey.getLength();
+nEnd -= sSearchKey.getLength();
 
 if (bUsePrimarySrchStr)
   MakeForwardTab();   // create the jumptable
@@ -701,7 +701,7 @@ SearchResult TextSearch::NSrchFrwrd( const OUString& 
searchStr, sal_Int32 startP
   MakeForwardTab2();
 
 for (sal_Int32 nCmpIdx = startPos; // start position for the search
-nCmpIdx <= nEnde;
+nCmpIdx <= nEnd;
 nCmpIdx += GetDiff( searchStr[nCmpIdx + sSearchKey.getLength()-1]))
 {
 // if the match would be the completed cells, skip it.
@@ -755,7 +755,7 @@ SearchResult TextSearch::NSrchBkwrd( const OUString& 
searchStr, sal_Int32 startP
 OUString sSearchKey = bUsePrimarySrchStr ? sSrchStr : sSrchStr2;
 
 sal_Int32 nSuchIdx = searchStr.getLength();
-sal_Int32 nEnde = endPos;
+sal_Int32 nEnd = endPos;
 if( nSuchIdx == 0 || sSearchKey.isEmpty() || sSearchKey.getLength() > 
nSuchIdx)
 return aRet;
 
@@ -764,14 +764,14 @@ SearchResult TextSearch::NSrchBkwrd( const OUString& 
searchStr, sal_Int32 startP
 else
 MakeBackwardTab2();
 
-if( nEnde == nSuchIdx ) // end position for the search
-nEnde = sSearchKey.getLength();
+if( nEnd == nSuchIdx )  // end position for the search
+nEnd = sSearchKey.getLength();
 else
-nEnde += sSearchKey.getLength();
+nEnd += sSearchKey.getLength();
 
 sal_Int32 nCmpIdx = startPos;  // start position for the search
 
-while (nCmpIdx >= nEnde)
+while (nCmpIdx >= nEnd)
 {
 // if the match would be the completed cells, skip it.
 if ( (!checkCTLStart || isCellStart( searchStr, nCmpIdx -
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-03-25 Thread Jean-Louis Fuchs (via logerrit)
 i18npool/source/localedata/data/fr_CH.xml |8 
 i18npool/source/localedata/data/it_CH.xml |8 
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 6cd926f385d0cd2656ce69b3c2efbdc35ee7da44
Author: Jean-Louis Fuchs 
AuthorDate: Tue Mar 10 15:49:17 2020 +0100
Commit: Eike Rathke 
CommitDate: Wed Mar 25 22:38:23 2020 +0100

tdf#131153 Correct LongDateDaySeparator for fr_CH and it_CH

According to localeplanet [1] [2], in comparison to other software and 
people
living it these areas, the LongDateDaySeparator '.' for fr_CH and it_CH in
LibreOffice is not correct. It should be omitted.

[1] http://www.localeplanet.com/icu/it-CH/index.html
[2] http://www.localeplanet.com/icu/fr-CH/index.html

This means for the FormatElement index 22, 23, 24, 25, 26 should be the 
same in
fr_CH/fr_FR and it_CH/it_IT.

Change-Id: Ief4de0d8728c7a3bbcfac7f6200f37f2d2c647aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90427
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/fr_CH.xml 
b/i18npool/source/localedata/data/fr_CH.xml
index d6c0ac34b024..563e9a2aebd7 100644
--- a/i18npool/source/localedata/data/fr_CH.xml
+++ b/i18npool/source/localedata/data/fr_CH.xml
@@ -37,7 +37,7 @@
   .
   ;
   , 
-  . 
+   


 
@@ -118,16 +118,16 @@
   JJ.MM.
 
 
-  J. MMM AA
+  J MMM AA
 
 
-  J. MMM 
+  J MMM 
 
 
   J. MMM 
 
 
-  J.  
+  J  
 
 
   J.  
diff --git a/i18npool/source/localedata/data/it_CH.xml 
b/i18npool/source/localedata/data/it_CH.xml
index 2da786dd4201..84dc7c09a7c2 100644
--- a/i18npool/source/localedata/data/it_CH.xml
+++ b/i18npool/source/localedata/data/it_CH.xml
@@ -37,7 +37,7 @@
   .
   ;
   , 
-  . 
+   


 
@@ -117,16 +117,16 @@
   GG.MM.
 
 
-  G. MMM AA
+  G MMM AA
 
 
-  G. MMM 
+  G MMM 
 
 
   G. MMM. 
 
 
-  G.  
+  G  
 
 
   G.  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-03-22 Thread Julien Nabet (via logerrit)
 i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1098ed05edfd86d4518ae6c9d43448e3e2f21ba6
Author: Julien Nabet 
AuthorDate: Sun Mar 22 14:48:39 2020 +0100
Commit: Eike Rathke 
CommitDate: Sun Mar 22 19:33:55 2020 +0100

tdf#131464: fix create an index of Writer in Japanese locale

in i18npool/source/collator/collator_unicode.cxx, we got:
 177 // replace algorithm name to implementation 
name.
 178 if (rAlgorithm == "phonetic (alphanumeric 
first)")
 179 aBuf.append("phonetic_alphanumeric_first");
 180 else if (rAlgorithm == "phonetic (alphanumeric 
last)")
 181 aBuf.append("phonetic_alphanumeric_last");
 182 else
 183 aBuf.append(rAlgorithm);

So don't add extra ja_ before "phonetic..."

Also we already add "ja" in buffer with line:
158 
aBuf.append("get_").append(rLocale.Language).append("_");
so right functions from ICU will be retrieved

Change-Id: I163c3ca4bb4dcfa1e5d29313190c5ba3e6396c4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90877
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx 
b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx
index e4636d348469..bae3923b3146 100644
--- a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx
@@ -63,7 +63,7 @@ sal_Int16 SAL_CALL 
IndexEntrySupplier_ja_phonetic::compareIndexEntry(
 return result;
 }
 
-static const char first[] = "ja_phonetic (alphanumeric first)";
+static const char first[] = "phonetic (alphanumeric first)";
 sal_Bool SAL_CALL 
IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable::loadAlgorithm(
 const css::lang::Locale& rLocale, const OUString& /*SortAlgorithm*/,
 sal_Int32 collatorOptions )
@@ -77,7 +77,7 @@ sal_Bool SAL_CALL 
IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant
 return collator->loadCollatorAlgorithm(first, rLocale, collatorOptions) == 
0;
 }
 
-static const char last[] = "ja_phonetic (alphanumeric last)";
+static const char last[] = "phonetic (alphanumeric last)";
 sal_Bool SAL_CALL 
IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable::loadAlgorithm(
 const css::lang::Locale& rLocale, const OUString& /*SortAlgorithm*/,
 sal_Int32 collatorOptions )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sw/qa

2020-03-20 Thread Miklos Vajna (via logerrit)
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |1 
 sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt|binary
 sw/qa/extras/odfexport/odfexport.cxx  |   13 
++
 3 files changed, 14 insertions(+)

New commits:
commit 5b071c10d36371d1f9ce14ab13230bfd703d0245
Author: Miklos Vajna 
AuthorDate: Fri Mar 20 17:27:21 2020 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 20 21:46:35 2020 +0100

sw pad-to-4 numbering: add ODF filter

This makes the UI work as well.

Change-Id: I4e94b85097cc359b257b07ba7517edfab3011093
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90827
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 17d398077ce0..ea308fcaefe9 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -1049,6 +1049,7 @@ static const Supported_NumberingType aSupportedTypes[] =
 {style::NumberingType::CHARS_GREEK_LOWER_LETTER,   S_GR_A ", " S_GR_B 
", ... (gr)", LANG_ALL},
 {style::NumberingType::ARABIC_ZERO, "01, 02, 03, ...", LANG_ALL},
 {style::NumberingType::ARABIC_ZERO3, "001, 002, 003, ...", LANG_ALL},
+{style::NumberingType::ARABIC_ZERO4, "0001, 0002, 0003, ...", 
LANG_ALL},
 };
 static const sal_Int32 nSupported_NumberingTypes = 
SAL_N_ELEMENTS(aSupportedTypes);
 
diff --git a/sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt 
b/sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt
new file mode 100644
index ..2eb9b49cedaa
Binary files /dev/null and 
b/sw/qa/extras/odfexport/data/arabic-zero4-numbering.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index 3c1403473515..052efd073ad5 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2370,5 +2370,18 @@ DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, 
"arabic-zero3-numbering.odt")
  aMap["NumberingType"].get());
 }
 
+DECLARE_ODFEXPORT_TEST(testArabicZero4Numbering, "arabic-zero4-numbering.odt")
+{
+auto xNumberingRules
+= 
getProperty>(getParagraph(1), 
"NumberingRules");
+comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 66
+// - Actual  : 4
+// i.e. numbering type was ARABIC, not ARABIC_ZERO4.
+
CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::ARABIC_ZERO4),
+ aMap["NumberingType"].get());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sw/qa

2020-03-18 Thread Miklos Vajna (via logerrit)
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |1 
 sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt|binary
 sw/qa/extras/odfexport/odfexport.cxx  |   13 
++
 3 files changed, 14 insertions(+)

New commits:
commit 086bfde59232076644995ae862cd43865419ad98
Author: Miklos Vajna 
AuthorDate: Wed Mar 18 10:18:42 2020 +0100
Commit: Miklos Vajna 
CommitDate: Wed Mar 18 11:06:55 2020 +0100

sw pad-to-3 numbering: add ODF filter

This makes the UI work as well.

Change-Id: I8d64b88e57ba3e4fd61afba892f0ee2267f1c8b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90683
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 86b64a3d23ad..9abb5ae5c051 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -1044,6 +1044,7 @@ static const Supported_NumberingType aSupportedTypes[] =
 {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},
 {style::NumberingType::ARABIC_ZERO, "01, 02, 03, ...", LANG_ALL},
+{style::NumberingType::ARABIC_ZERO3, "001, 002, 003, ...", LANG_ALL},
 };
 static const sal_Int32 nSupported_NumberingTypes = 
SAL_N_ELEMENTS(aSupportedTypes);
 
diff --git a/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt 
b/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt
new file mode 100644
index ..0bdca270eece
Binary files /dev/null and 
b/sw/qa/extras/odfexport/data/arabic-zero3-numbering.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index a89e916a2749..3c1403473515 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2357,5 +2357,18 @@ DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, 
"arabic-zero-numbering.odt")
  aMap["NumberingType"].get());
 }
 
+DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, "arabic-zero3-numbering.odt")
+{
+auto xNumberingRules
+= 
getProperty>(getParagraph(1), 
"NumberingRules");
+comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 65
+// - Actual  : 4
+// i.e. numbering type was ARABIC, not ARABIC_ZERO3.
+
CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::ARABIC_ZERO3),
+ aMap["NumberingType"].get());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-03-15 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/LocaleNode.cxx |   63 --
 i18npool/source/localedata/LocaleNode.hxx |3 +
 2 files changed, 46 insertions(+), 20 deletions(-)

New commits:
commit 998c0845e6a4fdcfdfee59af59dd997fc99a23f0
Author: Eike Rathke 
AuthorDate: Thu Mar 12 20:34:07 2020 +0100
Commit: Eike Rathke 
CommitDate: Sun Mar 15 18:23:04 2020 +0100

Check for some more expected calendar elements

Change-Id: I615ffc60fcc235fcc84848a22fd7bd3b0d8179d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90441
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index 558967cbc978..38c0bce2055d 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -1527,6 +1527,24 @@ static void lcl_writeAbbrFullNarrArrays( const 
OFileWriter & of, sal_Int16 nCoun
 }
 }
 
+bool LCCalendarNode::expectedCalendarElement( const OUString& rName,
+const LocaleNode* pNode, sal_Int16 nChild, const OUString& rCalendarID 
) const
+{
+bool bFound = true;
+if (nChild >= 0)
+{
+if (nChild >= pNode->getNumberOfChildren())
+bFound = false;
+else
+pNode = pNode->getChildAt(nChild);
+}
+if (bFound && (!pNode || pNode->getName() != rName))
+bFound = false;
+if (!bFound)
+incErrorStrStr( "Error: <%s> element expected in calendar '%s'\n", 
rName, rCalendarID);
+return bFound;
+}
+
 void LCCalendarNode::generateCode (const OFileWriter ) const
 {
 OUString useLocale =   getAttr().getValueByName("ref");
@@ -1717,9 +1735,8 @@ void LCCalendarNode::generateCode (const OFileWriter ) 
const
 } else {
 if (erasNode == nullptr)
 erasNode = calNode -> getChildAt(nChild);
-if (!erasNode || erasNode->getName() != "Eras")
+if (!expectedCalendarElement("Eras", erasNode, -1, calendarID))
 {
-incErrorStr( "Error:  element expected in calendar 
'%s'\n", calendarID);
 --nChild;
 }
 else
@@ -1730,9 +1747,8 @@ void LCCalendarNode::generateCode (const OFileWriter ) 
const
 elementTag = "era";
 for (j = 0; j < nbOfEras[i]; j++) {
 LocaleNode *currNode = erasNode -> getChildAt(j);
-if (!currNode || currNode->getName() != "Era")
+if (!expectedCalendarElement("Era", currNode, -1, 
calendarID))
 {
-incError(" element expected");
 continue;   // for
 }
 OUString eraID( currNode->getChildAt(0)->getValue());
@@ -1749,27 +1765,34 @@ void LCCalendarNode::generateCode (const OFileWriter 
) const
 }
 ++nChild;
 
-str = calNode->getChildAt(nChild)->getChildAt(0)->getValue();
-if (nbOfDays[i])
+if (expectedCalendarElement("StartDayOfWeek", calNode, nChild, 
calendarID))
 {
-for (j = 0; j < nbOfDays[i]; j++)
+str = calNode->getChildAt(nChild)->getChildAt(0)->getValue();
+if (nbOfDays[i])
 {
-LocaleNode *currNode = daysNode->getChildAt(j);
-OUString dayID( currNode->getChildAt(0)->getValue());
-if (str == dayID)
-break;  // for
+for (j = 0; j < nbOfDays[i]; j++)
+{
+LocaleNode *currNode = daysNode->getChildAt(j);
+OUString dayID( currNode->getChildAt(0)->getValue());
+if (str == dayID)
+break;  // for
+}
+if (j >= nbOfDays[i])
+incErrorStr( "Error:   must be one 
of the , but is: %s\n", str);
 }
-if (j >= nbOfDays[i])
-incErrorStr( "Error:   must be one of 
the , but is: %s\n", str);
+of.writeParameter("startDayOfWeek", str, i);
+++nChild;
 }
-of.writeParameter("startDayOfWeek", str, i);
-++nChild;
 
-str = calNode ->getChildAt(nChild)-> getValue();
-sal_Int16 nDays = sal::static_int_cast( str.toInt32() );
-if (nDays < 1 || (0 < nbOfDays[i] && nbOfDays[i] < nDays))
-incErrorInt( "Error: Bad value of MinimalDaysInFirstWeek: %d, must 
be 1 <= value <= days_in_week\n",  nDays);
-of.writeIntParameter("minimalDaysInFirstWeek", i, nDays);
+if (expectedCalendarElement("MinimalDaysInFirstWeek", calNode, nChild, 
calendarID))
+{
+str = calNode ->getChildAt(nChild)-> getValue();
+sal_Int16 nDays = sal::static_int_cast( str.toInt32() );
+if (nDays < 1 || (0 < nbOfDays[i] && nbOfDays[i] < nDays))
+incErrorInt( "Error: Bad value of MinimalDaysInFirstWeek: 

[Libreoffice-commits] core.git: i18npool/source

2020-03-12 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/LocaleNode.cxx |   43 +++---
 1 file changed, 28 insertions(+), 15 deletions(-)

New commits:
commit 39e5c230e5d92b4a9dde7f516b25282f3b2eb5a3
Author: Eike Rathke 
AuthorDate: Thu Mar 12 14:55:02 2020 +0100
Commit: Eike Rathke 
CommitDate: Thu Mar 12 15:49:47 2020 +0100

Survive missing  element

Change-Id: Ic7e609ebac10921b4891877802892fe2cde9ecbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90406
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index f056eefd9252..558967cbc978 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -1717,21 +1717,34 @@ void LCCalendarNode::generateCode (const OFileWriter 
) const
 } else {
 if (erasNode == nullptr)
 erasNode = calNode -> getChildAt(nChild);
-nbOfEras[i] = sal::static_int_cast( 
erasNode->getNumberOfChildren() );
-if (bGregorian && nbOfEras[i] != 2)
-incErrorInt( "Error: A Gregorian calendar must have 2 eras, 
this one has %d\n", nbOfEras[i]);
-elementTag = "era";
-for (j = 0; j < nbOfEras[i]; j++) {
-LocaleNode *currNode = erasNode -> getChildAt(j);
-OUString eraID( currNode->getChildAt(0)->getValue());
-of.writeParameter("eraID", eraID, i, j);
-if ( j == 0 && bGregorian && eraID != "bc" )
-incError( "First era of a Gregorian calendar must be 
bc");
-if ( j == 1 && bGregorian && eraID != "ad" )
-incError( "Second era of a Gregorian calendar must be 
ad");
-of.writeAsciiString("\n");
-of.writeParameter(elementTag, 
"DefaultAbbrvName",currNode->getChildAt(1)->getValue() ,i, j);
-of.writeParameter(elementTag, 
"DefaultFullName",currNode->getChildAt(2)->getValue() , i, j);
+if (!erasNode || erasNode->getName() != "Eras")
+{
+incErrorStr( "Error:  element expected in calendar 
'%s'\n", calendarID);
+--nChild;
+}
+else
+{
+nbOfEras[i] = sal::static_int_cast( 
erasNode->getNumberOfChildren() );
+if (bGregorian && nbOfEras[i] != 2)
+incErrorInt( "Error: A Gregorian calendar must have 2 
eras, this one has %d\n", nbOfEras[i]);
+elementTag = "era";
+for (j = 0; j < nbOfEras[i]; j++) {
+LocaleNode *currNode = erasNode -> getChildAt(j);
+if (!currNode || currNode->getName() != "Era")
+{
+incError(" element expected");
+continue;   // for
+}
+OUString eraID( currNode->getChildAt(0)->getValue());
+of.writeParameter("eraID", eraID, i, j);
+if ( j == 0 && bGregorian && eraID != "bc" )
+incError( "First era of a Gregorian calendar must be 
bc");
+if ( j == 1 && bGregorian && eraID != "ad" )
+incError( "Second era of a Gregorian calendar must be 
ad");
+of.writeAsciiString("\n");
+of.writeParameter(elementTag, 
"DefaultAbbrvName",currNode->getChildAt(1)->getValue() ,i, j);
+of.writeParameter(elementTag, 
"DefaultFullName",currNode->getChildAt(2)->getValue() , i, j);
+}
 }
 }
 ++nChild;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sw/qa

2020-03-03 Thread Miklos Vajna (via logerrit)
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |1 
 sw/qa/extras/odfexport/data/arabic-zero-numbering.odt |binary
 sw/qa/extras/odfexport/odfexport.cxx  |   13 
++
 3 files changed, 14 insertions(+)

New commits:
commit 7a8450c3ecf1a8000cb37981c981fdd55d196df4
Author: Miklos Vajna 
AuthorDate: Tue Mar 3 15:54:19 2020 +0100
Commit: Miklos Vajna 
CommitDate: Tue Mar 3 18:38:25 2020 +0100

sw padded numbering: add ODF filter

ODF allows any string as style:num-format="...", go with "01, 02, 03,
...", because that seems to be consistent with both
DefaultNumberingProvider::makeNumberingIdentifier()'s fallback mechanism
and with OOXML (which uses "001, 002, 003, ..." for the "pad to 3"
case).

Change-Id: I5c5c7ee5bd61175afc3e682276e69344852106d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89891
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 54eeaf841850..890855538881 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -1039,6 +1039,7 @@ static const Supported_NumberingType aSupportedTypes[] =
 {style::NumberingType::CHARS_PERSIAN_WORD,   nullptr, LANG_CTL},
 {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},
+{style::NumberingType::ARABIC_ZERO, "01, 02, 03, ...", LANG_ALL},
 };
 static const sal_Int32 nSupported_NumberingTypes = 
SAL_N_ELEMENTS(aSupportedTypes);
 
diff --git a/sw/qa/extras/odfexport/data/arabic-zero-numbering.odt 
b/sw/qa/extras/odfexport/data/arabic-zero-numbering.odt
new file mode 100644
index ..2a445b22748a
Binary files /dev/null and 
b/sw/qa/extras/odfexport/data/arabic-zero-numbering.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index c613bdaa94dd..a89e916a2749 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2344,5 +2344,18 @@ DECLARE_ODFEXPORT_TEST(tdf121658, "tdf121658.odt")
 CPPUNIT_ASSERT_EQUAL(true, getProperty(xStyle1, 
"ParaHyphenationNoCaps"));
 }
 
+DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.odt")
+{
+auto xNumberingRules
+= 
getProperty>(getParagraph(1), 
"NumberingRules");
+comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 64
+// - Actual  : 4
+// i.e. numbering type was ARABIC, not ARABIC_ZERO.
+
CPPUNIT_ASSERT_EQUAL(static_cast(style::NumberingType::ARABIC_ZERO),
+ aMap["NumberingType"].get());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-03-02 Thread DaeHyun Sung (via logerrit)
 i18npool/source/nativenumber/data/numberchar.h|   30 ++
 i18npool/source/nativenumber/nativenumbersupplier.cxx |4 +-
 2 files changed, 19 insertions(+), 15 deletions(-)

New commits:
commit 300eaa533eed3f9e07cf24d53e4e4c561be2fc3b
Author: DaeHyun Sung 
AuthorDate: Thu Jan 23 17:23:16 2020 +0900
Commit: Eike Rathke 
CommitDate: Mon Mar 2 22:44:28 2020 +0100

Fix Korea's Hanja Upper Numbers codepoint array  #tdf130077

fix code point for Korean Numenic strings codepoint array
5 伍
1000 阡

Change-Id: Id6b37fbaf5ca538ae61555d8c2237c66406c4fb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87240
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/nativenumber/data/numberchar.h 
b/i18npool/source/nativenumber/data/numberchar.h
index 91cd3dcae828..c36d7cff96f0 100644
--- a/i18npool/source/nativenumber/data/numberchar.h
+++ b/i18npool/source/nativenumber/data/numberchar.h
@@ -66,7 +66,7 @@ static const sal_Unicode NumberChar[][10] = {
 { 0x3007, 0x4E00, 0x4E8C, 0x4E09, 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 
0x4E5D }, // Japanese Modern
 { 0x96F6, 0x58F1, 0x5F10, 0x53C2, 0x56DB, 0x4F0D, 0x516D, 0x4E03, 0x516B, 
0x4E5D }, // Japanese Trad.
 { 0x3007, 0x4E00, 0x4E8C, 0x4E09, 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 
0x4E5D }, // Korean Lower
-{ 0xF9B2, 0x58F9, 0x8CB3, 0x53C3, 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 
0x4E5D }, // Korean Upper
+{ 0xF9B2, 0x58F9, 0x8CB3, 0x53C3, 0x56DB, 0x4F0D, 0x516D, 0x4E03, 0x516B, 
0x4E5D }, // Korean Upper
 { 0xC601, 0xC77C, 0xC774, 0xC0BC, 0xC0AC, 0xC624, 0xC721, 0xCE60, 0xD314, 
0xAD6C }, // Korean Hangul
 { 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 
0x0669 }, // Arabic Indic
 { 0x06F0, 0x06F1, 0x06F2, 0x06F3, 0x06F4, 0x06F5, 0x06F6, 0x06F7, 0x06F8, 
0x06F9 }, // Est. Arabic Indic
@@ -136,8 +136,8 @@ static const sal_Unicode MinusChar[] = {
 0x2212, // Japanese Modern
 0x2212, // Japanese Trad.
 0xFF0D, // Korean Lower
-0x5069, // Korean Upper
-0xFF0D, // Korean Hangul ???
+0xFF0D, // Korean Upper
+0xFF0D, // Korean Hangul
 0x, // Arabic Indic
 0x2212, // Est. Arabic Indic
 0x, // Indic
@@ -170,9 +170,9 @@ static sal_uInt16 SeparatorChar[] = {
 0x3001, // T. Chinese Upper
 0x3001, // Japanese Modern
 0x3001, // Japanese Trad.
-0x3001, // Korean Lower
-0x3001, // Korean Upper
-0x3001, // Korean Hangul
+0x002C, // Korean Lower
+0x002C, // Korean Upper
+0x002C, // Korean Hangul
 0x, // Arabic Indic
 0x066C, // Est. Arabic Indic
 0x, // Indic
@@ -210,10 +210,11 @@ const sal_Int16 Multiplier_Upper_zh = 1;
 const sal_Int16 Multiplier_Lower_zh_TW  = 2;
 const sal_Int16 Multiplier_Upper_zh_TW  = 3;
 const sal_Int16 Multiplier_Lower_ko = 4;
-const sal_Int16 Multiplier_Hangul_ko= 5;
-const sal_Int16 Multiplier_Modern_ja= 6;
-const sal_Int16 Multiplier_Traditional_ja = 7;
-const sal_Int16 Multiplier_Count= 8;
+const sal_Int16 Multiplier_Upper_ko = 5;
+const sal_Int16 Multiplier_Hangul_ko= 6;
+const sal_Int16 Multiplier_Modern_ja= 7;
+const sal_Int16 Multiplier_Traditional_ja = 8;
+const sal_Int16 Multiplier_Count= 9;
 
 const sal_Int16 ExponentCount_6_CJK = 6;
 
@@ -224,8 +225,9 @@ static const sal_Unicode 
MultiplierChar_6_CJK[][ExponentCount_6_CJK] = {
 {0x5146, 0x4EBF, 0x4E07, 0x5343, 0x767E, 0x5341},   // S. Chinese Lower
 {0x5146, 0x4EBF, 0x4E07, 0x4EDF, 0x4F70, 0x62FE},   // S. Chinese Upper
 {0x5146, 0x5104, 0x842C, 0x5343, 0x767E, 0x5341},   // T. Chinese Lower
-{0x5146, 0x5104, 0x842C, 0x4EDF, 0x4F70, 0x62FE},   // T. Chinese & Korean 
Upper
+{0x5146, 0x5104, 0x842C, 0x4EDF, 0x4F70, 0x62FE},   // T. Chinese Upper
 {0x5146, 0x5104, 0x4E07, 0x5343, 0x767E, 0x5341},   // Korean Lower
+{0x5146, 0x5104, 0x842C, 0x9621, 0x4F70, 0x62FE},   // Korean Upper
 {0xC870, 0xC5B5, 0xB9CC, 0xCC9C, 0xBC31, 0xC2ED},   // Korean Hangul
 {0x5146, 0x5104, 0x4E07, 0x5343, 0x767E, 0x5341},   // Japanese Modern
 {0x5146, 0x5104, 0x842C, 0x9621, 0x767E, 0x62FE}// Japanese Traditional
@@ -241,8 +243,9 @@ static const sal_Unicode 
MultiplierChar_2_CJK[][ExponentCount_2_CJK] = {
 {0x4EBF, 0x4E07}, // S. Chinese Lower
 {0x4EBF, 0x4E07}, // S. Chinese Upper
 {0x5104, 0x842C}, // T. Chinese Lower
-{0x5104, 0x842C}, // T. Chinese & Korean Upper
+{0x5104, 0x842C}, // T. Chinese Upper
 {0x5104, 0x4E07}, // Korean Lower
+{0x5104, 0x842C}, // Korean Upper
 {0xC5B5, 0xB9CC}, // Korean Hangul
 {0x5104, 0x4E07}, // Japanese Modern
 {0x5104, 0x842C}  // Japanese Traditional
@@ -257,8 +260,9 @@ static const sal_Unicode 
MultiplierChar_7_CJK[][ExponentCount_7_CJK] = {
 {0x4EAC, 0x5146, 0x4EBF, 0x4E07, 0x5343, 0x767E, 0x5341},   // S. Chinese 
Lower
 {0x4EAC, 0x5146, 0x4EBF, 0x4E07, 0x4EDF, 0x4F70, 0x62FE},   // S. Chinese 

[Libreoffice-commits] core.git: i18npool/source

2020-03-02 Thread Noel Grandin (via logerrit)
 i18npool/source/collator/collator_unicode.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit efd267fac274daaf18a095b958d622e2d1468eed
Author: Noel Grandin 
AuthorDate: Mon Mar 2 11:41:46 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 2 13:51:12 2020 +0100

can pass length to icu compare here

which will skip the need to do strlen()

Change-Id: I0c9663f5f51f158179c4e0725c1901d7256173e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89817
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/collator/collator_unicode.cxx 
b/i18npool/source/collator/collator_unicode.cxx
index e2aee8282541..609ef0f20351 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -123,7 +123,8 @@ Collator_Unicode::compareSubstring( const OUString& str1, 
sal_Int32 off1, sal_In
 sal_Int32 SAL_CALL
 Collator_Unicode::compareString( const OUString& str1, const OUString& str2)
 {
-return collator->compare(reinterpret_cast(str1.getStr()), 
reinterpret_cast(str2.getStr()));
+return collator->compare(reinterpret_cast(str1.getStr()), 
str1.getLength(),
+ reinterpret_cast(str2.getStr()), 
str2.getLength());
 }
 
 #ifndef DISABLE_DYNLOADING
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-02-28 Thread Mike Kaganski (via logerrit)
 i18npool/source/search/textsearch.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4ac48ae4b02b8e0e3ae7e4833893f9ad40d4d14d
Author: Mike Kaganski 
AuthorDate: Fri Feb 28 14:20:24 2020 +0300
Commit: Mike Kaganski 
CommitDate: Fri Feb 28 21:43:48 2020 +0100

Use icu::UnicodeString's readonly-aliasing char16_t* constructor

Then it stores a pointer to the passed const UTF-16 string, so
avoids extra overhead (both memory and CPU) to copy the data

Change-Id: I561998d5534f76ae450577ce6fcbd9c08207f2fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89698
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/i18npool/source/search/textsearch.cxx 
b/i18npool/source/search/textsearch.cxx
index 0efa67bcf33a..da4d9cada678 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -930,7 +930,7 @@ SearchResult TextSearch::RESrchFrwrd( const OUString& 
searchStr,
 
 // use the ICU RegexMatcher to find the matches
 UErrorCode nIcuErr = U_ZERO_ERROR;
-const IcuUniString aSearchTargetStr(reinterpret_cast(searchStr.getStr()),
+const IcuUniString aSearchTargetStr(false, reinterpret_cast(searchStr.getStr()),
 searchStr.getLength());
 pRegexMatcher->reset( aSearchTargetStr);
 // search until there is a valid match
@@ -985,7 +985,7 @@ SearchResult TextSearch::RESrchBkwrd( const OUString& 
searchStr,
 // TODO: use ICU's backward searching once it becomes available
 //   as its replacement using forward search is not as good as the 
real thing
 UErrorCode nIcuErr = U_ZERO_ERROR;
-const IcuUniString aSearchTargetStr(reinterpret_cast(searchStr.getStr()),
+const IcuUniString aSearchTargetStr(false, reinterpret_cast(searchStr.getStr()),
 searchStr.getLength());
 pRegexMatcher->reset( aSearchTargetStr);
 if (!lcl_findRegex( pRegexMatcher, endPos, startPos, nIcuErr))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sw/qa

2020-02-28 Thread Mike Kaganski (via logerrit)
 i18npool/source/search/textsearch.cxx |   21 ++---
 sw/qa/extras/uiwriter/uiwriter.cxx|   25 +
 2 files changed, 39 insertions(+), 7 deletions(-)

New commits:
commit 1ec381335c7b2eef1443ce3756a35c3165b7964a
Author: Mike Kaganski 
AuthorDate: Fri Feb 28 10:13:53 2020 +0300
Commit: Mike Kaganski 
CommitDate: Fri Feb 28 11:12:18 2020 +0100

tdf#130984: use RegexMatcher::region to properly limit the search

This allows to pass enough of the text into the matcher to have the
context for anchors/assertions, and at the same time, control the
search region correctly for the cases where the end position is not
at the end of the passed text, like when searching only inside runs
of text having specified attributes.

Change-Id: I6d1ff379c61cec734c0aa2a1dd913b1a73c5b84d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89660
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/i18npool/source/search/textsearch.cxx 
b/i18npool/source/search/textsearch.cxx
index 964dc6c0b256..0efa67bcf33a 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -896,9 +896,15 @@ void TextSearch::RESrchPrepare( const 
css::util::SearchOptions2& rOptions)
 }
 
 
-static bool lcl_findRegex( std::unique_ptr const & 
pRegexMatcher, sal_Int32 nStartPos, UErrorCode & rIcuErr )
+static bool lcl_findRegex(std::unique_ptr const& 
pRegexMatcher,
+  sal_Int32 nStartPos, sal_Int32 nEndPos, UErrorCode& 
rIcuErr)
 {
-if (!pRegexMatcher->find( nStartPos, rIcuErr))
+pRegexMatcher->region(nStartPos, nEndPos, rIcuErr);
+pRegexMatcher->useAnchoringBounds(false); // use whole text's anchoring 
bounds, not region's
+pRegexMatcher->useTransparentBounds(true); // take text outside of the 
region into account for
+   // look-ahead/behind assertions
+
+if (!pRegexMatcher->find(rIcuErr))
 {
 /* TODO: future versions could pass the UErrorCode or translations
  * thereof to the caller, for example to inform the user of
@@ -930,7 +936,7 @@ SearchResult TextSearch::RESrchFrwrd( const OUString& 
searchStr,
 // search until there is a valid match
 for(;;)
 {
-if (!lcl_findRegex( pRegexMatcher, startPos, nIcuErr))
+if (!lcl_findRegex( pRegexMatcher, startPos, endPos, nIcuErr))
 return aRet;
 
 // #i118887# ignore zero-length matches e.g. "a*" in "bc"
@@ -979,9 +985,10 @@ SearchResult TextSearch::RESrchBkwrd( const OUString& 
searchStr,
 // TODO: use ICU's backward searching once it becomes available
 //   as its replacement using forward search is not as good as the 
real thing
 UErrorCode nIcuErr = U_ZERO_ERROR;
-const IcuUniString aSearchTargetStr( reinterpret_cast(searchStr.getStr()), startPos);
+const IcuUniString aSearchTargetStr(reinterpret_cast(searchStr.getStr()),
+searchStr.getLength());
 pRegexMatcher->reset( aSearchTargetStr);
-if (!lcl_findRegex( pRegexMatcher, endPos, nIcuErr))
+if (!lcl_findRegex( pRegexMatcher, endPos, startPos, nIcuErr))
 return aRet;
 
 // find the last match
@@ -1003,7 +1010,7 @@ SearchResult TextSearch::RESrchBkwrd( const OUString& 
searchStr,
 bFirst = false;
 if( nFoundEnd == nLastPos)
 ++nFoundEnd;
-} while( lcl_findRegex( pRegexMatcher, nFoundEnd, nIcuErr));
+} while( lcl_findRegex( pRegexMatcher, nFoundEnd, startPos, nIcuErr));
 
 // Ignore all zero-length matches except "$" anchor on first match.
 if (nGoodPos == nGoodEnd)
@@ -1015,7 +1022,7 @@ SearchResult TextSearch::RESrchBkwrd( const OUString& 
searchStr,
 }
 
 // find last match again to get its details
-lcl_findRegex( pRegexMatcher, nGoodPos, nIcuErr);
+lcl_findRegex( pRegexMatcher, nGoodPos, startPos, nIcuErr);
 
 // fill in the details of the last match
 const int nGroupCount = pRegexMatcher->groupCount();
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 669471d4ea3c..8c4123c31a6b 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -2302,6 +2302,31 @@ void SwUiWriterTest::testTextSearch()
 uno::Reference 
xIndex2(xReplace->findAll(xSearchDes));
 CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xIndex2->getCount());
 // regex tests
+xSearchDes->setPropertyValue("SearchRegularExpression", 
uno::makeAny(true));
+// regex: test correct matching combined with attributes like BOLD
+xSearchDes->setSearchString(".*"); // should match all bold words in the 
text
+xIndex.set(xReplace->findAll(xSearchDes), uno::UNO_SET_THROW);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xIndex->getCount());
+uno::Reference xFound(xIndex->getByIndex(0), 
uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT_EQUAL(OUString("Hello"), xFound->getString());
+

[Libreoffice-commits] core.git: i18npool/source include/i18npool include/svl include/svx sc/source svl/qa svl/source svx/source xmloff/source

2020-02-22 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/LocaleNode.cxx   |   19 +++--
 i18npool/source/localedata/data/ak_GH.xml   |3 
 i18npool/source/localedata/data/an_ES.xml   |3 
 i18npool/source/localedata/data/ar_DZ.xml   |   15 ++--
 i18npool/source/localedata/data/ar_EG.xml   |   15 ++--
 i18npool/source/localedata/data/ar_OM.xml   |5 +
 i18npool/source/localedata/data/ast_ES.xml  |3 
 i18npool/source/localedata/data/az_AZ.xml   |3 
 i18npool/source/localedata/data/be_BY.xml   |3 
 i18npool/source/localedata/data/bg_BG.xml   |7 +
 i18npool/source/localedata/data/bm_ML.xml   |3 
 i18npool/source/localedata/data/bn_IN.xml   |3 
 i18npool/source/localedata/data/bo_CN.xml   |7 +
 i18npool/source/localedata/data/bo_IN.xml   |7 +
 i18npool/source/localedata/data/br_FR.xml   |3 
 i18npool/source/localedata/data/bs_BA.xml   |3 
 i18npool/source/localedata/data/ca_ES.xml   |3 
 i18npool/source/localedata/data/cs_CZ.xml   |3 
 i18npool/source/localedata/data/cu_RU.xml   |3 
 i18npool/source/localedata/data/cv_RU.xml   |3 
 i18npool/source/localedata/data/da_DK.xml   |3 
 i18npool/source/localedata/data/de_AT.xml   |3 
 i18npool/source/localedata/data/de_CH.xml   |3 
 i18npool/source/localedata/data/de_DE.xml   |3 
 i18npool/source/localedata/data/de_LI.xml   |3 
 i18npool/source/localedata/data/de_LU.xml   |3 
 i18npool/source/localedata/data/dsb_DE.xml  |   13 ++-
 i18npool/source/localedata/data/dz_BT.xml   |   37 +-
 i18npool/source/localedata/data/ee_GH.xml   |3 
 i18npool/source/localedata/data/el_GR.xml   |3 
 i18npool/source/localedata/data/en_AU.xml   |3 
 i18npool/source/localedata/data/en_CA.xml   |5 +
 i18npool/source/localedata/data/en_GB.xml   |3 
 i18npool/source/localedata/data/en_GH.xml   |3 
 i18npool/source/localedata/data/en_JM.xml   |3 
 i18npool/source/localedata/data/en_NA.xml   |3 
 i18npool/source/localedata/data/en_US.xml   |   23 +++---
 i18npool/source/localedata/data/en_ZA.xml   |   11 +--
 i18npool/source/localedata/data/eo.xml  |3 
 i18npool/source/localedata/data/es_AR.xml   |3 
 i18npool/source/localedata/data/es_BO.xml   |3 
 i18npool/source/localedata/data/es_CL.xml   |3 
 i18npool/source/localedata/data/es_CO.xml   |3 
 i18npool/source/localedata/data/es_CR.xml   |7 +
 i18npool/source/localedata/data/es_DO.xml   |3 
 i18npool/source/localedata/data/es_EC.xml   |3 
 i18npool/source/localedata/data/es_ES.xml   |3 
 i18npool/source/localedata/data/es_GT.xml   |3 
 i18npool/source/localedata/data/es_PE.xml   |3 
 i18npool/source/localedata/data/es_SV.xml   |3 
 i18npool/source/localedata/data/et_EE.xml   |3 
 i18npool/source/localedata/data/eu_ES.xml   |3 
 i18npool/source/localedata/data/fa_IR.xml   |5 +
 i18npool/source/localedata/data/fi_FI.xml   |3 
 i18npool/source/localedata/data/fo_FO.xml   |3 
 i18npool/source/localedata/data/fr_BE.xml   |3 
 i18npool/source/localedata/data/fr_BF.xml   |3 
 i18npool/source/localedata/data/fr_CA.xml   |5 +
 i18npool/source/localedata/data/fr_CH.xml   |3 
 i18npool/source/localedata/data/fr_FR.xml   |3 
 i18npool/source/localedata/data/fr_LU.xml   |3 
 i18npool/source/localedata/data/fur_IT.xml  |5 +
 i18npool/source/localedata/data/fy_NL.xml   |3 
 i18npool/source/localedata/data/gd_GB.xml   |3 
 i18npool/source/localedata/data/gl_ES.xml   |3 
 i18npool/source/localedata/data/gsc_FR.xml  |3 
 i18npool/source/localedata/data/gug_PY.xml  |3 
 i18npool/source/localedata/data/ha_Latn_GH.xml  |3 
 i18npool/source/localedata/data/ha_Latn_NG.xml  |3 
 i18npool/source/localedata/data/haw_US.xml  |3 
 i18npool/source/localedata/data/he_IL.xml   |   13 ++-
 i18npool/source/localedata/data/hi_IN.xml   |3 
 i18npool/source/localedata/data/hil_PH.xml  |3 
 i18npool/source/localedata/data/hr_HR.xml   |   11 +--
 i18npool/source/localedata/data/hsb_DE.xml  |3 
 i18npool/source/localedata/data/ht_HT.xml   |3 
 i18npool/source/localedata/data/hu_HU.xml   |   73 ++--
 i18npool/source/localedata/data/hy_AM.xml   |3 
 i18npool/source/localedata/data/ia.xml  |3 
 i18npool/source/localedata/data/id_ID.xml   |3 
 i18npool/source/localedata/data/ilo_PH.xml  |3 
 i18npool/source/localedata/data/is_IS.xml   |3 
 i18npool/source/localedata/data/it_CH.xml   |3 
 i18npool/source/localedata/data/it_IT.xml   |5 +
 i18npool/source/localedata/data/ja_JP.xml   |   12 +--
 i18npool/source/localedata/data/jbo.xml |3 
 

[Libreoffice-commits] core.git: i18npool/source

2020-02-19 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/id_ID.xml |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit d65a28188339ef3e0ddc54307bd12d76675f4fb5
Author: Eike Rathke 
AuthorDate: Wed Feb 19 14:48:54 2020 +0100
Commit: Eike Rathke 
CommitDate: Wed Feb 19 17:52:35 2020 +0100

Related: tdf#130772 Prepare id-ID currency formats to ref-derive from

Change-Id: I35a5311b9b9b6c5dd76352fdf12d64361bbaa5fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89024
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/id_ID.xml 
b/i18npool/source/localedata/data/id_ID.xml
index 19bbeafef1d0..c1a30a4c 100644
--- a/i18npool/source/localedata/data/id_ID.xml
+++ b/i18npool/source/localedata/data/id_ID.xml
@@ -51,7 +51,7 @@
 PM
 metric
   
-  
+  
 D/M
 
   Standard
@@ -87,22 +87,22 @@
   0,00%
 
 
-  [$Rp-421]#.##0;([$Rp-421]#.##0)
+  [CURRENCY]#.##0;([CURRENCY]#.##0)
 
 
-  [$Rp-421]#.##0;([$Rp-421]#.##0)
+  [CURRENCY]#.##0;([CURRENCY]#.##0)
 
 
-  [$Rp-421]#.##0;[RED]([$Rp-421]#.##0)
+  [CURRENCY]#.##0;[RED]([CURRENCY]#.##0)
 
 
-  [$Rp-421]#.##0;[RED]([$Rp-421]#.##0)
+  [CURRENCY]#.##0;[RED]([CURRENCY]#.##0)
 
 
   #.##0 CCC
 
 
-  [$Rp-421]#.##0;[RED]([$Rp-421]#.##0)
+  [CURRENCY]#.##0;[RED]([CURRENCY]#.##0)
 
 
   DD/MM/YY
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-02-13 Thread Marina Latini (SUSE) (via logerrit)
 i18npool/source/localedata/data/fur_IT.xml |4 ++--
 i18npool/source/localedata/data/it_CH.xml  |4 ++--
 i18npool/source/localedata/data/it_IT.xml  |4 ++--
 i18npool/source/localedata/data/lld_IT.xml |4 ++--
 i18npool/source/localedata/data/sc_IT.xml  |4 ++--
 i18npool/source/localedata/data/vec_IT.xml |4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 618d1f1085cd7a9c672b851944aae106868266fa
Author: Marina Latini (SUSE) 
AuthorDate: Tue Feb 11 16:31:37 2020 +0100
Commit: Eike Rathke 
CommitDate: Thu Feb 13 15:36:14 2020 +0100

tdf#130563 Change the default dates format for Italian locale

Change the default dates format from the year with two digits
to the year with four digits avoiding misleading
interpretations of the years.
The change applies to:
it_CH, it_IT, fur_IT, lld_IT, sc_IT, vec_IT

Change-Id: Ib0d2d72e84a162c0e8daee8d4702173013e60af6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88462
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/fur_IT.xml 
b/i18npool/source/localedata/data/fur_IT.xml
index 343740013934..58aee59db349 100644
--- a/i18npool/source/localedata/data/fur_IT.xml
+++ b/i18npool/source/localedata/data/fur_IT.xml
@@ -110,10 +110,10 @@
 
   DD di 
 
-
+
   DD/MM/YY
 
-
+
   DD/MM/
 
 
diff --git a/i18npool/source/localedata/data/it_CH.xml 
b/i18npool/source/localedata/data/it_CH.xml
index 690b16712518..6447d3c6eefb 100644
--- a/i18npool/source/localedata/data/it_CH.xml
+++ b/i18npool/source/localedata/data/it_CH.xml
@@ -110,10 +110,10 @@
 
   GG.  
 
-
+
   GG.MM.AA
 
-
+
   GG.MM.
 
 
diff --git a/i18npool/source/localedata/data/it_IT.xml 
b/i18npool/source/localedata/data/it_IT.xml
index 8a047c4aa882..4b1bd5567f7f 100644
--- a/i18npool/source/localedata/data/it_IT.xml
+++ b/i18npool/source/localedata/data/it_IT.xml
@@ -110,10 +110,10 @@
 
   GG  
 
-
+
   GG/MM/AA
 
-
+
   GG/MM/
 
 
diff --git a/i18npool/source/localedata/data/lld_IT.xml 
b/i18npool/source/localedata/data/lld_IT.xml
index 5fa8c1120ddd..d6be649f9591 100644
--- a/i18npool/source/localedata/data/lld_IT.xml
+++ b/i18npool/source/localedata/data/lld_IT.xml
@@ -110,10 +110,10 @@
 
   DD,  
 
-
+
   DD/MM/YY
 
-
+
   DD/MM/
 
 
diff --git a/i18npool/source/localedata/data/sc_IT.xml 
b/i18npool/source/localedata/data/sc_IT.xml
index 361c8ca2a65a..5193cc5e8dbb 100644
--- a/i18npool/source/localedata/data/sc_IT.xml
+++ b/i18npool/source/localedata/data/sc_IT.xml
@@ -110,10 +110,10 @@
 
   DD,  
 
-
+
   DD/MM/YY
 
-
+
   DD/MM/
 
 
diff --git a/i18npool/source/localedata/data/vec_IT.xml 
b/i18npool/source/localedata/data/vec_IT.xml
index 086d59857db5..44c14332d461 100644
--- a/i18npool/source/localedata/data/vec_IT.xml
+++ b/i18npool/source/localedata/data/vec_IT.xml
@@ -110,10 +110,10 @@
 
   DD  
 
-
+
   DD/MM/YY
 
-
+
   DD/MM/
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-01-31 Thread Kelemen Gábor (via logerrit)
 i18npool/source/localedata/data/hu_HU.xml |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 16d4d1b8ecd99c68c6e11907f9562803ebe7cd9c
Author: Kelemen Gábor 
AuthorDate: Wed Dec 18 14:18:16 2019 +0100
Commit: László Németh 
CommitDate: Fri Jan 31 19:51:53 2020 +0100

tdf#129240 More date acceptance patterns for Hungarian language

Now cell values matching these patterns are accepted as date:
2019-12-24
2019.12.24
2019.12.24.
2019. 12. 24.
12-24
12.24
12.24.
12. 24.

Change-Id: Ida08deb054fd29aef5d941626c8225732e447662
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85385
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/i18npool/source/localedata/data/hu_HU.xml 
b/i18npool/source/localedata/data/hu_HU.xml
index 269f1fddf0bc..e494c6404566 100644
--- a/i18npool/source/localedata/data/hu_HU.xml
+++ b/i18npool/source/localedata/data/hu_HU.xml
@@ -54,6 +54,11 @@
   
 M-D
 M.D
+M.D.
+M. D.
+Y-M-D
+Y.M.D.
+Y. M. D.
 
   Standard
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sc/source

2020-01-30 Thread Eike Rathke (via logerrit)
 i18npool/source/search/textsearch.cxx |2 +-
 sc/source/core/tool/interpr1.cxx  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f4f30276eab58e13f99d9a6446032e389caf8ae2
Author: Eike Rathke 
AuthorDate: Thu Jan 30 17:15:01 2020 +0100
Commit: Eike Rathke 
CommitDate: Thu Jan 30 17:22:51 2020 +0100

Update ICU RegexMatcher::setTimeLimit() documentation link to new location

Stumbled upon in a side step of grepping for icu4c.

Change-Id: I3f9cda5239e265258c7dc7a6a0689b3bc5f052ac

diff --git a/i18npool/source/search/textsearch.cxx 
b/i18npool/source/search/textsearch.cxx
index de0f74ad2cb9..964dc6c0b256 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -879,7 +879,7 @@ void TextSearch::RESrchPrepare( const 
css::util::SearchOptions2& rOptions)
 // Pathological patterns may result in exponential run time making the
 // application appear to be frozen. Limit that. Documentation for this
 // call says
-// 
https://ssl.icu-project.org/apiref/icu4c/classicu_1_1RegexMatcher.html#a6ebcfcab4fe6a38678c0291643a03a00
+// 
https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1RegexMatcher.html#a6ebcfcab4fe6a38678c0291643a03a00
 // "The units of the limit are steps of the match engine.
 // Correspondence with actual processor time will depend on the speed
 // of the processor and the details of the specific pattern, but will
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 89e7b39786cf..f52ac8916069 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -9424,7 +9424,7 @@ void ScInterpreter::ScRegex()
 return;
 }
 // Guard against pathological patterns, limit steps of engine, see
-// 
https://ssl.icu-project.org/apiref/icu4c/classicu_1_1RegexMatcher.html#a6ebcfcab4fe6a38678c0291643a03a00
+// 
https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1RegexMatcher.html#a6ebcfcab4fe6a38678c0291643a03a00
 aRegexMatcher.setTimeLimit( 23*1000, status);
 
 const icu::UnicodeString aIcuText( reinterpret_cast(aText.getStr()), aText.getLength());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sw/uiconfig

2020-01-08 Thread Seth Chaiklin (via logerrit)
 i18npool/source/localedata/data/en_US.xml |4 ++--
 sw/uiconfig/swriter/ui/tocindexpage.ui|2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 64d0e5cfb8e9b05b5de02121b948c15b94310204
Author: Seth Chaiklin 
AuthorDate: Wed Jan 1 20:07:57 2020 +0100
Commit: Heiko Tietze 
CommitDate: Wed Jan 8 09:17:28 2020 +0100

tdf#94411 use f. and ff. in alphabetical index

Corrects en_US for index
At present en_GB index is defined as en_US,
and all other (en_*) are defined as en_US or en_GB

Change-Id: Ib4c3e189c1d9a08c8f4eb17a1da526fbf23291d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86080
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/i18npool/source/localedata/data/en_US.xml 
b/i18npool/source/localedata/data/en_US.xml
index c765bc5a63cc..f10f4e66dfb7 100644
--- a/i18npool/source/localedata/data/en_US.xml
+++ b/i18npool/source/localedata/data/en_US.xml
@@ -255,8 +255,8 @@
 A-Z
 0
 1
-p.
-pp.
+f.
+ff.
   
   
 
diff --git a/sw/uiconfig/swriter/ui/tocindexpage.ui 
b/sw/uiconfig/swriter/ui/tocindexpage.ui
index 334a39a9c668..b5a9979d3fc4 100644
--- a/sw/uiconfig/swriter/ui/tocindexpage.ui
+++ b/sw/uiconfig/swriter/ui/tocindexpage.ui
@@ -875,7 +875,7 @@
 
 
   
-Combine identical entries with p or _pp
+Combine identical entries with f. or 
_ff.
 True
 True
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2020-01-03 Thread Eike Rathke (via logerrit)
 i18npool/source/search/textsearch.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit ace8602466986e0249aa41845dce4e7da4fcafba
Author: Eike Rathke 
AuthorDate: Fri Jan 3 21:12:25 2020 +0100
Commit: Eike Rathke 
CommitDate: Fri Jan 3 21:13:29 2020 +0100

Elaborate comment what happens, tdf#78840 follow-up

Change-Id: I30bfc2891e422e8cfcb83f01136c654e3a1b03f5

diff --git a/i18npool/source/search/textsearch.cxx 
b/i18npool/source/search/textsearch.cxx
index 9c3bf63eeb64..de0f74ad2cb9 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -131,8 +131,15 @@ void TextSearch::setOptions2( const SearchOptions2& 
rOptions )
 maWildcardReversePattern2.clear();
 TransliterationFlags transliterateFlags = 
static_cast(aSrchPara.transliterateFlags);
 if (aSrchPara.AlgorithmType2 == SearchAlgorithms2::REGEXP)
-// RESrchPrepare will consider SearchAlgorithms2::REGEXP in 
aSrchPara.transliterateFlags
+{
+// RESrchPrepare will consider aSrchPara.transliterateFlags when
+// picking the actual regex pattern
+// (sSrchStr|sSrchStr2|SearchOptions2::searchString) and setting
+// case-insensitivity. Create transliteration instance, if any, without
+// ignore-case so later in TextSearch::searchForward() the string to
+// match is not case-altered, leave case-(in)sensitive to regex engine.
 transliterateFlags &= ~TransliterationFlags::IGNORE_CASE;
+}
 
 // Create Transliteration class
 if( isSimpleTrans( transliterateFlags) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sc/qa

2020-01-03 Thread Mike Kaganski (via logerrit)
 i18npool/source/search/textsearch.cxx   |3 
 sc/qa/unit/data/functions/statistical/fods/countif.fods |  235 ++--
 2 files changed, 218 insertions(+), 20 deletions(-)

New commits:
commit 12b4590f3a9ba64bcc27e60185ee7366d9894cc7
Author: Mike Kaganski 
AuthorDate: Sat Dec 21 12:51:36 2019 +0300
Commit: Eike Rathke 
CommitDate: Fri Jan 3 20:51:28 2020 +0100

tdf#78840: disable case-insensitive transliteration for regex search

Allow regex engine use its own case-insensitive search instead. We
already set UREGEX_CASE_INSENSITIVE ICU flag when case-insensitive
search is requested in TextSearch::RESrchPrepare. Case-insensitive
transliteration used when preparing the string for passing to regex
engine creates a lowercase string, where case-sensitive search is
impossible, even when regex includes explicit flags for that.

This change allows to honor (?-i)/(?i) flags in the regex if present.
It removes case-sensitive flag from consideration for creation of
transliteration service if regex search is requested.

Change-Id: I0d8960670c1681f7c6bc162a4f858006596c7c36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85650
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/search/textsearch.cxx 
b/i18npool/source/search/textsearch.cxx
index 2bb947f9ec73..9c3bf63eeb64 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -130,6 +130,9 @@ void TextSearch::setOptions2( const SearchOptions2& 
rOptions )
 maWildcardReversePattern.clear();
 maWildcardReversePattern2.clear();
 TransliterationFlags transliterateFlags = 
static_cast(aSrchPara.transliterateFlags);
+if (aSrchPara.AlgorithmType2 == SearchAlgorithms2::REGEXP)
+// RESrchPrepare will consider SearchAlgorithms2::REGEXP in 
aSrchPara.transliterateFlags
+transliterateFlags &= ~TransliterationFlags::IGNORE_CASE;
 
 // Create Transliteration class
 if( isSimpleTrans( transliterateFlags) )
diff --git a/sc/qa/unit/data/functions/statistical/fods/countif.fods 
b/sc/qa/unit/data/functions/statistical/fods/countif.fods
index f52c622e10e6..f6cf854c707a 100644
--- a/sc/qa/unit/data/functions/statistical/fods/countif.fods
+++ b/sc/qa/unit/data/functions/statistical/fods/countif.fods
@@ -3105,7 +3105,11 @@
  
   1999
  
- 
+ 
+ 
+  abc
+ 
+ 
  
  
 
@@ -3136,7 +3140,11 @@
  
   2000
  
- 
+ 
+ 
+  ABC
+ 
+ 
  
  
 
@@ -3168,7 +3176,11 @@
  
   0
  
- 
+ 
+ 
+  Abc
+ 
+ 
  
  
 
@@ -3200,7 +3212,11 @@
  
   0
  
- 
+ 
+ 
+  aBc
+ 
+ 
  
  
 
@@ -3229,7 +3245,11 @@
  
   0
  
- 
+ 
+ 
+  Abc
+ 
+ 
  
  
 
@@ -3258,7 +3278,11 @@
  
   2002
  
- 
+ 
+ 
+  a
+ 
+ 
  
  
 
@@ -3285,7 +3309,11 @@
  
   2001
  
- 
+ 
+ 
+  A
+ 
+ 
  
  
 
@@ -3312,7 +3340,11 @@
  
   X
  
- 
+ 
+ 
+  A
+ 
+ 
  
  
 
@@ -3334,7 +3366,11 @@
  
   2002
  
- 
+ 
+ 
+  A
+ 
+ 
  
  
 
@@ -3902,9 +3938,22 @@
  
 
 
- 
- 
- 
+ 
+  9
+ 
+ 
+  9
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIF($Q$3:$Q$11;.*)
+ 
+ 
+  tdf#78840: case-insensitive
+ 
+ 
  
   2
  
@@ -3920,9 +3969,22 @@
  
 
 
- 
- 
- 
+ 
+  5
+ 
+ 
+  5
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIF($Q$3:$Q$11;abc)
+ 
+ 
+  tdf#78840: case-insensitive
+ 
+ 
  
   3
  
@@ -3937,10 +3999,143 @@
  
  
 
-
- 
- 
- 
+
+ 
+  5
+ 
+ 
+  5
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIF($Q$3:$Q$11;ABC)
+ 
+ 
+  tdf#78840: case-insensitive
+ 
+ 
+ 
+ 
+
+
+ 
+  4
+ 
+ 
+  4
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIF($Q$3:$Q$11;a)
+ 
+ 
+  tdf#78840: case-insensitive
+ 
+ 
+ 
+ 
+
+
+ 
+  4
+ 
+ 
+  4
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIF($Q$3:$Q$11;A)
+ 
+ 
+  tdf#78840: case-insensitive
+ 
+ 
+ 
+ 
+
+
+ 
+  1
+ 
+ 
+  1
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIF($Q$3:$Q$11;(?-i)abc)
+ 
+ 
+  tdf#78840: case-sensitive
+ 
+ 
+ 
+ 
+
+
+ 
+  2
+ 
+ 
+  2
+ 
+ 
+  TRUE
+ 
+ 
+  =COUNTIF($Q$3:$Q$11;(?-i)Abc)
+ 
+ 
+  tdf#78840: case-sensitive
+ 
+ 
+ 
+ 
+
+
+ 
+  3
+   

[Libreoffice-commits] core.git: i18npool/source sw/qa

2019-12-19 Thread Mike Kaganski (via logerrit)
 i18npool/source/search/textsearch.cxx |   14 +++---
 sw/qa/extras/uiwriter/uiwriter.cxx|   13 +
 2 files changed, 24 insertions(+), 3 deletions(-)

New commits:
commit 0cd3b7926cafc01d06b589124215e9cb7c148f19
Author: Mike Kaganski 
AuthorDate: Thu Dec 19 11:37:59 2019 +0300
Commit: Mike Kaganski 
CommitDate: Thu Dec 19 10:59:01 2019 +0100

tdf#65038: use trailing string characters for look-ahead assertions

... like commit eb973a46ba0e34026db2d2929f2aa10505623872 did for
look-behind assertions

Change-Id: I86ece5d3ee49b0c5d86f2cfab5fed2830d5ad777
Reviewed-on: https://gerrit.libreoffice.org/85487
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/i18npool/source/search/textsearch.cxx 
b/i18npool/source/search/textsearch.cxx
index b0361bee89a3..c74e158780f4 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -323,9 +323,16 @@ SearchResult TextSearch::searchForward( const OUString& 
searchStr, sal_Int32 sta
 const sal_Int32 nMaxLeadingLen = 
aSrchPara.searchString.startsWith("(?") ? 100 : 3;
 nInStartPos -= std::min(nMaxLeadingLen, startPos);
 }
+sal_Int32 nInEndPos = endPos;
+if (pRegexMatcher && endPos < searchStr.getLength())
+{
+// tdf#65038: ditto for look-ahead assertions
+const sal_Int32 nMaxTrailingLen = 
aSrchPara.searchString.endsWith(")") ? 100 : 3;
+nInEndPos += std::min(nMaxTrailingLen, searchStr.getLength() - 
endPos);
+}
 
-css::uno::Sequence offset(endPos - nInStartPos);
-in_str = xTranslit->transliterate( searchStr, nInStartPos, endPos - 
nInStartPos, offset );
+css::uno::Sequence offset(nInEndPos - nInStartPos);
+in_str = xTranslit->transliterate(searchStr, nInStartPos, nInEndPos - 
nInStartPos, offset);
 
 // JP 20.6.2001: also the start and end positions must be corrected!
 sal_Int32 newStartPos =
@@ -907,7 +914,8 @@ SearchResult TextSearch::RESrchFrwrd( const OUString& 
searchStr,
 
 // use the ICU RegexMatcher to find the matches
 UErrorCode nIcuErr = U_ZERO_ERROR;
-const IcuUniString aSearchTargetStr( reinterpret_cast(searchStr.getStr()), endPos);
+const IcuUniString aSearchTargetStr(reinterpret_cast(searchStr.getStr()),
+searchStr.getLength());
 pRegexMatcher->reset( aSearchTargetStr);
 // search until there is a valid match
 for(;;)
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index cc51519f61fd..4790a602bbbf 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -2284,6 +2284,19 @@ void SwUiWriterTest::testTextSearch()
 // check of the end result
 CPPUNIT_ASSERT_EQUAL(OUString("xCelqy xWorqd xThzq xis xa xtasq"),
  pCursor->GetNode().GetTextNode()->GetText());
+// regex: use positive look-ahead assertion
+xReplaceDes->setSearchString("Wor(?=qd xThzq xis xa xtasq)");
+xReplaceDes->setReplaceString(""); // testing & reference
+ReplaceCount = xReplace->replaceAll(xReplaceDes);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), ReplaceCount);
+// regex: use negative look-ahead assertion
+xReplaceDes->setSearchString("x(?!Worpqd xThzq xis xa xtasq)");
+xReplaceDes->setReplaceString("m");
+ReplaceCount = xReplace->replaceAll(xReplaceDes);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(5), ReplaceCount); // one of the 6 "x" must 
not be replaced
+// check of the end result
+CPPUNIT_ASSERT_EQUAL(OUString("mCelqy xWorpqd mThzq mis ma mtasq"),
+ pCursor->GetNode().GetTextNode()->GetText());
 }
 
 void SwUiWriterTest::testTdf69282()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2019-12-18 Thread Mike Kaganski (via logerrit)
 i18npool/source/search/textsearch.cxx |   35 +-
 1 file changed, 18 insertions(+), 17 deletions(-)

New commits:
commit eb973a46ba0e34026db2d2929f2aa10505623872
Author: Mike Kaganski 
AuthorDate: Wed Dec 18 15:23:08 2019 +0300
Commit: Mike Kaganski 
CommitDate: Thu Dec 19 05:29:55 2019 +0100

tdf#75806: use actual string leading characters for correct precondition 
match

Having an arbitrary prepended character prevents e.g. matching start of a 
word
for search continuation. Trimming the string to the start of the search 
breaks
correct look-behind assertion matching (e.g. for regexes like 
`(?https://gerrit.libreoffice.org/85382
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/i18npool/source/search/textsearch.cxx 
b/i18npool/source/search/textsearch.cxx
index 4174c6cd1e86..b0361bee89a3 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -310,8 +310,22 @@ SearchResult TextSearch::searchForward( const OUString& 
searchStr, sal_Int32 sta
 if ( xTranslit.is() )
 {
 // apply normal transliteration (1<->1, 1<->0)
-css::uno::Sequence offset(endPos - startPos);
-in_str = xTranslit->transliterate( searchStr, startPos, endPos - 
startPos, offset );
+
+sal_Int32 nInStartPos = startPos;
+if (pRegexMatcher && startPos > 0)
+{
+// tdf#89665, tdf#75806: An optimization to avoid transliterating 
the whole string, yet
+// transliterate enough of the leading text to allow sensible 
look-behind assertions.
+// 100 is chosen arbitrarily in the hope that look-behind 
assertions would largely fit.
+// See http://userguide.icu-project.org/strings/regexp for 
look-behind assertion syntax.
+// When search regex doesn't start with an assertion, 3 is to 
allow startPos to be in
+// the middle of a surrogate pair, preceded by another surrogate 
pair.
+const sal_Int32 nMaxLeadingLen = 
aSrchPara.searchString.startsWith("(?") ? 100 : 3;
+nInStartPos -= std::min(nMaxLeadingLen, startPos);
+}
+
+css::uno::Sequence offset(endPos - nInStartPos);
+in_str = xTranslit->transliterate( searchStr, nInStartPos, endPos - 
nInStartPos, offset );
 
 // JP 20.6.2001: also the start and end positions must be corrected!
 sal_Int32 newStartPos =
@@ -321,19 +335,6 @@ SearchResult TextSearch::searchForward( const OUString& 
searchStr, sal_Int32 sta
 ? FindPosInSeq_Impl( offset, endPos )
 : in_str.getLength();
 
-sal_Int32 nExtraOffset = 0;
-if (pRegexMatcher && startPos > 0)
-{
-// avoid matching ^ here - in_str omits a prefix of the searchStr
-// this is a really lame way to do it, but ICU only offers
-// useAnchoringBounds() to disable *both* bounds but what is needed
-// here is to disable only one bound and respect the other
-in_str = "X" + in_str;
-nExtraOffset = 1;
-newStartPos += nExtraOffset;
-newEndPos += nExtraOffset;
-}
-
 sres = (this->*fnForward)( in_str, newStartPos, newEndPos );
 
 // Map offsets back to untransliterated string.
@@ -345,7 +346,7 @@ SearchResult TextSearch::searchForward( const OUString& 
searchStr, sal_Int32 sta
 const sal_Int32 nGroups = sres.startOffset.getLength();
 for ( sal_Int32 k = 0; k < nGroups; k++ )
 {
-const sal_Int32 nStart = sres.startOffset[k] - nExtraOffset;
+const sal_Int32 nStart = sres.startOffset[k];
 // Result offsets are negative (-1) if a group expression was
 // not matched.
 if (nStart >= 0)
@@ -354,7 +355,7 @@ SearchResult TextSearch::searchForward( const OUString& 
searchStr, sal_Int32 sta
 //   the position of the next character - return 
the
 //   next position behind the last found character!
 //   "a b c" find "b" must return 2,3 and not 
2,4!!!
-const sal_Int32 nStop = sres.endOffset[k] - nExtraOffset;
+const sal_Int32 nStop = sres.endOffset[k];
 if (nStop >= 0)
 {
 if (nStop > 0)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2019-11-18 Thread Stephan Bergmann (via logerrit)
 i18npool/source/transliteration/transliterationImpl.cxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 153aa090db6ae6fb9809305f56b06056865c69f4
Author: Stephan Bergmann 
AuthorDate: Mon Nov 18 23:05:10 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 19 07:30:28 2019 +0100

Improved loplugin:external, handling class types

...renaming type as TMList to avoid ambiguity between i18npool::TMlist and
i18npool::(anonymous namespace)::TMlist

Change-Id: I712fca9a9a7023e5a217c019195e3aa51e858f81
Reviewed-on: https://gerrit.libreoffice.org/83132
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/i18npool/source/transliteration/transliterationImpl.cxx 
b/i18npool/source/transliteration/transliterationImpl.cxx
index 195f7a789643..6a1c13d2b677 100644
--- a/i18npool/source/transliteration/transliterationImpl.cxx
+++ b/i18npool/source/transliteration/transliterationImpl.cxx
@@ -48,12 +48,18 @@ namespace i18npool {
 #define TmItem2( name ) \
   {TransliterationModules(0), TransliterationModulesNew_##name, #name}
 
+namespace {
+
 // Ignore Module list
-static struct TMlist {
+struct TMList {
   TransliterationModulestm;
   TransliterationModulesNew tmn;
   const sal_Char   *implName;
-} const TMlist[] = {//  Modules  ModulesNew
+};
+
+}
+
+static TMList const TMlist[] = {//  Modules  ModulesNew
   TmItem1 (IGNORE_CASE),// 0. (1<<8256) (7)
   TmItem1 (IGNORE_WIDTH),   // 1. (1<<9512) (8)
   TmItem1 (IGNORE_KANA),// 2. (1<<10  1024) (9)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-10-21 Thread Arkadiy Illarionov (via logerrit)
 i18npool/source/breakiterator/breakiterator_unicode.cxx   |2 
 i18npool/source/calendar/calendarImpl.cxx |   33 
+--
 i18npool/source/calendar/calendar_gregorian.cxx   |8 
 i18npool/source/collator/collatorImpl.cxx |   39 
+--
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |7 
 i18npool/source/indexentry/indexentrysupplier.cxx |   13 -
 i18npool/source/localedata/LocaleNode.cxx |   11 -
 i18npool/source/localedata/localedata.cxx |   45 
+---
 i18npool/source/localedata/saxparser.cxx  |4 
 i18npool/source/numberformatcode/numberformatcode.cxx |  107 
--
 i18npool/source/ordinalsuffix/ordinalsuffix.cxx   |   10 
 i18npool/source/search/textsearch.cxx |6 
 i18npool/source/textconversion/textconversion_ko.cxx  |   19 -
 i18npool/source/transliteration/ignoreDiacritics_CTL.cxx  |   15 -
 i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx |   15 -
 i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx |   12 -
 i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx  |   15 -
 i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx|   12 -
 i18npool/source/transliteration/transliterationImpl.cxx   |   57 
++---
 i18npool/source/transliteration/transliteration_OneToOne.cxx  |9 
 i18npool/source/transliteration/transliteration_body.cxx  |   98 
+++--
 21 files changed, 218 insertions(+), 319 deletions(-)

New commits:
commit 00e2f118d7f4f070ebddf16b2cf4e89cf9d551a7
Author: Arkadiy Illarionov 
AuthorDate: Sat Sep 7 23:10:33 2019 +0300
Commit: Arkadiy Illarionov 
CommitDate: Mon Oct 21 19:41:43 2019 +0200

Simplify Sequence iterations in i18npool

Use range-based loops, STL and comphelper functions.

Change-Id: Ibbc1c14e921585819872f26e8def2a60594e6a63
Reviewed-on: https://gerrit.libreoffice.org/78754
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov 

diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx 
b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index fee0b19dae38..e1675ec6a41d 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -142,7 +142,7 @@ void BreakIterator_Unicode::loadICUBreakIterator(const 
css::lang::Locale& rLocal
 icuBI->mpValue.reset();
 
 if (!bInMap && rule) do {
-uno::Sequence< OUString > breakRules = 
LocaleDataImpl::get()->getBreakIteratorRules(rLocale);
+const uno::Sequence< OUString > breakRules = 
LocaleDataImpl::get()->getBreakIteratorRules(rLocale);
 
 status = U_ZERO_ERROR;
 udata_setAppData("OpenOffice", OpenOffice_dat, );
diff --git a/i18npool/source/calendar/calendarImpl.cxx 
b/i18npool/source/calendar/calendarImpl.cxx
index d2e9801338dd..2cb659560489 100644
--- a/i18npool/source/calendar/calendarImpl.cxx
+++ b/i18npool/source/calendar/calendarImpl.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -42,14 +43,11 @@ CalendarImpl::~CalendarImpl()
 void SAL_CALL
 CalendarImpl::loadDefaultCalendarTZ( const css::lang::Locale& rLocale, const 
OUString& rTimeZone )
 {
-Sequence< Calendar2 > xC = 
LocaleDataImpl::get()->getAllCalendars2(rLocale);
-for (sal_Int32 i = 0; i < xC.getLength(); i++) {
-if (xC[i].Default) {
-loadCalendarTZ(xC[i].Name, rLocale, rTimeZone);
-return;
-}
-}
-throw ERROR;
+const Sequence< Calendar2 > xC = 
LocaleDataImpl::get()->getAllCalendars2(rLocale);
+auto pCal = std::find_if(xC.begin(), xC.end(), [](const Calendar2& rCal) { 
return rCal.Default; });
+if (pCal == xC.end())
+throw ERROR;
+loadCalendarTZ(pCal->Name, rLocale, rTimeZone);
 }
 
 void SAL_CALL
@@ -74,13 +72,9 @@ CalendarImpl::loadCalendarTZ( const OUString& uniqueID, 
const css::lang::Locale&
 
 if ( ! xI.is() ) {
 // check if the calendar is defined in localedata, load gregorian 
calendar service.
-Sequence< Calendar2 > xC = 
LocaleDataImpl::get()->getAllCalendars2(rLocale);
-for (i = 0; i < xC.getLength(); i++) {
-if (uniqueID == xC[i].Name) {
-xI = 
m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.i18n.Calendar_gregorian",
 m_xContext);
-break;
-}
-}
+const Sequence< Calendar2 > xC = 
LocaleDataImpl::get()->getAllCalendars2(rLocale);
+if (std::any_of(xC.begin(), xC.end(), [](const Calendar2& 
rCal) { return uniqueID == rCal.Name; }))
+xI = 

[Libreoffice-commits] core.git: i18npool/source

2019-10-20 Thread Arkadiy Illarionov (via logerrit)
 i18npool/source/transliteration/transliteration_body.cxx |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit a2b46aa93fe1ce1d98e8fed5a0987b106aeacec8
Author: Arkadiy Illarionov 
AuthorDate: Sun Oct 20 11:57:11 2019 +0300
Commit: Arkadiy Illarionov 
CommitDate: Sun Oct 20 11:46:05 2019 +0200

Drop redundant conditions

nMappingType is checked in lcl_getMappingTypeForToggleCase

Change-Id: I5e13ffad9028ca40d23e5ca19d765b3ee43c5724
Reviewed-on: https://gerrit.libreoffice.org/81151
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov 

diff --git a/i18npool/source/transliteration/transliteration_body.cxx 
b/i18npool/source/transliteration/transliteration_body.cxx
index a320b46d36aa..6d6c710b57c2 100644
--- a/i18npool/source/transliteration/transliteration_body.cxx
+++ b/i18npool/source/transliteration/transliteration_body.cxx
@@ -100,9 +100,7 @@ Transliteration_body::transliterateImpl(
 for (i = 0; i < nCount; i++)
 {
 // take care of TOGGLE_CASE transliteration:
-MappingType nTmpMappingType = nMappingType;
-if (nMappingType == (MappingType::LowerToUpper | 
MappingType::UpperToLower))
-nTmpMappingType = lcl_getMappingTypeForToggleCase( 
nMappingType, in[i] );
+MappingType nTmpMappingType = lcl_getMappingTypeForToggleCase( 
nMappingType, in[i] );
 
 const i18nutil::Mapping  = i18nutil::casefolding::getValue( 
in, i, nCount, aLocale, nTmpMappingType );
 nOffCount += map.nmap;
@@ -118,9 +116,7 @@ Transliteration_body::transliterateImpl(
 for (i = 0; i < nCount; i++)
 {
 // take care of TOGGLE_CASE transliteration:
-MappingType nTmpMappingType = nMappingType;
-if (nMappingType == (MappingType::LowerToUpper | 
MappingType::UpperToLower))
-nTmpMappingType = lcl_getMappingTypeForToggleCase( 
nMappingType, in[i] );
+MappingType nTmpMappingType = lcl_getMappingTypeForToggleCase( 
nMappingType, in[i] );
 
 const i18nutil::Mapping  = i18nutil::casefolding::getValue( 
in, i, nCount, aLocale, nTmpMappingType );
 for (sal_Int32 k = 0; k < map.nmap; k++)
@@ -158,9 +154,7 @@ Transliteration_body::transliterateImpl(
 for ( sal_Int32 i = 0; i < nCount; i++)
 {
 // take care of TOGGLE_CASE transliteration:
-MappingType nTmpMappingType = nMappingType;
-if (nMappingType == (MappingType::LowerToUpper | 
MappingType::UpperToLower))
-nTmpMappingType = lcl_getMappingTypeForToggleCase( 
nMappingType, in[i] );
+MappingType nTmpMappingType = lcl_getMappingTypeForToggleCase( 
nMappingType, in[i] );
 
 const i18nutil::Mapping  = i18nutil::casefolding::getValue( 
in, i, nCount, aLocale, nTmpMappingType );
 for (sal_Int32 k = 0; k < map.nmap; k++)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source include/editeng offapi/com svx/inc sw/qa sw/source writerfilter/source

2019-09-02 Thread Tim Bartlett (via logerrit)
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |   14 
++
 include/editeng/svxenum.hxx   |3 +-
 offapi/com/sun/star/style/NumberingType.idl   |   11 
+++
 svx/inc/numberingtype.hrc |1 
 sw/qa/extras/ooxmlexport/data/symbol_chicago_list.docx|binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx  |6 

 sw/source/filter/ww8/docxattributeoutput.cxx  |1 
 writerfilter/source/dmapper/ConversionHelper.cxx  |4 ++
 8 files changed, 38 insertions(+), 2 deletions(-)

New commits:
commit 0fbcac4caa971bd8824c96fe9ef7d9338cd37cbc
Author: Tim Bartlett 
AuthorDate: Mon Aug 19 18:40:56 2019 +1000
Commit: Michael Stahl 
CommitDate: Mon Sep 2 12:56:05 2019 +0200

tdf#55436 - Add SYMBOL_CHICAGO numbering scheme (for footnotes)

Includes adding SYMBOL_CHICAGO translations to .docx import/export filters

Change-Id: I5212739d7d04ab400a3d2aa549cb7cfd8531a4b8
Reviewed-on: https://gerrit.libreoffice.org/78114
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 89cd7d59c438..0bc9b1870116 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -67,6 +67,11 @@
 #define S_HI_TWO "\xDB\xB2"
 #define S_HI_THREE "\xDB\xB3"
 
+// Chicago footnote symbols
+#define S_DAGGER "\xE2\x80\xA0"
+#define S_DBL_DAGGER "\xE2\x80\xA1"
+#define S_SECTION "\xC2\xA7"
+
 #include 
 #include 
 #include 
@@ -226,6 +231,10 @@ static const sal_Unicode lowerLetter[] = {
 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A
 };
 
+static const sal_Unicode table_Chicago[] = {
+0x002a, 0x2020, 0x2021, 0x00a7
+};
+
 // Tables used for numbering in persian words
 static const sal_Unicode table_PersianWord_decade1[][7]={
 {0}, // 0
@@ -899,6 +908,10 @@ DefaultNumberingProvider::makeNumberingString( const 
Sequence 
RID_SVXSTRARY_NUMBERINGTYPE[] =
 { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "First, Second, Third, ...") ,
   62 /* TEXT_ORDINAL */ },
 { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "A, .., AA, .., AAA, ...") ,  
   9  /* SVX_NUM_CHARS_UPPER_LETTER_N */ },
 { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "a, .., aa, .., aaa, ...") ,  
   10 /* SVX_NUM_CHARS_LOWER_LETTER_N */ },
+{ NC_("RID_SVXSTRARY_NUMBERINGTYPE", "*, †, ‡, §, **, ††, ...") ,  
   63 /* SYMBOL_CHICAGO   */ },
 { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Native Numbering") , 
   12 /* NATIVE_NUMBERING */ },
 { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "А, Б, .., Аа, Аб, ... (Bulgarian)") 
,   38 /* CHARS_CYRILLIC_UPPER_LETTER_BG   */ },
 { NC_("RID_SVXSTRARY_NUMBERINGTYPE", "а, б, .., аа, аб, ... (Bulgarian)") 
,   39 /* CHARS_CYRILLIC_LOWER_LETTER_BG   */ },
diff --git a/sw/qa/extras/ooxmlexport/data/symbol_chicago_list.docx 
b/sw/qa/extras/ooxmlexport/data/symbol_chicago_list.docx
new file mode 100644
index ..5d27260ca832
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/symbol_chicago_list.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index e1696f902f98..cb252c87ded9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -696,6 +696,12 @@ DECLARE_OOXMLEXPORT_TEST(testOoxmlTextOrdinalList, 
"text_ordinal_list.docx")
 CPPUNIT_ASSERT_EQUAL(style::NumberingType::TEXT_ORDINAL, numFormat);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testOoxmlSymbolChicagoList, 
"symbol_chicago_list.docx")
+{
+sal_Int16   numFormat = getNumberingTypeOfParagraph(1);
+CPPUNIT_ASSERT_EQUAL(style::NumberingType::SYMBOL_CHICAGO, numFormat);
+}
+
 DECLARE_OOXMLEXPORT_TEST(testOoxmlNumListZHTW, "numlist-zhtw.odt")
 {
 xmlDocPtr pXmlDoc = parseExport("word/numbering.xml");
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 209a1a1aec0a..0a0a8a94badb 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6257,6 +6257,7 @@ static OString impl_LevelNFC( sal_uInt16 nNumberingType , 
const SfxItemSet *pOut
 case style::NumberingType::TEXT_NUMBER: aType="ordinal"; break;
 case style::NumberingType::TEXT_CARDINAL: aType="cardinalText"; break;
 case style::NumberingType::TEXT_ORDINAL: aType="ordinalText"; break;
+case style::NumberingType::SYMBOL_CHICAGO: aType="chicago"; break;
 /*
 Fallback the rest to decimal.
 case 

[Libreoffice-commits] core.git: i18npool/source libreofficekit/qa libreofficekit/source linguistic/source oox/source opencl/inc opencl/source

2019-08-20 Thread Noel Grandin (via logerrit)
 i18npool/source/breakiterator/breakiteratorImpl.cxx |4 
+--
 i18npool/source/breakiterator/xdictionary.cxx   |4 
+--
 i18npool/source/characterclassification/characterclassificationImpl.cxx |2 
-
 i18npool/source/collator/collatorImpl.cxx   |2 
-
 i18npool/source/inputchecker/inputsequencechecker.cxx   |2 
-
 i18npool/source/localedata/localedata.cxx   |4 
+--
 libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx|2 
-
 libreofficekit/qa/gtktiledviewer/gtv-comments-sidebar.cxx   |2 
-
 libreofficekit/source/gtk/lokdocview.cxx|   12 
+-
 linguistic/source/dicimp.cxx|2 
-
 linguistic/source/dlistimp.cxx  |2 
-
 oox/source/drawingml/diagram/diagram.cxx|2 
-
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |8 
+++---
 oox/source/drawingml/shape.cxx  |2 
-
 oox/source/vml/vmldrawing.cxx   |2 
-
 opencl/inc/opencl_device_selection.h|2 
-
 opencl/source/opencl_device.cxx |2 
-
 17 files changed, 28 insertions(+), 28 deletions(-)

New commits:
commit 07f9223daae92ac11be2382ecd0095e744f5695f
Author: Noel Grandin 
AuthorDate: Tue Aug 20 09:32:35 2019 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 20 12:04:41 2019 +0200

loplugin:constvars in i18npool..opencl

Change-Id: I82738a18ff116fdc78f07b453c93b1b631632caf
Reviewed-on: https://gerrit.libreoffice.org/5
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx 
b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index bc52262b1d08..21cdfce9c499 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -531,7 +531,7 @@ sal_Int16  BreakIteratorImpl::getScriptClass(sal_uInt32 
currentChar)
 bool BreakIteratorImpl::createLocaleSpecificBreakIterator(const OUString& 
aLocaleName)
 {
 // to share service between same Language but different Country code, like 
zh_CN and zh_TW
-for (lookupTableItem& listItem : lookupTable) {
+for (const lookupTableItem& listItem : lookupTable) {
 if (aLocaleName == listItem.aLocale.Language) {
 xBI = listItem.xBI;
 return true;
@@ -576,7 +576,7 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const 
Locale& rLocale)
 else if (m_xContext.is()) {
 aLocale = rLocale;
 
-for (lookupTableItem& listItem : lookupTable) {
+for (const lookupTableItem& listItem : lookupTable) {
 if (rLocale == listItem.aLocale)
 return xBI = listItem.xBI;
 }
diff --git a/i18npool/source/breakiterator/xdictionary.cxx 
b/i18npool/source/breakiterator/xdictionary.cxx
index c905f67d4685..f21e377c68c0 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -127,7 +127,7 @@ xdictionary::xdictionary(const sal_Char *lang) :
 
 xdictionary::~xdictionary()
 {
-for (WordBreakCache & i : cache) {
+for (const WordBreakCache & i : cache) {
 if (i.size > 0) {
 delete [] i.contents;
 delete [] i.wordboundary;
@@ -151,7 +151,7 @@ void xdictionary::initDictionaryData(const sal_Char *pLang)
 static std::vector< datacache > aLoadedCache;
 
 osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
-for(datacache & i : aLoadedCache)
+for(const datacache & i : aLoadedCache)
 {
 if( i.maLang != pLang )
 {
diff --git 
a/i18npool/source/characterclassification/characterclassificationImpl.cxx 
b/i18npool/source/characterclassification/characterclassificationImpl.cxx
index f66a4b26085d..721c82bf9304 100644
--- a/i18npool/source/characterclassification/characterclassificationImpl.cxx
+++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx
@@ -155,7 +155,7 @@ 
CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Loca
 if (cachedItem && cachedItem->equals(rLocale))
 return cachedItem->xCI;
 else {
-for (auto & i : lookupTable) {
+for (const auto & i : lookupTable) {
 cachedItem = i.get();
 if (cachedItem->equals(rLocale))
 return cachedItem->xCI;
diff --git a/i18npool/source/collator/collatorImpl.cxx 
b/i18npool/source/collator/collatorImpl.cxx
index f072adbb192a..155b271b1b46 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -164,7 +164,7 @@ CollatorImpl::createCollator(const 

[Libreoffice-commits] core.git: i18npool/source include/i18npool svl/source

2019-08-19 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/LocaleNode.cxx |6 +++---
 include/i18npool/reservedconstants.hxx|   21 +
 svl/source/numbers/zforlist.cxx   |7 +++
 3 files changed, 31 insertions(+), 3 deletions(-)

New commits:
commit 3eb837565878ebb2da5a11c3286a1f1ef0899183
Author: Eike Rathke 
AuthorDate: Mon Aug 19 18:28:19 2019 +0200
Commit: Eike Rathke 
CommitDate: Mon Aug 19 19:50:03 2019 +0200

Add build time check for NF_INDEX_TABLE_ENTRIES <= nFirstFreeFormatIndex

This was just tribal knowledge..

Change-Id: I3d4d93d6eae01c2f3f73a309043bf59dcca10ff6
Reviewed-on: https://gerrit.libreoffice.org/77749
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index c79c2dae88bf..11a12bd3d6eb 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -28,6 +28,7 @@
 #include 
 
 #include "LocaleNode.hxx"
+#include 
 #include 
 #include 
 
@@ -574,7 +575,6 @@ void LCFormatNode::generateCode (const OFileWriter ) 
const
 bool bCtypeIsRef = false;
 bool bHaveEngineering = false;
 bool bShowNextFreeFormatIndex = false;
-const sal_Int16 nFirstFreeFormatIndex = 60;
 
 for (sal_Int32 i = 0; i< getNumberOfChildren() ; i++, formatCount++)
 {
@@ -621,7 +621,7 @@ void LCFormatNode::generateCode (const OFileWriter ) 
const
 sal_Int16 formatindex = static_cast(aFormatIndex.toInt32());
 // Ensure the new reserved range is not used anymore, free usage start
 // was up'ed from 50 to 60.
-if (50 <= formatindex && formatindex < nFirstFreeFormatIndex)
+if (50 <= formatindex && formatindex < i18npool::nFirstFreeFormatIndex)
 {
 incErrorInt( "Error: Reserved formatindex=\"%d\" in 
FormatElement.\n", formatindex);
 bShowNextFreeFormatIndex = true;
@@ -828,7 +828,7 @@ void LCFormatNode::generateCode (const OFileWriter ) 
const
 
 if (bShowNextFreeFormatIndex)
 {
-sal_Int16 nNext = nFirstFreeFormatIndex;
+sal_Int16 nNext = i18npool::nFirstFreeFormatIndex;
 std::set::const_iterator it( aFormatIndexSet.find( nNext));
 if (it != aFormatIndexSet.end())
 {
diff --git a/include/i18npool/reservedconstants.hxx 
b/include/i18npool/reservedconstants.hxx
new file mode 100644
index ..400344ce5a8d
--- /dev/null
+++ b/include/i18npool/reservedconstants.hxx
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+/** Constant values shared between i18npool and, for example, the number 
formatter. */
+namespace i18npool
+{
+/** The number of reserved (with defined meaning) built-in format code indices,
+additional locale data format codes can be defined starting at this index
+value. */
+constexpr sal_Int16 nFirstFreeFormatIndex = 60;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 6d8a906a0038..5b7aadb8ebd5 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -45,6 +45,7 @@
 #include "zforscan.hxx"
 #include "zforfind.hxx"
 #include 
+#include 
 
 #include 
 #include 
@@ -92,6 +93,12 @@ using namespace ::std;
 
 static_assert( ZF_STANDARD_TEXT == NF_STANDARD_FORMAT_TEXT, "definition 
mismatch" );
 
+static_assert( NF_INDEX_TABLE_ENTRIES <= i18npool::nFirstFreeFormatIndex,
+"NfIndexTableOffset crosses i18npool's locale data reserved format 
code index bounds.\n"
+"You will need to adapt all locale data files defining index values "
+"(formatIndex=\"...\") in that range and increment those and when done 
"
+"adjust nFirstFreeFormatIndex in i18npool/reservedconstants.hxx");
+
 /* Locale that is set if an unknown locale (from another system) is loaded of
  * legacy documents. Can not be SYSTEM because else, for example, a German "DM"
  * (old currency) is recognized as a date (#53155#). */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-08-16 Thread Julien Nabet (via logerrit)
 i18npool/source/breakiterator/breakiteratorImpl.cxx |3 
+--
 i18npool/source/calendar/calendarImpl.cxx   |6 
++
 i18npool/source/characterclassification/cclass_unicode.cxx  |3 
+--
 i18npool/source/characterclassification/characterclassificationImpl.cxx |3 
+--
 i18npool/source/characterclassification/unoscripttypedetector.cxx   |3 
+--
 i18npool/source/collator/collatorImpl.cxx   |3 
+--
 i18npool/source/nativenumber/nativenumbersupplier.cxx   |3 
+--
 i18npool/source/numberformatcode/numberformatcode.cxx   |3 
+--
 i18npool/source/textconversion/textconversionImpl.cxx   |3 
+--
 i18npool/source/transliteration/transliterationImpl.cxx |7 
++-
 i18npool/source/transliteration/transliteration_commonclass.cxx |3 
+--
 11 files changed, 13 insertions(+), 27 deletions(-)

New commits:
commit 973424ab312bfe38caa486304f5d9dae2cd59069
Author: Julien Nabet 
AuthorDate: Fri Aug 16 14:54:28 2019 +0200
Commit: Julien Nabet 
CommitDate: Fri Aug 16 16:03:47 2019 +0200

tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

in i18npool

Change-Id: I99563b620056e7cd665a2b3330d15c73d0144c7e
Reviewed-on: https://gerrit.libreoffice.org/77583
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx 
b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 0eb7737c9156..7fcd4a808c51 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -629,8 +629,7 @@ BreakIteratorImpl::supportsService(const OUString& 
rServiceName)
 Sequence< OUString > SAL_CALL
 BreakIteratorImpl::getSupportedServiceNames()
 {
-Sequence< OUString > aRet { "com.sun.star.i18n.BreakIterator" };
-return aRet;
+return Sequence< OUString > { "com.sun.star.i18n.BreakIterator" };
 }
 
 }
diff --git a/i18npool/source/calendar/calendarImpl.cxx 
b/i18npool/source/calendar/calendarImpl.cxx
index 35e70146c3f9..be07222a347f 100644
--- a/i18npool/source/calendar/calendarImpl.cxx
+++ b/i18npool/source/calendar/calendarImpl.cxx
@@ -365,10 +365,8 @@ CalendarImpl::supportsService(const OUString& rServiceName)
 Sequence< OUString > SAL_CALL
 CalendarImpl::getSupportedServiceNames()
 {
-Sequence< OUString > aRet(2);
-aRet[0] = "com.sun.star.i18n.LocaleCalendar";
-aRet[1] = "com.sun.star.i18n.LocaleCalendar2";
-return aRet;
+return Sequence< OUString > { "com.sun.star.i18n.LocaleCalendar",
+"com.sun.star.i18n.LocaleCalendar2" };
 }
 
 }
diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx 
b/i18npool/source/characterclassification/cclass_unicode.cxx
index 05769bc65eb1..3a2ae64d598d 100644
--- a/i18npool/source/characterclassification/cclass_unicode.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode.cxx
@@ -286,8 +286,7 @@ sal_Bool SAL_CALL cclass_Unicode::supportsService(const 
OUString& rServiceName)
 
 Sequence< OUString > SAL_CALL cclass_Unicode::getSupportedServiceNames()
 {
-Sequence< OUString > aRet { 
"com.sun.star.i18n.CharacterClassification_Unicode" };
-return aRet;
+return Sequence< OUString > { 
"com.sun.star.i18n.CharacterClassification_Unicode" };
 }
 
 }
diff --git 
a/i18npool/source/characterclassification/characterclassificationImpl.cxx 
b/i18npool/source/characterclassification/characterclassificationImpl.cxx
index c7db5f0f9df4..5693788316a8 100644
--- a/i18npool/source/characterclassification/characterclassificationImpl.cxx
+++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx
@@ -202,8 +202,7 @@ CharacterClassificationImpl::supportsService(const 
OUString& rServiceName)
 Sequence< OUString > SAL_CALL
 CharacterClassificationImpl::getSupportedServiceNames()
 {
-Sequence< OUString > aRet { "com.sun.star.i18n.CharacterClassification" };
-return aRet;
+return Sequence< OUString > { "com.sun.star.i18n.CharacterClassification" 
};
 }
 
 }
diff --git a/i18npool/source/characterclassification/unoscripttypedetector.cxx 
b/i18npool/source/characterclassification/unoscripttypedetector.cxx
index 78324ba85756..dd6847b82c0c 100644
--- a/i18npool/source/characterclassification/unoscripttypedetector.cxx
+++ b/i18npool/source/characterclassification/unoscripttypedetector.cxx
@@ -78,8 +78,7 @@ UnoScriptTypeDetector::supportsService(const OUString& 
ServiceName)
 css::uno::Sequence< OUString > SAL_CALL
 UnoScriptTypeDetector::getSupportedServiceNames()
 {
-css::uno::Sequence< OUString > aRet { 
"com.sun.star.i18n.ScriptTypeDetector" };
-return aRet;
+return css::uno::Sequence< OUString > { 
"com.sun.star.i18n.ScriptTypeDetector" };
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/i18npool/source/collator/collatorImpl.cxx 

[Libreoffice-commits] core.git: i18npool/source

2019-08-15 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/hsb_DE.xml |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit add2f2e9185a759847f3ccabc2d0cb04306eca85
Author: Eike Rathke 
AuthorDate: Thu Aug 15 12:40:09 2019 +0200
Commit: Eike Rathke 
CommitDate: Thu Aug 15 14:25:59 2019 +0200

Related: tdf#126931 abbreviated month names should be three letters

Change-Id: I8d0d54bb70394f9e505d357b1f87aa47ef4d60fe
Reviewed-on: https://gerrit.libreoffice.org/77505
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/hsb_DE.xml 
b/i18npool/source/localedata/data/hsb_DE.xml
index 22f446f6b699..92e4eaeb01d7 100644
--- a/i18npool/source/localedata/data/hsb_DE.xml
+++ b/i18npool/source/localedata/data/hsb_DE.xml
@@ -267,7 +267,7 @@
 
 
   mar
-  měrc
+  měr
   měrc
 
 
@@ -277,7 +277,7 @@
 
 
   may
-  meja
+  mej
   meja
 
 
@@ -329,7 +329,7 @@
 
 
   mar
-  měrc
+  měr
   měrca
 
 
@@ -339,7 +339,7 @@
 
 
   may
-  meja
+  mej
   meja
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-08-14 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/dsb_DE.xml |   64 +-
 i18npool/source/localedata/data/hsb_DE.xml |   84 +
 2 files changed, 136 insertions(+), 12 deletions(-)

New commits:
commit d3a565eddffc6e39ffd47f018ec7ab17d2a554cd
Author: Eike Rathke 
AuthorDate: Thu Aug 15 00:50:18 2019 +0200
Commit: Eike Rathke 
CommitDate: Thu Aug 15 02:03:13 2019 +0200

Resolves: tdf#126931 fix Sorbian date formats and add genitive month names

Change-Id: I9ece3f55eff79a3eebc294f7ecc8cca0beae650f
Reviewed-on: https://gerrit.libreoffice.org/77477
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/dsb_DE.xml 
b/i18npool/source/localedata/data/dsb_DE.xml
index f97e2146db72..4bad6889ef56 100644
--- a/i18npool/source/localedata/data/dsb_DE.xml
+++ b/i18npool/source/localedata/data/dsb_DE.xml
@@ -144,7 +144,7 @@
   D.  
 
 
-  MM.DD
+  MM-DD
 
 
   YY-MM-DD
@@ -316,6 +316,68 @@
   december
 
   
+  
+
+  jan
+  jan.
+  januara
+
+
+  feb
+  feb.
+  februara
+
+
+  mar
+  měr.
+  měrca
+
+
+  apr
+  apr.
+  apryla
+
+
+  may
+  maj
+  maja
+
+
+  jun
+  jun.
+  junija
+
+
+  jul
+  jul.
+  julija
+
+
+  aug
+  awg.
+  awgusta
+
+
+  sep
+  sep.
+  septembra
+
+
+  oct
+  okt.
+  oktobra
+
+
+  nov
+  now.
+  nowembra
+
+
+  dec
+  dec.
+  decembra
+
+  
   
 
   bc
diff --git a/i18npool/source/localedata/data/hsb_DE.xml 
b/i18npool/source/localedata/data/hsb_DE.xml
index a481137a43d4..22f446f6b699 100644
--- a/i18npool/source/localedata/data/hsb_DE.xml
+++ b/i18npool/source/localedata/data/hsb_DE.xml
@@ -108,7 +108,7 @@
   D.MM.YY
 
 
-  DD,  
+  DD.  
 
 
   DD.MM.YY
@@ -117,34 +117,34 @@
   DD.MM.
 
 
-  D, MMM YY
+  D. MMM YY
 
 
-  D, MMM 
+  D. MMM 
 
 
-  D, MMM 
+  D. MMM 
 
 
-  D,  
+  D.  
 
 
-  D,  YY
+  D.  YY
 
 
   NN, DD.MMM.YY
 
 
-  NN, D, MMM YY
+  NN, D. MMM YY
 
 
-  NN, D,  
+  NN, D.  
 
 
-  D,  
+  D.  
 
 
-  MM.DD
+  MM-DD
 
 
   YY-MM-DD
@@ -157,7 +157,7 @@
   MM.YY
 
 
-  MMM.DD
+  DD.MMM
 
 
   
@@ -316,6 +316,68 @@
   december
 
   
+  
+
+  jan
+  jan
+  januara
+
+
+  feb
+  feb
+  februara
+
+
+  mar
+  měrc
+  měrca
+
+
+  apr
+  apr
+  apryla
+
+
+  may
+  meja
+  meja
+
+
+  jun
+  jun
+  junija
+
+
+  jul
+  jul
+  julija
+
+
+  aug
+  awg
+  awgusta
+
+
+  sep
+  sep
+  septembra
+
+
+  oct
+  okt
+  oktobra
+
+
+  nov
+  now
+  nowembra
+
+
+  dec
+  dec
+  decembra
+
+  
   
 
   bc
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-08-14 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/fr_BF.xml |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 21bffad6bc108f3dc5eee608bf702412a5fcb530
Author: Eike Rathke 
AuthorDate: Wed Aug 14 20:34:58 2019 +0200
Commit: Eike Rathke 
CommitDate: Wed Aug 14 22:49:34 2019 +0200

Resolves: tdf#124108 localized quotation marks for [fr-BF] and derived

Inherited by
fr_BJ
fr_CI
fr_ML
fr_NE
fr_SN
fr_TG

Change-Id: Ic47345fedd0792db213e6584f581ce63b8c5439b
Reviewed-on: https://gerrit.libreoffice.org/77470
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/fr_BF.xml 
b/i18npool/source/localedata/data/fr_BF.xml
index 0a7ee39fd750..c442a93ceea7 100644
--- a/i18npool/source/localedata/data/fr_BF.xml
+++ b/i18npool/source/localedata/data/fr_BF.xml
@@ -33,10 +33,10 @@

 
 
-  '
-  '
-  "
-  "
+  ‘
+  ’
+  «
+  »
 
 AM
 PM
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-07-31 Thread Stephan Bergmann (via logerrit)
 i18npool/source/breakiterator/breakiterator_cjk.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0ea06dd96c513e3daa881896679507189aeb2034
Author: Stephan Bergmann 
AuthorDate: Mon Jul 29 13:33:53 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jul 31 09:18:23 2019 +0200

Avoid out-of-bounds string access

...as happens when loading doc/ooo112635-1.doc (i.e., attachment
justified_chinese_paragraph_issue.doc at
):

> soffice.bin: /home/sbergman/lo/core/include/rtl/ustring.hxx:689: 
sal_Unicode rtl::OUString::operator[](sal_Int32) const: Assertion `index >= 0 
&& static_cast(index) < static_cast(getLength())' 
failed.

> #4  0x7fff80397994 in rtl::OUString::operator[](int) const 
(this=0x61400027fdc0, index=68) at 
/home/sbergman/lo/core/include/rtl/ustring.hxx:689
> #5  0x7fff80393283 in 
i18npool::BreakIterator_CJK::getLineBreak(rtl::OUString const&, int, 
com::sun::star::lang::Locale const&, int, 
com::sun::star::i18n::LineBreakHyphenationOptions const&, 
com::sun::star::i18n::LineBreakUserOptions const&) (this=0x613000281480, Text=" 
   本篇即在于指出十二宫反应的一些重点。学者若能参考上篇《星曜论》所言的星曜性质,当别有会心之处。因为事实上没有可能将一切星曜组合的", 
nStartPos=68, bOptions=...) at 
/home/sbergman/lo/core/i18npool/source/breakiterator/breakiterator_cjk.cxx:109
> #6  0x7fff803942fa in non-virtual thunk to 
i18npool::BreakIterator_CJK::getLineBreak(rtl::OUString const&, int, 
com::sun::star::lang::Locale const&, int, 
com::sun::star::i18n::LineBreakHyphenationOptions const&, 
com::sun::star::i18n::LineBreakUserOptions const&) () at 
/home/sbergman/lo/core/instdir/program/../program/libi18npoollo.so
> #7  0x7fff803aed0f in 
i18npool::BreakIteratorImpl::getLineBreak(rtl::OUString const&, int, 
com::sun::star::lang::Locale const&, int, 
com::sun::star::i18n::LineBreakHyphenationOptions const&, 
com::sun::star::i18n::LineBreakUserOptions const&) (this=0x60e0004163e0, Text=" 
   本篇即在于指出十二宫反应的一些重点。学者若能参考上篇《星曜论》所言的星曜性质,当别有会心之处。因为事实上没有可能将一切星曜组合的", 
nStartPos=68, rLocale=..., nMinBreakPos=35, hOptions=..., bOptions=...) at 
/home/sbergman/lo/core/i18npool/source/breakiterator/breakiteratorImpl.cxx:243
> #8  0x7fff803aeeca in non-virtual thunk to 
i18npool::BreakIteratorImpl::getLineBreak(rtl::OUString const&, int, 
com::sun::star::lang::Locale const&, int, 
com::sun::star::i18n::LineBreakHyphenationOptions const&, 
com::sun::star::i18n::LineBreakUserOptions const&) () at 
/home/sbergman/lo/core/instdir/program/../program/libi18npoollo.so
> #9  0x7fff4d209e09 in SwTextGuess::Guess(SwTextPortion const&, 
SwTextFormatInfo&, unsigned short) (this=0x7fff9ae398c0, rPor=..., rInf=..., 
nPorHeight=304) at /home/sbergman/lo/core/sw/source/core/text/guess.cxx:407
> #10 0x7fff4d5be607 in SwTextPortion::Format_(SwTextFormatInfo&) 
(this=0x604000a2f950, rInf=...) at 
/home/sbergman/lo/core/sw/source/core/text/portxt.cxx:310
[...]

Change-Id: I51d4bbecce4e929752a9f561f72acef446be21cb
Reviewed-on: https://gerrit.libreoffice.org/76550
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx 
b/i18npool/source/breakiterator/breakiterator_cjk.cxx
index 3854ce2ca628..2049f3b47f73 100644
--- a/i18npool/source/breakiterator/breakiterator_cjk.cxx
+++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx
@@ -106,6 +106,7 @@ LineBreakResults SAL_CALL BreakIterator_CJK::getLineBreak(
 const sal_Int32 nOldStartPos = nStartPos;
 
 if (bOptions.allowPunctuationOutsideMargin &&
+nStartPos != Text.getLength() &&
 hangingCharacters.indexOf(Text[nStartPos]) != -1 &&
 (Text.iterateCodePoints(  ), nStartPos == 
Text.getLength())) {
 ; // do nothing
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-07-10 Thread Lionel Elie Mamane (via logerrit)
 i18npool/source/calendar/calendarImpl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2388ffc6d7f10bf0413bd2350e808a3337a99ff2
Author: Lionel Elie Mamane 
AuthorDate: Wed Jul 10 10:27:19 2019 +0200
Commit: Lionel Elie Mamane 
CommitDate: Wed Jul 10 10:27:50 2019 +0200

build failure - disambiguate Calendar return class

Change-Id: I892281f85f6cc9c2de2c341ae63240ae85d302c4

diff --git a/i18npool/source/calendar/calendarImpl.cxx 
b/i18npool/source/calendar/calendarImpl.cxx
index c9e22f7bc9b7..228bed358b09 100644
--- a/i18npool/source/calendar/calendarImpl.cxx
+++ b/i18npool/source/calendar/calendarImpl.cxx
@@ -128,7 +128,7 @@ CalendarImpl::getLoadedCalendar2()
 return xCalendar->getLoadedCalendar2();
 }
 
-Calendar SAL_CALL
+::css::i18n::Calendar SAL_CALL
 CalendarImpl::getLoadedCalendar()
 {
 if (!xCalendar.is())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-06-27 Thread Eike Rathke (via logerrit)
 i18npool/source/calendar/calendarImpl.cxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 71674ab6a7472132ca2eee1381e3273bd6b35a7b
Author: Eike Rathke 
AuthorDate: Thu Jun 27 13:25:37 2019 +0200
Commit: Eike Rathke 
CommitDate: Thu Jun 27 15:36:22 2019 +0200

Fix name clash problem

Reportedly there can be confusion between names css::lang::Locale
and icu::Locale if explicit namespaces are omitted due to (the bad
habit of using) the using directive, since

commit 942de6a01ba990e5f3bc55ce4ab3737a03f67f39
CommitDate: Thu Jun 20 01:57:20 2019 +0200

Resolves: tdf#92503 introduce TimeZone to calendar loading and 
default to UTC

Rightly, because that via inclusion of calendar_gregorian.hxx
pulls in unicode/calendar.h which in turn ...

Didn't happen in TDF builds so far.

Change-Id: Ie7fb7fce0ab5cd4b93fbbfd3abe04d7d18a8a081
Reviewed-on: https://gerrit.libreoffice.org/74795
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/calendar/calendarImpl.cxx 
b/i18npool/source/calendar/calendarImpl.cxx
index f0962104a4b0..c9e22f7bc9b7 100644
--- a/i18npool/source/calendar/calendarImpl.cxx
+++ b/i18npool/source/calendar/calendarImpl.cxx
@@ -26,7 +26,6 @@
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::i18n;
-using namespace ::com::sun::star::lang;
 
 namespace i18npool {
 
@@ -41,7 +40,7 @@ CalendarImpl::~CalendarImpl()
 }
 
 void SAL_CALL
-CalendarImpl::loadDefaultCalendarTZ( const Locale& rLocale, const OUString& 
rTimeZone )
+CalendarImpl::loadDefaultCalendarTZ( const css::lang::Locale& rLocale, const 
OUString& rTimeZone )
 {
 Sequence< Calendar2 > xC = 
LocaleDataImpl::get()->getAllCalendars2(rLocale);
 for (sal_Int32 i = 0; i < xC.getLength(); i++) {
@@ -54,7 +53,7 @@ CalendarImpl::loadDefaultCalendarTZ( const Locale& rLocale, 
const OUString& rTim
 }
 
 void SAL_CALL
-CalendarImpl::loadCalendarTZ( const OUString& uniqueID, const Locale& rLocale, 
const OUString& rTimeZone )
+CalendarImpl::loadCalendarTZ( const OUString& uniqueID, const 
css::lang::Locale& rLocale, const OUString& rTimeZone )
 {
 Reference < XCalendar4 > xOldCalendar( xCalendar );  // backup
 const OUString aCacheID( uniqueID + "_" + rTimeZone);
@@ -138,7 +137,7 @@ CalendarImpl::getLoadedCalendar()
 }
 
 Sequence< OUString > SAL_CALL
-CalendarImpl::getAllCalendars( const Locale& rLocale )
+CalendarImpl::getAllCalendars( const css::lang::Locale& rLocale )
 {
 Sequence< Calendar2 > xC = 
LocaleDataImpl::get()->getAllCalendars2(rLocale);
 sal_Int32 nLen = xC.getLength();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-06-24 Thread Andrea Gelmini (via logerrit)
 i18npool/source/indexentry/genindex_data.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 52800731baf9fcb88e54d60de5585640c8f97f7b
Author: Andrea Gelmini 
AuthorDate: Fri Jun 14 22:42:34 2019 +
Commit: Julien Nabet 
CommitDate: Tue Jun 25 07:17:55 2019 +0200

Fix typo

Change-Id: I3a7d636d822f8f3e51c91ada359c4ef47bce763c
Reviewed-on: https://gerrit.libreoffice.org/74667
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/i18npool/source/indexentry/genindex_data.cxx 
b/i18npool/source/indexentry/genindex_data.cxx
index a6f054138df3..5fae0d3da165 100644
--- a/i18npool/source/indexentry/genindex_data.cxx
+++ b/i18npool/source/indexentry/genindex_data.cxx
@@ -94,7 +94,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 fprintf(fp, " * Copyright(c) 1999 - 2006, Sun Microsystems, Inc.\n");
 fprintf(fp, " * All Rights Reserved.\n");
 fprintf(fp, " */\n\n");
-fprintf(fp, "/* !!!The file is generated automatically. DONOT edit the 
file manually!!! */\n\n");
+fprintf(fp, "/* !!!The file is generated automatically. DO NOT edit the 
file manually!!! */\n\n");
 fprintf(fp, "#include \n");
 fprintf(fp, "\nextern \"C\" {\n");
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-06-24 Thread Andrea Gelmini (via logerrit)
 i18npool/source/collator/gencoll_rule.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0d1fef6ce003a935066d2fcfbee7416aa876f057
Author: Andrea Gelmini 
AuthorDate: Fri Jun 14 22:42:35 2019 +
Commit: Julien Nabet 
CommitDate: Tue Jun 25 07:08:55 2019 +0200

Fix typo

Change-Id: I26015136d5c5bbfae9cf2d61d7db1f23f960d78a
Reviewed-on: https://gerrit.libreoffice.org/74666
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/i18npool/source/collator/gencoll_rule.cxx 
b/i18npool/source/collator/gencoll_rule.cxx
index 31480f3dc574..fb0349f19b84 100644
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ b/i18npool/source/collator/gencoll_rule.cxx
@@ -45,7 +45,7 @@ static void data_write(char* file, char* name, sal_uInt8 
*data, sal_Int32 len)
 fprintf(fp, " * Copyright(c) 1999 - 2000, Sun Microsystems, Inc.\n");
 fprintf(fp, " * All Rights Reserved.\n");
 fprintf(fp, " */\n\n");
-fprintf(fp, "/* !!!The file is generated automatically. DONOT edit the 
file manually!!! */\n\n");
+fprintf(fp, "/* !!!The file is generated automatically. DO NOT edit the 
file manually!!! */\n\n");
 fprintf(fp, "#include \n");
 fprintf(fp, "\nextern \"C\" {\n");
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-06-24 Thread Andrea Gelmini (via logerrit)
 i18npool/source/textconversion/genconv_dict.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 80bb9a67cdd2578fa8be228d22d24a9ffc85ae5b
Author: Andrea Gelmini 
AuthorDate: Fri Jun 14 22:42:33 2019 +
Commit: Julien Nabet 
CommitDate: Tue Jun 25 06:32:56 2019 +0200

Fix typo

Change-Id: Ib844eafd0c717c2c3c65d3a0428eccb5e42f912d
Reviewed-on: https://gerrit.libreoffice.org/74668
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/i18npool/source/textconversion/genconv_dict.cxx 
b/i18npool/source/textconversion/genconv_dict.cxx
index cc3cd81cbc6d..4173d898622d 100644
--- a/i18npool/source/textconversion/genconv_dict.cxx
+++ b/i18npool/source/textconversion/genconv_dict.cxx
@@ -60,7 +60,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 fprintf(cfp, " * Copyright(c) 1999 - 2000, Sun Microsystems, Inc.\n");
 fprintf(cfp, " * All Rights Reserved.\n");
 fprintf(cfp, " */\n\n");
-fprintf(cfp, "/* !!!The file is generated automatically. DONOT edit the 
file manually!!! */\n\n");
+fprintf(cfp, "/* !!!The file is generated automatically. DO NOT edit the 
file manually!!! */\n\n");
 fprintf(cfp, "#include \n");
 fprintf(cfp, "#include \n");
 fprintf(cfp, "\nextern \"C\" {\n");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-06-24 Thread Andrea Gelmini (via logerrit)
 i18npool/source/characterclassification/cclass_unicode_parser.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 46f76c41ebbacb5ce125a83e48725900a3c37261
Author: Andrea Gelmini 
AuthorDate: Fri Jun 14 22:42:36 2019 +
Commit: Julien Nabet 
CommitDate: Tue Jun 25 06:31:37 2019 +0200

Fix typo

Change-Id: I8a50c7c40c1d90fec25ec6ecd73d4aeb4da0fd9e
Reviewed-on: https://gerrit.libreoffice.org/74665
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx 
b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index bb8387836ae8..05ac79ce624c 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -704,7 +704,7 @@ void cclass_Unicode::parseText( ParseResult& r, const 
OUString& rText, sal_Int32
 assert(r.LeadingWhiteSpace == 0);
 eState = ssGetChar;
 
-//! All the variables below (plus ParseResult) have to be resetted on 
ssRewindFromValue!
+//! All the variables below (plus ParseResult) have to be reset on 
ssRewindFromValue!
 OUStringBuffer aSymbol;
 bool isFirst(true);
 sal_Int32 index(nPos); // index of next code point after current
@@ -717,7 +717,7 @@ void cclass_Unicode::parseText( ParseResult& r, const 
OUString& rText, sal_Int32
 bool bMightBeWord = true;
 bool bMightBeWordLast = true;
 bool bDecSepAltUsed = false;
-//! All the variables above (plus ParseResult) have to be resetted on 
ssRewindFromValue!
+//! All the variables above (plus ParseResult) have to be reset on 
ssRewindFromValue!
 sal_Int32 nextCharIndex(nPos); // == index of nextChar
 
 while ((current != 0) && (eState != ssStop))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-06-03 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/cu_RU.xml  |   13 ++---
 i18npool/source/localedata/data/cv_RU.xml  |   19 +--
 i18npool/source/localedata/data/myv_RU.xml |9 -
 i18npool/source/localedata/data/ru_RU.xml  |   13 ++---
 i18npool/source/localedata/data/tt_RU.xml  |   23 +++
 5 files changed, 56 insertions(+), 21 deletions(-)

New commits:
commit d83e831747c1e7a57296c7f1d64a5d51a97cef91
Author: Eike Rathke 
AuthorDate: Mon Jun 3 16:15:18 2019 +0200
Commit: Eike Rathke 
CommitDate: Mon Jun 3 19:53:33 2019 +0200

Resolves: tdf#96711 RUB currency symbol is ₽ U+20BD RUBLE SIGN

Change-Id: Ie9781713f04076174cdbbc34bf802df45c169727
Reviewed-on: https://gerrit.libreoffice.org/73389
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/cu_RU.xml 
b/i18npool/source/localedata/data/cu_RU.xml
index 95d82c4451ff..5dcfe38feecf 100644
--- a/i18npool/source/localedata/data/cu_RU.xml
+++ b/i18npool/source/localedata/data/cu_RU.xml
@@ -52,7 +52,7 @@
 по по́лꙋд.
 metric
   
-  
+  
 D.M.
 D/M/
 
@@ -396,14 +396,21 @@
 
   
   
-
+
+  RUB
+  ₽
+  RUB
+  рꙋ́бль рѡссі́йскїй
+  2
+
+
   RUB
   рꙋб.
   RUB
   рꙋ́бль рѡссі́йскїй
   2
 
-
+
   RUR
   р.
   RUR
diff --git a/i18npool/source/localedata/data/cv_RU.xml 
b/i18npool/source/localedata/data/cv_RU.xml
index 2e7eb69d0e7f..7b09492fd816 100644
--- a/i18npool/source/localedata/data/cv_RU.xml
+++ b/i18npool/source/localedata/data/cv_RU.xml
@@ -51,7 +51,7 @@
 PM
 metric
   
-  
+  
 D.M
 
   Standard
@@ -87,22 +87,22 @@
   0,00%
 
 
-  # ##0[$тен.-635];-# ##0[$тен.-635]
+  # ##0[CURRENCY];-# ##0[CURRENCY]
 
 
-  # ##0,00[$тен.-635];-# ##0,00[$тен.-635]
+  # ##0,00[CURRENCY];-# ##0,00[CURRENCY]
 
 
-  # ##0[$тен.-635];[RED]-# ##0[$тен.-635]
+  # ##0[CURRENCY];[RED]-# ##0[CURRENCY]
 
 
-  # ##0,00[$тен.-635];[RED]-# ##0,00[$тен.-635]
+  # ##0,00[CURRENCY];[RED]-# ##0,00[CURRENCY]
 
 
   # ##0,00 CCC
 
 
-  # ##0,--[$тен.-635];[RED]-# ##0,--[$тен.-635]
+  # ##0,--[CURRENCY];[RED]-# ##0,--[CURRENCY]
 
 
   D.M.YY
@@ -326,6 +326,13 @@
   
 
   RUB
+  ₽
+  RUB
+  Раççей тенки
+  2
+
+
+  RUB
   тен.
   RUB
   Раççей тенки
diff --git a/i18npool/source/localedata/data/myv_RU.xml 
b/i18npool/source/localedata/data/myv_RU.xml
index c356e2acfdc5..3cb6899e6b0d 100644
--- a/i18npool/source/localedata/data/myv_RU.xml
+++ b/i18npool/source/localedata/data/myv_RU.xml
@@ -51,7 +51,7 @@
 ч.л.
 metric
   
-  
+  
 M/D
 
   General
@@ -336,6 +336,13 @@
   
 
   RUB
+  ₽
+  RUB
+  Цельковой
+  2
+
+
+  RUB
   цел
   RUB
   Цельковой
diff --git a/i18npool/source/localedata/data/ru_RU.xml 
b/i18npool/source/localedata/data/ru_RU.xml
index 1ebf8cd3360c..b0ddb3352689 100644
--- a/i18npool/source/localedata/data/ru_RU.xml
+++ b/i18npool/source/localedata/data/ru_RU.xml
@@ -51,7 +51,7 @@
 PM
 metric
   
-  
+  
 D.M.
 D/M/
 
@@ -387,14 +387,21 @@
 
   
   
-
+
+  RUB
+  ₽
+  RUB
+  Российский рубль
+  2
+
+
   RUB
   руб.
   RUB
   Российский рубль
   2
 
-
+
   RUR
   р.
   RUR
diff --git a/i18npool/source/localedata/data/tt_RU.xml 
b/i18npool/source/localedata/data/tt_RU.xml
index 488e11c6ad30..e3118f8f1a53 100644
--- a/i18npool/source/localedata/data/tt_RU.xml
+++ b/i18npool/source/localedata/data/tt_RU.xml
@@ -51,7 +51,7 @@
 кич
 metric
 
-
+
   D.M.
 
 Standard
@@ -87,22 +87,22 @@
 0,00%
 
 
-# ##0 [$р.-444];-# ##0 [$р.-444]
+# ##0 [CURRENCY];-# ##0 [CURRENCY]
 
 
-# ##0,00 [$р.-444];-# ##0,00 [$р.-444]
+# ##0,00 [CURRENCY];-# ##0,00 [CURRENCY]
 
 
-# ##0 [$р.-444];[RED]-# ##0 [$р.-444]
+# ##0 [CURRENCY];[RED]-# ##0 [CURRENCY]
 
 
-# ##0,00 [$р.-444];[RED]-# ##0,00 
[$р.-444]
+# ##0,00 [CURRENCY];[RED]-# ##0,00 
[CURRENCY]
 
 
 # ##0,00 CCC
 
 
-# ##0,-- [$р.-444];[RED]-# ##0,-- 
[$р.-444]
+# ##0,-- [CURRENCY];[RED]-# ##0,-- 
[CURRENCY]
 
 
 D.M.YY
@@ -325,14 +325,21 @@
 
 
 
-
+
+RUB
+₽
+RUB
+Рәсәй сумы
+2
+
+
 RUB
 руб.
 RUB
 Рәсәй сумы
 2
 
-
+
 RUR
 р.
 RUR

[Libreoffice-commits] core.git: i18npool/source

2019-05-31 Thread DaeHyun Sung (via logerrit)
 i18npool/source/localedata/data/ko_KR.xml |  117 ++
 1 file changed, 117 insertions(+)

New commits:
commit e9395f87619af7c9b755ee8ff34ecfaae7df9c98
Author: DaeHyun Sung 
AuthorDate: Sat May 25 09:53:46 2019 +0900
Commit: Eike Rathke 
CommitDate: Sat Jun 1 02:13:48 2019 +0200

add Dangi calendar locale data for tdf#125446

For Support Korean Calendar Dangi(단기/檀紀), add Dangi calendar locale
data


Change-Id: Ifd04be3dbbf3daa1d7f3b1e238e743b697701b6e
Reviewed-on: https://gerrit.libreoffice.org/72944
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/localedata/data/ko_KR.xml 
b/i18npool/source/localedata/data/ko_KR.xml
index 45e15f7110e4..9d5e397ee43b 100644
--- a/i18npool/source/localedata/data/ko_KR.xml
+++ b/i18npool/source/localedata/data/ko_KR.xml
@@ -571,6 +571,123 @@
   
   1
 
+
+  
+
+  sun
+  일
+  일요일
+
+
+  mon
+  월
+  월요일
+
+
+  tue
+  화
+  화요일
+
+
+  wed
+  수
+  수요일
+
+
+  thu
+  목
+  목요일
+
+
+  fri
+  금
+  금요일
+
+
+  sat
+  토
+  토요일
+
+  
+  
+
+  jan
+  1
+  1
+
+
+  feb
+  2
+  2
+
+
+  mar
+  3
+  3
+
+
+  apr
+  4
+  4
+
+
+  may
+  5
+  5
+
+
+  jun
+  6
+  6
+
+
+  jul
+  7
+  7
+
+
+  aug
+  8
+  8
+
+
+  sep
+  9
+  9
+
+
+  oct
+  10
+  10
+
+
+  nov
+  11
+  11
+
+
+  dec
+  12
+  12
+
+  
+  
+
+  dangi
+  단기
+  단군기원
+
+
+  before
+  단기 이전
+  단군기원 이전
+
+  
+  
+sun
+  
+  1
+
   
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-05-31 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/pl_PL.xml |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 00df03966e0030412d6ad234045fd80d2d265af2
Author: Eike Rathke 
AuthorDate: Fri May 31 18:27:52 2019 +0200
Commit: Eike Rathke 
CommitDate: Sat Jun 1 00:20:14 2019 +0200

Related: tdf#125590 prepare to derive from pl-PL

... by using replaceFrom="[CURRENCY]" in LC_FORMAT.

Change-Id: I9072e278e33de0a935a08bd9deb61109d220043d
Reviewed-on: https://gerrit.libreoffice.org/73281
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/pl_PL.xml 
b/i18npool/source/localedata/data/pl_PL.xml
index b05b213efcfa..4beab12f6ee4 100644
--- a/i18npool/source/localedata/data/pl_PL.xml
+++ b/i18npool/source/localedata/data/pl_PL.xml
@@ -51,7 +51,7 @@
 PM
 metric
   
-  
+  
 D.M
 
   Standard
@@ -87,22 +87,22 @@
   0,00%
 
 
-  # ##0 [$zł-415];-# ##0 [$zł-415]
+  # ##0 [CURRENCY];-# ##0 [CURRENCY]
 
 
-  # ##0,00 [$zł-415];-# ##0,00 [$zł-415]
+  # ##0,00 [CURRENCY];-# ##0,00 [CURRENCY]
 
 
-  # ##0 [$zł-415];[RED]-# ##0 [$zł-415]
+  # ##0 [CURRENCY];[RED]-# ##0 [CURRENCY]
 
 
-  # ##0,00 [$zł-415];[RED]-# ##0,00 [$zł-415]
+  # ##0,00 [CURRENCY];[RED]-# ##0,00 [CURRENCY]
 
 
   # ##0,00 CCC
 
 
-  # ##0,-- [$zł-415];[RED]-# ##0,-- [$zł-415]
+  # ##0,-- [CURRENCY];[RED]-# ##0,-- [CURRENCY]
 
 
   YY-M-D
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-05-18 Thread DaeHyun Sung (via logerrit)
 i18npool/source/localedata/data/ko_KR.xml |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e7ace9a5fa71bd722e7637285a22715729b620d1
Author: DaeHyun Sung 
AuthorDate: Sat May 18 00:12:39 2019 +0900
Commit: Julien Nabet 
CommitDate: Sat May 18 09:11:00 2019 +0200

modified Line Breaking rule in Korean

Modified Line Break Rule (Korean: 금칙 처리, 漢字hanja: 禁飭處理)

I modifed Forbidden Characters(Korean: 금칙 문자, 漢字hanja: 禁飭文字) on LibreOffice 
Korean locale data xml.

Reference1: HWP Guide - 금칙문자(Forbidden Characters)
http://help.hancom.com/hoffice/webhelp/9.0/ko_kr/hshow/tool/forbid.htm

Reference2: OOXML ISO/IEC 29500–1:2016(E)
Korean

* Cannot start a line: !%),.:;?]}¢°'"′″℃〉》」』】〕!%),.:;?]}¢
(Unicode character values: U+0021, U+0025, U+0029, U+002C, U+002E, U+003A, 
U+003B, U+003F, U+005D, U+007D, U+00A2, U+00B0, U+2019, U+201D, U+2032, U+2033, 
U+2103, U+3009, U+300B, U+300D, U+300F, U+3011, U+3015, U+FF01, U+FF05, U+FF09, 
U+FF0C, U+FF0E, U+FF1A, U+FF1B, U+FF1F, U+FF3D, U+FF5D and U+FFE0, respectively)

* Cannot end a line: $([\{£¥'"〈《「『【〔$([{£¥₩
(Unicode character values: U+0024, U+0028, U+005B, U+005C, U+007B, U+00A3, 
U+00A5, U+2018, U+201C, U+3008, U+300A, U+300C, U+300E, U+3010, U+3014, U+FF04, 
U+FF08, U+FF3B, U+FF5B, U+FFE1, U+FFE5, and U+FFE6, respectively)

Change-Id: I32077b241f930cc912d0c365fc46c1cd046c59a6
Reviewed-on: https://gerrit.libreoffice.org/72492
Tested-by: Jenkins
Reviewed-by: Mark Hung 

diff --git a/i18npool/source/localedata/data/ko_KR.xml 
b/i18npool/source/localedata/data/ko_KR.xml
index cf3ad3e4d812..45e15f7110e4 100644
--- a/i18npool/source/localedata/data/ko_KR.xml
+++ b/i18npool/source/localedata/data/ko_KR.xml
@@ -603,8 +603,8 @@
   
   
 
-  
!%),.:;?]}¢¢?′″℃〉>》」』】〕!%),.:;?]}。」、・
 ゙゚
-  
$(¥£[\{£¥<《「『【〔$([{₩「
+  
!%),.:;?]}¢¢′″℃〉>》」』】〕!%),.:;?]}。」、・
 ゙゚、。’”°
+  
$(¥£[\{£¥<《「『【〔$([{₩₩「‘“〈
   !,.:;?、。!,.:;?
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source svl/source

2019-04-02 Thread Takeshi Abe (via logerrit)
 i18npool/source/calendar/calendar_gregorian.cxx |2 +-
 i18npool/source/localedata/data/ja_JP.xml   |8 +++-
 svl/source/numbers/zformat.cxx  |2 +-
 3 files changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 597c5d75b8e72d429e096535334eaac7973455ef
Author: Takeshi Abe 
AuthorDate: Mon Apr 1 11:44:32 2019 +0900
Commit: Eike Rathke 
CommitDate: Tue Apr 2 22:54:49 2019 +0200

Introduce next Japanese gengou era 'Reiwa'

starting from 2019-05-01, which has been announced officially.

This fills the provisional slot acknowledged at
cacbb0faef77ae8462de9ff5c7307a6a2e28b2bb.

Change-Id: Ifb12e6afaad4c66d455f664b46ec946e80324e87
Reviewed-on: https://gerrit.libreoffice.org/70028
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/calendar/calendar_gregorian.cxx 
b/i18npool/source/calendar/calendar_gregorian.cxx
index 4e4a14dc0079..662c84b897c9 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -209,7 +209,7 @@ static const Era gengou_eraArray[] = {
 {1912,  7, 30, 0},  // Taisho
 {1926, 12, 25, 0},  // Showa
 {1989,  1,  8, 0},  // Heisei
-{2019,  5,  1, 0},  //(Naruhito) (TODO: real era name not known yet 
(2018-07-26))
+{2019,  5,  1, 0},  // Reiwa
 {0, 0, 0, 0}
 };
 Calendar_gengou::Calendar_gengou() : Calendar_gregorian(gengou_eraArray)
diff --git a/i18npool/source/localedata/data/ja_JP.xml 
b/i18npool/source/localedata/data/ja_JP.xml
index fe4c247485f9..c15c665f2eab 100644
--- a/i18npool/source/localedata/data/ja_JP.xml
+++ b/i18npool/source/localedata/data/ja_JP.xml
@@ -481,11 +481,9 @@
   平成
 
 
-  
-  Naruhito
-  Na
-  Naruhito
+  Reiwa
+  令
+  令和
 
   
   
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index db066e136c06..daa9791dba3c 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -3476,7 +3476,7 @@ void SvNumberformat::ImpAppendEraG( OUStringBuffer& 
OutString,
 cEra = 'H';
 break;
 case 5:
-cEra = 'N'; /* TODO: the real one letter era name is not known 
yet (2018-07-26) */
+cEra = 'R';
 break;
 default:
 cEra = '?';
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-03-25 Thread Eike Rathke (via logerrit)
 i18npool/source/localedata/data/kmr_Latn_TR.xml |   13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 4ca9db953d59d93ce8e3a54a36d23ed52b9c62a9
Author: Eike Rathke 
AuthorDate: Mon Mar 25 22:33:03 2019 +0100
Commit: Eike Rathke 
CommitDate: Tue Mar 26 02:05:33 2019 +0100

Assign [kmr-Latn-TR] TRY|₺ currency, TRY|YTL and TRL|TL are legacyOnly

This was done long ago for the tr-TR locale as well.

Change-Id: I5bf8595f6d49adb7fd76b3c4924c4d72b3b8ea5e
Reviewed-on: https://gerrit.libreoffice.org/69717
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/kmr_Latn_TR.xml 
b/i18npool/source/localedata/data/kmr_Latn_TR.xml
index 2762df9e630f..a566c67170b9 100644
--- a/i18npool/source/localedata/data/kmr_Latn_TR.xml
+++ b/i18npool/source/localedata/data/kmr_Latn_TR.xml
@@ -52,7 +52,7 @@
 PN
 US
   
-  
+  
 M/D
 
   General
@@ -335,14 +335,21 @@
 
   
   
-
+
+  TRY
+  ₺
+  TRY
+  Türk Lirası
+  2
+
+
   TRY
   YTL
   TRY
   Yeni Türk Lirası
   2
 
-
+
   TRL
   TL
   TRL
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-03-21 Thread Libreoffice Gerrit user
 i18npool/source/collator/data/hu_charset.txt |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 7618490d334409c3fc4167f32732537ef738647f
Author: László Németh 
AuthorDate: Tue Feb 19 13:42:58 2019 +0100
Commit: László Németh 
CommitDate: Thu Mar 21 09:44:48 2019 +0100

tdf#123204 hu_HU collation: don't ignore special characters

to show/handle them in Calc AutoFilter.

Partial revert of "tdf#11 fix Hungarian sorting"
(commit 7b1eb6313c0d2621c364df1724c69d28f8267841).

Change-Id: Ib135f1eac77780e901fb4c427c3f1bb8a5e090b9
Reviewed-on: https://gerrit.libreoffice.org/68014
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/i18npool/source/collator/data/hu_charset.txt 
b/i18npool/source/collator/data/hu_charset.txt
index 2b6677e0dc1b..f38ecfd5c7b6 100644
--- a/i18npool/source/collator/data/hu_charset.txt
+++ b/i18npool/source/collator/data/hu_charset.txt
@@ -22,7 +22,11 @@
 
 [caseLevel on]
 [caseFirst lower]
-[alternate shifted]
+
+# Because of the different requirements of Writer and Calc,
+# don't ignore the special characters, yet.
+# See tdf#123204 "EDITING Not all special characters appear in the AutoFilter 
window"
+# [alternate shifted]
 
 & c < cs <<< Cs <<< CS
 & d < dz <<< DZ < dzs <<< Dzs <<< DZS
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-02-20 Thread Libreoffice Gerrit user
 i18npool/source/characterclassification/cclass_unicode_parser.cxx |8 
++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit a10df00bd4a2ae293b077701d32c720a63080ebf
Author: Eike Rathke 
AuthorDate: Tue Feb 19 22:37:55 2019 +0100
Commit: Eike Rathke 
CommitDate: Wed Feb 20 16:24:26 2019 +0100

Resolves: tdf#123575 treat Katakana middle dots as midletter

Treat
U+30FB KATAKANA MIDDLE DOT
U+FF65 HALFWIDTH KATAKANA MIDDLE DOT
like
U+00B7 MIDDLE DOT
and other U_WB_MIDLETTER.

Change-Id: Iea18e7582f29edf5d8c5bad047f97ed4088edf7c
Reviewed-on: https://gerrit.libreoffice.org/68032
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx 
b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index 29d69521954e..d3f18e7bbe27 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -654,8 +654,12 @@ ParserFlags cclass_Unicode::getFlagsExtended(sal_uInt32 
const c)
 case U_OTHER_PUNCTUATION:
 // fdo#61754 Lets see (if we not at the start) if this is midletter
 // punctuation and allow it in a word if it is similarly to
-// U_NON_SPACING_MARK
-if (bStart || U_WB_MIDLETTER != u_getIntPropertyValue(c, 
UCHAR_WORD_BREAK))
+// U_NON_SPACING_MARK, for example U+00B7 MIDDLE DOT.
+// tdf#123575 for U+30FB KATAKANA MIDDLE DOT property is not
+// U_WB_MIDLETTER but U_WB_KATAKANA instead, explicitly test that
+// and U+FF65 HALFWIDTH KATAKANA MIDDLE DOT.
+if (bStart || (U_WB_MIDLETTER != u_getIntPropertyValue(c, 
UCHAR_WORD_BREAK)
+&& c != 0x30FB && c != 0xFF65))
 return ParserFlags::ILLEGAL;
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: i18npool/source

2019-01-22 Thread Libreoffice Gerrit user
 i18npool/source/localedata/LocaleNode.hxx |5 +++--
 i18npool/source/localedata/filewriter.cxx |   21 +
 i18npool/source/localedata/saxparser.cxx  |   15 +++
 3 files changed, 19 insertions(+), 22 deletions(-)

New commits:
commit 628078fea5be293038ee2cca494ef77227077c35
Author: Stephan Bergmann 
AuthorDate: Tue Jan 22 16:55:44 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Jan 22 19:51:47 2019 +0100

Use std::string instead of fixed-size array to hold string

Change-Id: I8477271f4de4d24cf1019c381ab3b56db2016be9
Reviewed-on: https://gerrit.libreoffice.org/66749
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/i18npool/source/localedata/LocaleNode.hxx 
b/i18npool/source/localedata/LocaleNode.hxx
index 7b19cbc82a73..e1b283c72108 100644
--- a/i18npool/source/localedata/LocaleNode.hxx
+++ b/i18npool/source/localedata/LocaleNode.hxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -62,9 +63,9 @@ public:
 void  writeParameter(const sal_Char* pTagStr, const sal_Char* pAsciiStr, 
const OUString& aChars, sal_Int16 count0, sal_Int16 count1) const;
 void  closeOutput() const;
 /// Return the locale string, something like en_US or de_DE
-const char * getLocale() const { return theLocale; }
+const char * getLocale() const { return theLocale.c_str(); }
 private:
-char theLocale[50];
+std::string theLocale;
 FILE *m_f;
 };
 
diff --git a/i18npool/source/localedata/filewriter.cxx 
b/i18npool/source/localedata/filewriter.cxx
index 2026e55b5f72..02540996e3ea 100644
--- a/i18npool/source/localedata/filewriter.cxx
+++ b/i18npool/source/localedata/filewriter.cxx
@@ -18,18 +18,15 @@
  */
 
 #include 
-#include 
 #include "LocaleNode.hxx"
 
 // The document handler, which is needed for the saxparser
 // The Documenthandler for reading sax
 
-OFileWriter::OFileWriter(const char *pcFile, const char *locale ) {
+OFileWriter::OFileWriter(const char *pcFile, const char *locale ): 
theLocale(locale) {
 
 printf("file generated=%s\n", pcFile);
 m_f = fopen(pcFile, "w");
-strncpy( theLocale, locale, sizeof(theLocale) );
-theLocale[sizeof(theLocale)-1] = 0;
 }
 
 OFileWriter::~OFileWriter() {
@@ -55,7 +52,7 @@ void OFileWriter::writeStringCharacters(const OUString& str) 
const
 
 void OFileWriter::writeFunction(const char *func, const char *count, const 
char *array) const
 {
-fprintf(m_f, "sal_Unicode **  SAL_CALL %s%s(sal_Int16& count)\n{\n", func, 
theLocale);
+fprintf(m_f, "sal_Unicode **  SAL_CALL %s%s(sal_Int16& count)\n{\n", func, 
theLocale.c_str());
 fprintf(m_f, "\tcount = %s;\n", count);
 fprintf(m_f, "\treturn (sal_Unicode**)%s;\n}\n", array);
 }
@@ -65,13 +62,13 @@ void OFileWriter::writeRefFunction(const char *func, const 
OUString& useLocale)
 OString aRefLocale( OUStringToOString(useLocale, 
RTL_TEXTENCODING_ASCII_US) );
 const char* locale = aRefLocale.getStr();
 fprintf(m_f, "extern sal_Unicode **  SAL_CALL %s%s(sal_Int16& count);\n", 
func, locale);
-fprintf(m_f, "sal_Unicode **  SAL_CALL %s%s(sal_Int16& count)\n{\n", func, 
theLocale);
+fprintf(m_f, "sal_Unicode **  SAL_CALL %s%s(sal_Int16& count)\n{\n", func, 
theLocale.c_str());
 fprintf(m_f, "\treturn %s%s(count);\n}\n", func, locale);
 }
 
 void OFileWriter::writeFunction(const char *func, const char *count, const 
char *array, const char *from, const char *to) const
 {
-fprintf(m_f, "sal_Unicode const * const * SAL_CALL %s%s(sal_Int16& count, 
const sal_Unicode*& from, const sal_Unicode*& to)\n{\n", func, theLocale);
+fprintf(m_f, "sal_Unicode const * const * SAL_CALL %s%s(sal_Int16& count, 
const sal_Unicode*& from, const sal_Unicode*& to)\n{\n", func, 
theLocale.c_str());
 fprintf(m_f, "\tcount = %s;\n", count);
 fprintf(m_f, "\tfrom = %s;\n", from);
 fprintf(m_f, "\tto = %s;\n", to);
@@ -83,7 +80,7 @@ void OFileWriter::writeRefFunction(const char *func, const 
OUString& useLocale,
 OString aRefLocale( OUStringToOString(useLocale, 
RTL_TEXTENCODING_ASCII_US) );
 const char* locale = aRefLocale.getStr();
 fprintf(m_f, "extern sal_Unicode const * const * SAL_CALL %s%s(sal_Int16& 
count, const sal_Unicode*& from, const sal_Unicode*& to);\n", func, locale);
-fprintf(m_f, "sal_Unicode const * const * SAL_CALL %s%s(sal_Int16& count, 
const sal_Unicode*& from, const sal_Unicode*& to)\n{\n", func, theLocale);
+fprintf(m_f, "sal_Unicode const * const * SAL_CALL %s%s(sal_Int16& count, 
const sal_Unicode*& from, const sal_Unicode*& to)\n{\n", func, 
theLocale.c_str());
 fprintf(m_f, "\tto = %s;\n", to);
 fprintf(m_f, "\tconst sal_Unicode* tmp;\n");
 fprintf(m_f, "\treturn %s%s(count, from, tmp);\n}\n", func, locale);
@@ -91,7 +88,7 @@ void OFileWriter::writeRefFunction(const char *func, const 
OUString& useLocale,
 
 void OFileWriter::writeFunction2(const char *func, const char *style, const 
char* attr, const char 

[Libreoffice-commits] core.git: i18npool/source idlc/source idl/source include/sfx2 include/svx lingucomponent/source linguistic/source lotuswordpro/source oox/source package/inc package/qa package/so

2019-01-21 Thread Libreoffice Gerrit user
 i18npool/source/breakiterator/breakiterator_cjk.cxx  |8 +++-
 i18npool/source/collator/gencoll_rule.cxx|4 ++--
 idl/source/cmptools/hash.cxx |3 +--
 idlc/source/astexpression.cxx|3 +--
 include/sfx2/childwin.hxx|8 
 include/svx/ClassificationField.hxx  |2 +-
 lingucomponent/source/spellcheck/spell/sspellimp.cxx |3 +--
 linguistic/source/lngsvcmgr.cxx  |9 -
 lotuswordpro/source/filter/lwptblformula.cxx |9 -
 oox/source/crypto/CryptTools.cxx |4 +---
 oox/source/drawingml/effectproperties.cxx|3 +--
 oox/source/drawingml/effectpropertiescontext.cxx |4 +---
 package/inc/pch/precompiled_package2.hxx |1 -
 package/qa/cppunit/test_package.cxx  |3 +--
 package/source/zipapi/ZipFile.cxx|3 +--
 package/source/zippackage/ZipPackage.cxx |5 ++---
 package/source/zippackage/ZipPackageFolder.cxx   |6 ++
 package/source/zippackage/ZipPackageStream.cxx   |3 +--
 package/source/zippackage/zipfileaccess.cxx  |3 +--
 reportdesign/source/core/sdr/ReportUndoFactory.cxx   |5 ++---
 reportdesign/source/core/sdr/UndoEnv.cxx |5 ++---
 reportdesign/source/ui/report/ReportController.cxx   |   13 ++---
 reportdesign/source/ui/report/SectionView.cxx|3 +--
 23 files changed, 43 insertions(+), 67 deletions(-)

New commits:
commit 0c64df243259f574daaa4bc03bc4ddcc791c9073
Author: Gabor Kelemen 
AuthorDate: Mon Jan 21 21:26:50 2019 +0100
Commit: Noel Grandin 
CommitDate: Tue Jan 22 08:38:28 2019 +0100

o3tl::make_unique -> std::make_unique in i18npool...reportdesign

Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one

Change-Id: I8bee1344f7df82536f31bc5e4ec4fd379cac1d04
Reviewed-on: https://gerrit.libreoffice.org/66704
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx 
b/i18npool/source/breakiterator/breakiterator_cjk.cxx
index 356782b119f0..921ab47c220e 100644
--- a/i18npool/source/breakiterator/breakiterator_cjk.cxx
+++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx
@@ -21,8 +21,6 @@
 #include 
 #include 
 
-#include 
-
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::i18n;
 using namespace ::com::sun::star::lang;
@@ -141,7 +139,7 @@ LineBreakResults SAL_CALL BreakIterator_CJK::getLineBreak(
 //  ;
 BreakIterator_zh::BreakIterator_zh()
 {
-m_xDict = o3tl::make_unique("zh");
+m_xDict = std::make_unique("zh");
 hangingCharacters = 
LocaleDataImpl::get()->getHangingCharacters(LOCALE("zh", "CN"));
 cBreakIterator = "com.sun.star.i18n.BreakIterator_zh";
 }
@@ -151,7 +149,7 @@ BreakIterator_zh::BreakIterator_zh()
 //  ;
 BreakIterator_zh_TW::BreakIterator_zh_TW()
 {
-m_xDict = o3tl::make_unique("zh");
+m_xDict = std::make_unique("zh");
 hangingCharacters = 
LocaleDataImpl::get()->getHangingCharacters(LOCALE("zh", "TW"));
 cBreakIterator = "com.sun.star.i18n.BreakIterator_zh_TW";
 }
@@ -161,7 +159,7 @@ BreakIterator_zh_TW::BreakIterator_zh_TW()
 //  ;
 BreakIterator_ja::BreakIterator_ja()
 {
-m_xDict = o3tl::make_unique("ja");
+m_xDict = std::make_unique("ja");
 m_xDict->setJapaneseWordBreak();
 hangingCharacters = 
LocaleDataImpl::get()->getHangingCharacters(LOCALE("ja", "JP"));
 cBreakIterator = "com.sun.star.i18n.BreakIterator_ja";
diff --git a/i18npool/source/collator/gencoll_rule.cxx 
b/i18npool/source/collator/gencoll_rule.cxx
index 88b8b50ea423..31480f3dc574 100644
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ b/i18npool/source/collator/gencoll_rule.cxx
@@ -19,6 +19,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -27,7 +28,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
@@ -113,7 +113,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 //UCollator *coll = ucol_openRules(Obuf.getStr(), Obuf.getLength(), 
UCOL_OFF,
 //UCOL_DEFAULT_STRENGTH, , );
 
-auto coll = 
o3tl::make_unique(reinterpret_cast(Obuf.getStr()), status);
+auto coll = 
std::make_unique(reinterpret_cast(Obuf.getStr()), status);
 
 if (U_SUCCESS(status)) {
 std::vector data;
diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx
index 22899d6e5c64..ef11b489e5ae 100644
--- a/idl/source/cmptools/hash.cxx
+++ b/idl/source/cmptools/hash.cxx
@@ -25,7 +25,6 @@
 #include 
 
 #include 
-#include 
 
 SvStringHashEntry * SvStringHashTable::Insert( const OString& rElement, 
sal_uInt32 * pInsertPos )
 {
@@ 

[Libreoffice-commits] core.git: i18npool/source i18nutil/source include/i18nutil

2018-12-19 Thread Libreoffice Gerrit user
 i18npool/source/transliteration/halfwidthToFullwidth.cxx |2 +-
 i18nutil/source/utility/widthfolding.cxx |2 +-
 include/i18nutil/widthfolding.hxx|2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6c9effd0e5a76ce18a211c5f8b41e00187e67ed4
Author: Andrea Gelmini 
AuthorDate: Wed Dec 19 15:14:57 2018 +
Commit: Julien Nabet 
CommitDate: Thu Dec 20 08:49:50 2018 +0100

Fix typo in code

It passed "make check" on Linux

Change-Id: I577f6ff01e8216ed85556ce4b3365fd924f75608
Reviewed-on: https://gerrit.libreoffice.org/65468
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/i18npool/source/transliteration/halfwidthToFullwidth.cxx 
b/i18npool/source/transliteration/halfwidthToFullwidth.cxx
index 4857f2896ecf..e9d6ebd89c61 100644
--- a/i18npool/source/transliteration/halfwidthToFullwidth.cxx
+++ b/i18npool/source/transliteration/halfwidthToFullwidth.cxx
@@ -78,7 +78,7 @@ halfwidthToFullwidthLikeJIS::transliterateImpl( const 
OUString& inStr, sal_Int32
 const OUString& newStr = transliteration_OneToOne::transliterateImpl( 
inStr, startPos, nCount, offset, false);
 
 // Composition: KA + voice-mark --> GA
-return i18nutil::widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, 
newStr.getLength(), offset, useOffset, WIDTHFOLDNIG_DONT_USE_COMBINED_VU );
+return i18nutil::widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, 
newStr.getLength(), offset, useOffset, WIDTHFOLDING_DONT_USE_COMBINED_VU );
 }
 
 
diff --git a/i18nutil/source/utility/widthfolding.cxx 
b/i18nutil/source/utility/widthfolding.cxx
index 62c4aa14b1e5..5b6b33b1426e 100644
--- a/i18nutil/source/utility/widthfolding.cxx
+++ b/i18nutil/source/utility/widthfolding.cxx
@@ -161,7 +161,7 @@ OUString widthfolding::compose_ja_voiced_sound_marks (const 
OUString& inStr, sal
 bCompose = true;
 
   // not to use combined KATAKANA LETTER VU
-  if ( previousChar == 0x30a6 && (nFlags & 
WIDTHFOLDNIG_DONT_USE_COMBINED_VU) )
+  if ( previousChar == 0x30a6 && (nFlags & 
WIDTHFOLDING_DONT_USE_COMBINED_VU) )
 bCompose = false;
 
   if( bCompose ){
diff --git a/include/i18nutil/widthfolding.hxx 
b/include/i18nutil/widthfolding.hxx
index 310bf954a304..90048110ce1f 100644
--- a/include/i18nutil/widthfolding.hxx
+++ b/include/i18nutil/widthfolding.hxx
@@ -28,7 +28,7 @@ namespace i18nutil { class oneToOneMapping; }
 
 namespace i18nutil {
 
-#define WIDTHFOLDNIG_DONT_USE_COMBINED_VU 0x01
+#define WIDTHFOLDING_DONT_USE_COMBINED_VU 0x01
 
 class I18NUTIL_DLLPUBLIC widthfolding
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2018-12-12 Thread Libreoffice Gerrit user
 i18npool/source/breakiterator/breakiterator_unicode.cxx |   25 +++-
 i18npool/source/localedata/localedata.cxx   |9 +++--
 2 files changed, 16 insertions(+), 18 deletions(-)

New commits:
commit c5424e19338a3edaec3f0459c8ac5d53ca92d9fe
Author: Noel Grandin 
AuthorDate: Wed Dec 12 13:35:14 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Dec 13 07:24:48 2018 +0100

loplugin:useuniqueptr in i18npool

Change-Id: I57c6ce2a8c48bc87404e596b8843efd67ea0872d
Reviewed-on: https://gerrit.libreoffice.org/65033
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx 
b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index 63178f3a05da..1a6818bdae30 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -145,7 +145,7 @@ void BreakIterator_Unicode::loadICUBreakIterator(const 
css::lang::Locale& rLocal
 udata_setAppData("OpenOffice", OpenOffice_dat, );
 if ( !U_SUCCESS(status) ) throw uno::RuntimeException();
 
-OOoRuleBasedBreakIterator *rbi = nullptr;
+std::unique_ptr rbi;
 
 if (breakRules.getLength() > breakType && 
!breakRules[breakType].isEmpty())
 {
@@ -161,19 +161,18 @@ void BreakIterator_Unicode::loadICUBreakIterator(const 
css::lang::Locale& rLocal
 break;  // do
 }
 
-rbi = new OOoRuleBasedBreakIterator(udata_open("OpenOffice", 
"brk",
-OUStringToOString(breakRules[breakType], 
RTL_TEXTENCODING_ASCII_US).getStr(), ), status);
+rbi.reset(new 
OOoRuleBasedBreakIterator(udata_open("OpenOffice", "brk",
+OUStringToOString(breakRules[breakType], 
RTL_TEXTENCODING_ASCII_US).getStr(), ), status));
 
 if (U_SUCCESS(status))
 {
 icuBI->mpValue.reset( new BI_ValueData);
-icuBI->mpValue->mpBreakIterator.reset( rbi);
+icuBI->mpValue->mpBreakIterator = std::move( rbi);
 theBIMap.insert( std::make_pair( aBIMapRuleTypeKey, 
icuBI->mpValue));
 }
 else
 {
-delete rbi;
-rbi = nullptr;
+rbi.reset();
 }
 }
 //use icu's breakiterator for Thai, Tibetan and Dzongkha
@@ -199,17 +198,16 @@ void BreakIterator_Unicode::loadICUBreakIterator(const 
css::lang::Locale& rLocal
 aUDName.append( aLanguage);
 UDataMemory* pUData = udata_open("OpenOffice", "brk", 
aUDName.getStr(), );
 if( U_SUCCESS(status) )
-rbi = new OOoRuleBasedBreakIterator( pUData, status);
+rbi.reset(new OOoRuleBasedBreakIterator( pUData, status));
 if ( U_SUCCESS(status) )
 {
 icuBI->mpValue.reset( new BI_ValueData);
-icuBI->mpValue->mpBreakIterator.reset( rbi);
+icuBI->mpValue->mpBreakIterator = std::move( rbi);
 theBIMap.insert( std::make_pair( aBIMapRuleKey, 
icuBI->mpValue));
 }
 else
 {
-delete rbi;
-rbi = nullptr;
+rbi.reset();
 
 // ;rule (only)
 const OString aBIMapRuleOnlyKey( OString(";") + rule);
@@ -226,17 +224,16 @@ void BreakIterator_Unicode::loadICUBreakIterator(const 
css::lang::Locale& rLocal
 status = U_ZERO_ERROR;
 pUData = udata_open("OpenOffice", "brk", rule, );
 if( U_SUCCESS(status) )
-rbi = new OOoRuleBasedBreakIterator( pUData, status);
+rbi.reset(new OOoRuleBasedBreakIterator( pUData, 
status));
 if ( U_SUCCESS(status) )
 {
 icuBI->mpValue.reset( new BI_ValueData);
-icuBI->mpValue->mpBreakIterator.reset( rbi);
+icuBI->mpValue->mpBreakIterator = std::move( rbi);
 theBIMap.insert( std::make_pair( aBIMapRuleOnlyKey, 
icuBI->mpValue));
 }
 else
 {
-delete rbi;
-rbi = nullptr;
+rbi.reset();
 }
 }
 }
diff --git a/i18npool/source/localedata/localedata.cxx 
b/i18npool/source/localedata/localedata.cxx
index 374244eefbe6..118781d7a6b4 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -561,16 +561,17 @@ oslGenericFunction 
lcl_LookupTableHelper::getFunctionSymbolByName(
 

[Libreoffice-commits] core.git: i18npool/source

2018-12-04 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/bg_BG.xml  |2 +-
 i18npool/source/localedata/data/bs_BA.xml  |2 +-
 i18npool/source/localedata/data/ee_GH.xml  |4 ++--
 i18npool/source/localedata/data/eu_ES.xml  |4 ++--
 i18npool/source/localedata/data/ha_Latn_GH.xml |4 ++--
 i18npool/source/localedata/data/ia.xml |4 ++--
 i18npool/source/localedata/data/km_KH.xml  |4 ++--
 i18npool/source/localedata/data/ln_CD.xml  |4 ++--
 i18npool/source/localedata/data/lo_LA.xml  |2 +-
 i18npool/source/localedata/data/no_NO.xml  |4 ++--
 i18npool/source/localedata/data/ny_MW.xml  |4 ++--
 i18npool/source/localedata/data/vi_VN.xml  |8 
 i18npool/source/localedata/data/wa_BE.xml  |4 ++--
 13 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit a40c56aae9fa3ccac4abb83f7d7ddb80f5d8b6a8
Author: Eike Rathke 
AuthorDate: Tue Dec 4 17:13:25 2018 +0100
Commit: Eike Rathke 
CommitDate: Tue Dec 4 22:20:48 2018 +0100

 already includes LongDateDayOfWeekSeparator, do not duplicate

Seems these were always wrong in some locales.

Change-Id: I5dfc89a607d57c19034d6fac07a07bf3c5395ed8
Reviewed-on: https://gerrit.libreoffice.org/64541
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/bg_BG.xml 
b/i18npool/source/localedata/data/bg_BG.xml
index 926876f85ed9..fa6b8afc8261 100644
--- a/i18npool/source/localedata/data/bg_BG.xml
+++ b/i18npool/source/localedata/data/bg_BG.xml
@@ -112,7 +112,7 @@
   D.M.YY
 
 
-   D  " г."
+  D  " г."
 
 
   D.MM.YY
diff --git a/i18npool/source/localedata/data/bs_BA.xml 
b/i18npool/source/localedata/data/bs_BA.xml
index 8ebc0c6404bc..8084ebf55353 100644
--- a/i18npool/source/localedata/data/bs_BA.xml
+++ b/i18npool/source/localedata/data/bs_BA.xml
@@ -57,7 +57,7 @@
   D.M.
 
 
-   DD.  
+  DD.  
 
 
   D.M.
diff --git a/i18npool/source/localedata/data/ee_GH.xml 
b/i18npool/source/localedata/data/ee_GH.xml
index c6dc3abb5a93..3c0d8df74402 100644
--- a/i18npool/source/localedata/data/ee_GH.xml
+++ b/i18npool/source/localedata/data/ee_GH.xml
@@ -108,7 +108,7 @@
   M/D/YY
 
 
-  ,  DD, 
+   DD, 
 
 
   MM/DD/YY
@@ -141,7 +141,7 @@
   NN,  D, 
 
 
-  ,  D, 
+   D, 
 
 
   MM/DD
diff --git a/i18npool/source/localedata/data/eu_ES.xml 
b/i18npool/source/localedata/data/eu_ES.xml
index cc7c6d515d21..d445a352be64 100644
--- a/i18npool/source/localedata/data/eu_ES.xml
+++ b/i18npool/source/localedata/data/eu_ES.xml
@@ -108,7 +108,7 @@
   /MM/DD
 
 
-   ".eko" "k" D
+  ".eko" "k" D
 
 
   YY/MM/DD
@@ -141,7 +141,7 @@
   NN, "k" D, 
 
 
-   ".eko" "k" D
+  ".eko" "k" D
 
 
   MM-DD
diff --git a/i18npool/source/localedata/data/ha_Latn_GH.xml 
b/i18npool/source/localedata/data/ha_Latn_GH.xml
index 11559d9d913f..be2dff3095ac 100644
--- a/i18npool/source/localedata/data/ha_Latn_GH.xml
+++ b/i18npool/source/localedata/data/ha_Latn_GH.xml
@@ -109,7 +109,7 @@
   M/D/YY
 
 
-  ,  DD, 
+   DD, 
 
 
   MM/DD/YY
@@ -142,7 +142,7 @@
   NN,  D, 
 
 
-  ,  D, 
+   D, 
 
 
   MM/DD
diff --git a/i18npool/source/localedata/data/ia.xml 
b/i18npool/source/localedata/data/ia.xml
index b1e73204c395..fdd9d682cd6a 100644
--- a/i18npool/source/localedata/data/ia.xml
+++ b/i18npool/source/localedata/data/ia.xml
@@ -78,7 +78,7 @@
   DD/MM/YY
 
 
-   D  
+  D  
 
 
   D MMM YY
@@ -96,7 +96,7 @@
   NN "le" D "de"  
 
 
-   "le" D "de"  
+  "le" D "de"  
 
 
   D. MMM. 
diff --git a/i18npool/source/localedata/data/km_KH.xml 
b/i18npool/source/localedata/data/km_KH.xml
index 61195ea91c7a..d532fc3ba34d 100644
--- a/i18npool/source/localedata/data/km_KH.xml
+++ b/i18npool/source/localedata/data/km_KH.xml
@@ -132,7 +132,7 @@
   D/M/YY
 
 
-  [NatNum1] "ទី" DD "ខែ"  "ឆ្នាំ" 
+  [NatNum1]"ទី" DD "ខែ"  "ឆ្នាំ" 
 
 
   DD/MM/YY
@@ -165,7 +165,7 @@
   [NatNum1]NN "ថ្ងៃទី" D "ខែ"  "ឆ្នាំ" 
 
 
-  [NatNum1] "ទី" D "ខែ" MMM "ឆ្នាំ" 
+  [NatNum1]"ទី" D "ខែ" MMM "ឆ្នាំ" 
 
 
   DD-MM
diff --git a/i18npool/source/localedata/data/ln_CD.xml 
b/i18npool/source/localedata/data/ln_CD.xml
index f506417f8eee..70480cbae6ad 100644
--- a/i18npool/source/localedata/data/ln_CD.xml
+++ b/i18npool/source/localedata/data/ln_CD.xml
@@ -108,7 +108,7 @@
   D-MM-YY
 
 
- 

[Libreoffice-commits] core.git: i18npool/source

2018-12-04 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/af_NA.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7f64ec49425d967512b8f8ca95e6328795133fd8
Author: Eike Rathke 
AuthorDate: Tue Dec 4 17:39:25 2018 +0100
Commit: Eike Rathke 
CommitDate: Tue Dec 4 17:44:02 2018 +0100

Fix af_NA wrong separator inheritance, use en_NA instead of af_ZA (en_ZA)

It didn't matter originally, but en_ZA separators changed with

commit 5c10c448b299faf43d9df28bdb9dc4fbb00540aa
CommitDate: Mon Sep 3 13:38:13 2018 +0200

tdf#119613 [*-ZA] decimal separator is comma, group separator is 
space

and

commit 464154aa26ae77883dd59fcbaab9e084aa035c9d
CommitDate: Mon Sep 3 13:38:23 2018 +0200

Related: tdf#119613 inherit af_ZA separators from identical en_ZA

so the separators didn't match the formats inherited from en_NA
anymore.

Change-Id: Iccf951b27b5575706e0f6bae12b5df4b53e335ac

diff --git a/i18npool/source/localedata/data/af_NA.xml 
b/i18npool/source/localedata/data/af_NA.xml
index a69478328ead..c8462fa481ea 100644
--- a/i18npool/source/localedata/data/af_NA.xml
+++ b/i18npool/source/localedata/data/af_NA.xml
@@ -28,7 +28,7 @@
   Namibia
 
   
-  
+  
   
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2018-12-04 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/ha_Latn_NG.xml |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 35dd9167ef2ee78d8611b02c48b7630e5eeca27c
Author: Eike Rathke 
AuthorDate: Tue Dec 4 16:48:49 2018 +0100
Commit: Eike Rathke 
CommitDate: Tue Dec 4 16:53:37 2018 +0100

Some date format corrections, tdf#116868 follow-up

Order is 'D, MMM '  instead of 'MMM, D '
', ' displays separator twice.

Change-Id: Id84af3e1bb94dad0e8405c680e63f48f38415fba

diff --git a/i18npool/source/localedata/data/ha_Latn_NG.xml 
b/i18npool/source/localedata/data/ha_Latn_NG.xml
index d3c6c9b4f39b..cfb635b756d7 100644
--- a/i18npool/source/localedata/data/ha_Latn_NG.xml
+++ b/i18npool/source/localedata/data/ha_Latn_NG.xml
@@ -38,8 +38,8 @@
   .
   ;
   , 
-  , 
-   
+   
+  , 
    
 
 
@@ -109,7 +109,7 @@
   D/M/YY
 
 
-  ,  DD, 
+  DD , 
 
 
   DD/MM/YY
@@ -124,13 +124,13 @@
   D MMM, 
 
 
-  D, MMM 
+  D MMM, 
 
 
-   D, 
+  , D 
 
 
-  D,  
+  , D 
 
 
   NN, DD/MMM/YY
@@ -142,7 +142,7 @@
   NN, D , 
 
 
-  , D , 
+  D , 
 
 
   DD/MM
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sal/rtl

2018-11-30 Thread Libreoffice Gerrit user
 i18npool/source/characterclassification/cclass_unicode_parser.cxx |   14 
--
 sal/rtl/math.cxx  |   14 
--
 2 files changed, 24 insertions(+), 4 deletions(-)

New commits:
commit a4146c38a07ff51b37d40c2e953f54b0a746a8b7
Author: Eike Rathke 
AuthorDate: Fri Nov 30 20:06:24 2018 +0100
Commit: Eike Rathke 
CommitDate: Sat Dec 1 01:10:25 2018 +0100

A leading or trailing group separator character is not a group separator

Also a group separator character followed by a non-digit is not.

Change-Id: Id57e43fe7692706c5532fb05ad394224265c2750
Reviewed-on: https://gerrit.libreoffice.org/64358
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx 
b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index 3c040a5a0085..7af1dd8baf45 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -822,8 +822,18 @@ void cclass_Unicode::parseText( ParseResult& r, const 
OUString& rText, sal_Int32
 if ( nMask & ParserFlags::VALUE )
 {
 if (current == cGroupSep)
-nParseTokensType |= 
KParseTokens::GROUP_SEPARATOR_IN_NUMBER;
-if ((current == cDecimalSep || (bDecSepAltUsed = 
(cDecimalSepAlt && current == cDecimalSepAlt))) &&
+{
+if (getFlags(nextChar) & ParserFlags::VALUE_DIGIT)
+nParseTokensType |= 
KParseTokens::GROUP_SEPARATOR_IN_NUMBER;
+else
+{
+// Trailing group separator character is not a
+// group separator.
+eState = ssStopBack;
+}
+}
+else if ((current == cDecimalSep ||
+(bDecSepAltUsed = (cDecimalSepAlt && current 
== cDecimalSepAlt))) &&
 ++nDecSeps > 1)
 {
 if (nCodePoints == 2)
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index 14b0577532ab..46b7ef88f3d0 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -811,8 +811,12 @@ double stringToDouble(CharT const * pBegin, CharT const * 
pEnd,
 
 if (!bDone) // do not recognize e.g. NaN1.23
 {
-// leading zeros and group separators may be safely ignored
-while (p != pEnd && (*p == CharT('0') || *p == cGroupSeparator))
+// Leading zeros and group separators between digits may be safely
+// ignored. p0 < p implies that there was a leading 0 already,
+// consecutive group separators may not happen as *(p+1) is checked for
+// digit.
+while (p != pEnd && (*p == CharT('0') || (*p == cGroupSeparator
+&& p0 < p && p+1 < pEnd && rtl::isAsciiDigit(*(p+1)
 {
 ++p;
 }
@@ -833,6 +837,12 @@ double stringToDouble(CharT const * pBegin, CharT const * 
pEnd,
 {
 break;
 }
+else if (p == p0 || (p+1 == pEnd) || !rtl::isAsciiDigit(*(p+1)))
+{
+// A leading or trailing (not followed by a digit) group
+// separator character is not a group separator.
+break;
+}
 }
 
 // fraction part of mantissa
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source offapi/com sw/qa

2018-11-30 Thread Libreoffice Gerrit user
 i18npool/source/characterclassification/cclass_unicode_parser.cxx |   13 +
 offapi/com/sun/star/i18n/KParseTokens.idl |   22 
++
 sw/qa/extras/rtfexport/rtfexport.cxx  |2 
 3 files changed, 34 insertions(+), 3 deletions(-)

New commits:
commit 776f7e7463de3e97f3056712ee567f49a314829d
Author: Eike Rathke 
AuthorDate: Fri Nov 30 14:20:49 2018 +0100
Commit: Eike Rathke 
CommitDate: Fri Nov 30 20:01:20 2018 +0100

[API CHANGE] Resolves: tdf#42518 new KParseTokens::GROUP_SEPARATOR_IN_NUMBER

Default unset bit now does not accept/skip group separators in
numbers.

See .idl description comment for why this is incompatible and how.

This actually uncovered a "bug" (or at least unexpected) in the
Math parser that parsed "0," as one entity instead of "0" followed
by ",". As obtaining the text form appends a blank after each
entity the sw/qa/extras/rtfexport/rtfexport.cxx testMathEqarray()
testcase had to be adapted.

Change-Id: I2b605742ab3d8a9bb81ad6880faf050535dc80fa
Reviewed-on: https://gerrit.libreoffice.org/64270
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx 
b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index 8cca988607fd..3c040a5a0085 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -441,8 +441,15 @@ void cclass_Unicode::initParserTable( const Locale& 
rLocale, sal_Int32 startChar
 cDecimalSepAlt = aItem.decimalSeparatorAlternative.toChar();
 }
 
-if ( cGroupSep < nDefCnt )
-pTable[cGroupSep] |= ParserFlags::VALUE;
+if (nContTypes & KParseTokens::GROUP_SEPARATOR_IN_NUMBER)
+{
+if ( cGroupSep < nDefCnt )
+pTable[cGroupSep] |= ParserFlags::VALUE;
+}
+else
+{
+cGroupSep = 0;
+}
 if ( cDecimalSep < nDefCnt )
 pTable[cDecimalSep] |= ParserFlags::CHAR_VALUE | ParserFlags::VALUE;
 if ( cDecimalSepAlt && cDecimalSepAlt < nDefCnt )
@@ -814,6 +821,8 @@ void cclass_Unicode::parseText( ParseResult& r, const 
OUString& rText, sal_Int32
 }
 if ( nMask & ParserFlags::VALUE )
 {
+if (current == cGroupSep)
+nParseTokensType |= 
KParseTokens::GROUP_SEPARATOR_IN_NUMBER;
 if ((current == cDecimalSep || (bDecSepAltUsed = 
(cDecimalSepAlt && current == cDecimalSepAlt))) &&
 ++nDecSeps > 1)
 {
diff --git a/offapi/com/sun/star/i18n/KParseTokens.idl 
b/offapi/com/sun/star/i18n/KParseTokens.idl
index ce5d355f0430..bc0f92c42c83 100644
--- a/offapi/com/sun/star/i18n/KParseTokens.idl
+++ b/offapi/com/sun/star/i18n/KParseTokens.idl
@@ -95,6 +95,28 @@ published constants KParseTokens
 /// Unicode (above 127) other number
 const long UNI_OTHER_NUMBER = 0x0008;
 
+/** If this bit is set in nContCharFlags parameters, the
+locale's group separator characters in numbers are accepted and
+ignored/skipped. Else a group separator in a number ends the
+current token. A leading group separator is never accepted. If
+an accepted group separator was encountered in a number
+(ParseResult::TokenType is KParseType::ASC_NUMBER or
+KParseType::UNI_NUMBER) this bit is also set in
+ParseResult::ContFlags.
+
+ NOTE: absence of this bit in
+nContCharFlags changes the default behaviour that in
+prior releases accepted numbers with group separators but lead
+to unexpected results when parsing formula expressions where the
+user entered a (wrong) separator that happened to be the group
+separator instead of an intended decimal separator. Usually
+inline numbers in a formula expression do not contain group
+separators.
+
+@since LibreOffice 6.2
+ */
+const long GROUP_SEPARATOR_IN_NUMBER = 0x0800;
+
 /** If this bit is set in nContCharFlags parameters and a
 string enclosed in double quotes is parsed and two consecutive
 double quotes are encountered, the string is ended. If this bit
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx 
b/sw/qa/extras/rtfexport/rtfexport.cxx
index 8b6ecdb27f85..8dc665642278 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -210,7 +210,7 @@ DECLARE_RTFEXPORT_TEST(testMathEqarray, "math-eqarray.rtf")
 {
 OUString aActual = getFormula(getRun(getParagraph(1), 1));
 OUString const aExpected(
-"y = left lbrace stack { 0, x < 0 # 1, x = 0 # {x} ^ {2} , x > 0 } 
right none");
+"y = left lbrace stack { 0 , x < 0 # 1 , x = 0 # {x} ^ {2} , x > 0 } 
right none");
 CPPUNIT_ASSERT_EQUAL(aExpected, aActual);

[Libreoffice-commits] core.git: i18npool/source linguistic/source lotuswordpro/source sfx2/source svx/source

2018-11-25 Thread Libreoffice Gerrit user
 i18npool/source/localedata/LocaleNode.cxx |2 +-
 linguistic/source/lngsvcmgr.cxx   |6 +++---
 lotuswordpro/source/filter/lwpfnlayout.cxx|4 ++--
 lotuswordpro/source/filter/lwppara.cxx|2 +-
 sfx2/source/appl/linkmgr2.cxx |9 +
 svx/source/sidebar/line/LinePropertyPanelBase.cxx |   14 +++---
 6 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit 4ac2f1799f1d6d428c06e5699c246184dd8590ad
Author: Mike Kaganski 
AuthorDate: Sun Nov 25 19:52:09 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sun Nov 25 20:35:57 2018 +0100

tdf#120703 PVS: V560 A part of conditional expression is always true/false

Change-Id: I2ae298f49ceba8059cd7236431db9a4d9a46b125
Reviewed-on: https://gerrit.libreoffice.org/63992
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/i18npool/source/localedata/LocaleNode.cxx 
b/i18npool/source/localedata/LocaleNode.cxx
index 11d3f4bb070c..a3d2595022f0 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -2025,7 +2025,7 @@ void LCMiscNode::generateCode (const OFileWriter ) 
const
 }
 of.writeParameter("ReservedWord", str, nbOfWords);
 // "true", ..., "below" trigger untranslated warning.
-if (!bEnglishLocale && curNode && (0 <= i && i <= 7) &&
+if (!bEnglishLocale && curNode && i <= 7 &&
 str.equalsIgnoreAsciiCaseAscii( ReserveWord[i].value))
 {
 fprintf( stderr,
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 9d57c1432b29..a95f5bfd4fbd 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -1585,7 +1585,7 @@ void SAL_CALL
 mxSpellDsp->SetServiceList( rLocale, rServiceImplNames );
 SaveCfgSvcs( SN_SPELLCHECKER );
 
-if (mxListenerHelper.is() && bChanged)
+if (mxListenerHelper)
 mxListenerHelper->AddLngSvcEvt(
 
linguistic2::LinguServiceEventFlags::SPELL_CORRECT_WORDS_AGAIN |
 
linguistic2::LinguServiceEventFlags::SPELL_WRONG_WORDS_AGAIN );
@@ -1602,7 +1602,7 @@ void SAL_CALL
 mxGrammarDsp->SetServiceList( rLocale, rServiceImplNames );
 SaveCfgSvcs( SN_GRAMMARCHECKER );
 
-if (mxListenerHelper.is() && bChanged)
+if (mxListenerHelper)
 mxListenerHelper->AddLngSvcEvt(
 
linguistic2::LinguServiceEventFlags::PROOFREAD_AGAIN );
 }
@@ -1618,7 +1618,7 @@ void SAL_CALL
 mxHyphDsp->SetServiceList( rLocale, rServiceImplNames );
 SaveCfgSvcs( SN_HYPHENATOR );
 
-if (mxListenerHelper.is() && bChanged)
+if (mxListenerHelper)
 mxListenerHelper->AddLngSvcEvt(
 
linguistic2::LinguServiceEventFlags::HYPHENATE_AGAIN );
 }
diff --git a/lotuswordpro/source/filter/lwpfnlayout.cxx 
b/lotuswordpro/source/filter/lwpfnlayout.cxx
index c2ac01055119..6dc167ff8dda 100644
--- a/lotuswordpro/source/filter/lwpfnlayout.cxx
+++ b/lotuswordpro/source/filter/lwpfnlayout.cxx
@@ -264,7 +264,7 @@ LwpVirtualLayout* 
LwpEnSuperTableLayout::GetMainTableLayout()
 {
 break;
 }
-if (pLayout && pLayout->GetLayoutType() == LWP_ENDNOTE_LAYOUT)
+if (pLayout->GetLayoutType() == LWP_ENDNOTE_LAYOUT)
 {
 return pLayout;
 }
@@ -321,7 +321,7 @@ LwpVirtualLayout* 
LwpFnSuperTableLayout::GetMainTableLayout()
 {
 break;
 }
-if (pLayout && pLayout->GetLayoutType() == LWP_FOOTNOTE_LAYOUT)
+if (pLayout->GetLayoutType() == LWP_FOOTNOTE_LAYOUT)
 {
 return pLayout;
 }
diff --git a/lotuswordpro/source/filter/lwppara.cxx 
b/lotuswordpro/source/filter/lwppara.cxx
index aca3fb934ac3..5b92281b0560 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -546,7 +546,7 @@ void LwpPara::RegisterStyle()
 }
 else
 {
-if (pNumbering && pNumbering->GetLevel() < 
nFoundBound && pParaSilverBullet
+if (pNumbering->GetLevel() < nFoundBound
 &&  (pParaSilverBullet->GetObjectID() 
!= m_pSilverBullet->GetObjectID()
 || pNumbering->GetPosition() != 
nPosition))
 {
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 05c817ab7855..b2d9d8a37b61 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -471,14 +471,15 @@ void 

[Libreoffice-commits] core.git: i18npool/source

2018-11-12 Thread Libreoffice Gerrit user
 i18npool/source/characterclassification/cclass_unicode_parser.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bc63974e9d82a6ff7954618add266f967fa428eb
Author: Mike Kaganski 
AuthorDate: Sun Nov 11 23:03:45 2018 +0300
Commit: Eike Rathke 
CommitDate: Mon Nov 12 18:19:08 2018 +0100

tdf#120703 PVS: V560 Properly compare current to cDecimalSepAlt

V560 A part of conditional expression is always false: current == 
cDecimalSep.

Assuming a copypaste error in commit 
21052ba2edeef9e16bf90fea62f007b1131c73c0.
Compare to a similar case below (line 817).

Change-Id: Iebd84aa8df3e37b9a5e4fdc7ce7a25a0704a260f
Reviewed-on: https://gerrit.libreoffice.org/63269
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx 
b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index 96882a8ef3c2..8cca988607fd 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -745,7 +745,7 @@ void cclass_Unicode::parseText( ParseResult& r, const 
OUString& rText, sal_Int32
 else
 r.TokenType = KParseType::ASC_NUMBER;
 }
-else if (current == cDecimalSep || (bDecSepAltUsed = 
(cDecimalSepAlt && current == cDecimalSep)))
+else if (current == cDecimalSep || (bDecSepAltUsed = 
(cDecimalSepAlt && current == cDecimalSepAlt)))
 {
 if (nextChar)
 ++nDecSeps;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2018-11-12 Thread Libreoffice Gerrit user
 i18npool/source/transliteration/transliteration_Numeric.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5b8b72cbdc6407bf806eab14b2d29bb72cf21cd6
Author: Noel Grandin 
AuthorDate: Mon Nov 12 14:03:31 2018 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 12 18:15:46 2018 +0100

fix missing "else" in transliterateBullet

ever since

commit f1830339193643466c1dd76dc37594c21ab3ac4f
Date:   Tue Apr 8 15:07:08 2003 +
INTEGRATION: CWS calc06 (1.2.44); FILE MERGED

not it will make much difference to the logic

found by experimental loplugin:indentation

Change-Id: I2d724ababa1664a87f2822ed8b59f3e3cd50e5e4
Reviewed-on: https://gerrit.libreoffice.org/63287
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/transliteration/transliteration_Numeric.cxx 
b/i18npool/source/transliteration/transliteration_Numeric.cxx
index 733f3f7dc100..4550026153d5 100644
--- a/i18npool/source/transliteration/transliteration_Numeric.cxx
+++ b/i18npool/source/transliteration/transliteration_Numeric.cxx
@@ -84,7 +84,7 @@ transliteration_Numeric::transliterateBullet( const OUString& 
inStr, sal_Int32 s
 if (useOffset)
 offset[j] = startPos;
 out[j++] = NUMBER_ZERO;
-} if (number > tableSize && !recycleSymbol) {
+} else if (number > tableSize && !recycleSymbol) {
 for (sal_Int32 k = startPos; k < i; k++) {
 if (useOffset)
 offset[j] = k;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source sdext/source sfx2/source slideshow/source solenv/bin soltools/cpp sot/source starmath/source svl/source svtools/source svx/source

2018-11-07 Thread Libreoffice Gerrit user
 i18npool/source/nativenumber/nativenumbersupplier.cxx|   12 +--
 sdext/source/minimizer/optimizerdialog.cxx   |   21 ++---
 sfx2/source/appl/workwin.cxx |   17 +---
 sfx2/source/control/dispatch.cxx |7 -
 sfx2/source/doc/DocumentMetadataAccess.cxx   |5 -
 sfx2/source/view/lokcharthelper.cxx  |   23 ++---
 slideshow/source/engine/animationnodes/animationbasenode.cxx |6 -
 solenv/bin/concat-deps.c |   13 +--
 soltools/cpp/_cpp.c  |7 -
 sot/source/sdstor/stgdir.cxx |5 -
 sot/source/sdstor/storage.cxx|7 -
 starmath/source/view.cxx |4 -
 svl/source/fsstor/fsstorage.cxx  |   18 +---
 svtools/source/config/colorcfg.cxx   |7 -
 svtools/source/control/valueset.cxx  |   29 ++-
 svtools/source/dialogs/prnsetup.cxx  |7 -
 svtools/source/uno/addrtempuno.cxx   |5 -
 svx/source/form/fmshimp.cxx  |7 -
 svx/source/sidebar/line/LinePropertyPanelBase.cxx|   22 ++---
 svx/source/svdraw/svddrgmt.cxx   |   44 ---
 svx/source/svdraw/svdmodel.cxx   |7 -
 svx/source/svdraw/svdpoev.cxx|   23 ++---
 svx/source/svdraw/svdviter.cxx   |7 -
 svx/source/svdraw/svdxcgv.cxx|   14 +--
 svx/source/table/svdotable.cxx   |9 --
 svx/source/tbxctrls/extrusioncontrols.cxx|   15 +--
 26 files changed, 126 insertions(+), 215 deletions(-)

New commits:
commit 5404f75a2fa863b97bdf8432f647053f0bff726e
Author: Noel Grandin 
AuthorDate: Wed Nov 7 09:26:57 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 7 12:39:11 2018 +0100

loplugin:collapseif in sdext..svx

Change-Id: I188d9e9b53e00acfbae3c7acd54de28f084c4b3f
Reviewed-on: https://gerrit.libreoffice.org/62985
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx 
b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index e3a023d792df..34dcae601029 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -216,13 +216,11 @@ static OUString AsciiToNative( const OUString& inStr, 
sal_Int32 nCount,
 if (count > 0 && 
number->multiplierExponent[number->exponentCount-1] == 1 &&
 newStr[count-1] == numberChar[0])
 count--;
-if (bNotZero && _count == count) {
-if (end != len) {
-newStr[count] = number->multiplierChar[0];
-if (useOffset)
-offset[count] = i - len;
-count++;
-}
+if (bNotZero && _count == count && end != len) {
+newStr[count] = number->multiplierChar[0];
+if (useOffset)
+offset[count] = i - len;
+count++;
 }
 }
 if (! bNotZero && ! (number->numberFlag & 
NUMBER_OMIT_ONLY_ZERO)) {
diff --git a/sdext/source/minimizer/optimizerdialog.cxx 
b/sdext/source/minimizer/optimizerdialog.cxx
index 9185f8e4f327..f7aa8cb9564e 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -173,22 +173,19 @@ void OptimizerDialog::UpdateConfiguration()
 }
 
 aAny = getControlProperty( "CheckBox3Pg3", "State" );
-if ( aAny >>= nInt16 )
+if ( (aAny >>= nInt16) && nInt16 )
 {
-if ( nInt16 )
+aAny = getControlProperty( "ListBox0Pg3", "SelectedItems" );
+if ( aAny >>= aSelectedItems )
 {
-aAny = getControlProperty( "ListBox0Pg3", "SelectedItems" );
-if ( aAny >>= aSelectedItems )
+if ( aSelectedItems.getLength() )
 {
-if ( aSelectedItems.getLength() )
+sal_Int16 nSelectedItem = aSelectedItems[ 0 ];
+aAny = getControlProperty( "ListBox0Pg3", "StringItemList" );
+if ( aAny >>= aStringItemList )
 {
-sal_Int16 nSelectedItem = aSelectedItems[ 0 ];
-aAny = getControlProperty( "ListBox0Pg3", "StringItemList" 
);
-if ( aAny >>= aStringItemList )
-{

[Libreoffice-commits] core.git: i18npool/source

2018-10-19 Thread Libreoffice Gerrit user
 i18npool/source/calendar/calendar_jewish.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f209524965641596cea16a0ee7780fffe176235a
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 14:29:11 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 16:44:12 2018 +0200

clarify Calendar_jewish::getDisplayString a little

Change-Id: I7abecaebd296d404e6a095b2befe5da07d346e75
Reviewed-on: https://gerrit.libreoffice.org/62017
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/i18npool/source/calendar/calendar_jewish.cxx 
b/i18npool/source/calendar/calendar_jewish.cxx
index 837f6f14f35a..9ac585447265 100644
--- a/i18npool/source/calendar/calendar_jewish.cxx
+++ b/i18npool/source/calendar/calendar_jewish.cxx
@@ -281,9 +281,9 @@ void Calendar_jewish::mapToGregorian()
 
 // Methods in XExtendedCalendar
 OUString SAL_CALL
-Calendar_jewish::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 
nNativeNumberMode )
+Calendar_jewish::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 
/*nNativeNumberMode*/ )
 {
-nNativeNumberMode = NativeNumberMode::NATNUM2;  // make Hebrew number for 
Jewish calendar
+const sal_Int16 nNativeNumberMode = NativeNumberMode::NATNUM2;  // make 
Hebrew number for Jewish calendar
 
 if (nCalendarDisplayCode == CalendarDisplayCode::SHORT_YEAR) {
 sal_Int32 value = getValue(CalendarFieldIndex::YEAR) % 1000; // take 
last 3 digits
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source svl/qa

2018-10-01 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/en_ZA.xml |   28 +---
 svl/qa/unit/svl.cxx   |8 
 2 files changed, 25 insertions(+), 11 deletions(-)

New commits:
commit fbc6415b85a855d3658be758efe4684cfd49faa3
Author: Eike Rathke 
AuthorDate: Mon Oct 1 15:57:12 2018 +0200
Commit: Eike Rathke 
CommitDate: Mon Oct 1 21:35:39 2018 +0200

Resolves: tdf#119613 [*-ZA] default to ISO 8601 date format

This also made it necessary to adapt the unit tests that checked
for the old default format in output.

Change-Id: Ie7bc78d1e5a17e5cb6f52d5ed1ab42db80f07d2e
Reviewed-on: https://gerrit.libreoffice.org/61200
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/i18npool/source/localedata/data/en_ZA.xml 
b/i18npool/source/localedata/data/en_ZA.xml
index b0584d8e1966..3807110cda43 100644
--- a/i18npool/source/localedata/data/en_ZA.xml
+++ b/i18npool/source/localedata/data/en_ZA.xml
@@ -52,6 +52,8 @@
 metric
   
   
+
+M-D
 M/D
 
   Standard
@@ -111,16 +113,16 @@
   [CURRENCY] # ##0,--;[RED][CURRENCY]-# ##0,--
 
 
-  YY/MM/DD
+  YY-MM-DD
 
 
   DD  
 
-
-  YY/MM/DD
+
+  YY-MM-DD
 
-
-  /MM/DD
+
+  -MM-DD
 
 
   D MMM YY
@@ -174,6 +176,12 @@
 
   WW
 
+
+  YY/MM/DD
+
+
+  /MM/DD
+
 
   HH:MM
 
@@ -195,10 +203,16 @@
 
   [HH]:MM:SS,00
 
-
+
+  YY-MM-DD HH:MM
+
+
+  -MM-DD HH:MM:SS
+
+
   YY/MM/DD HH:MM
 
-
+
   /MM/DD HH:MM:SS
 
   
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 801e5d3fc405..579a336b692c 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1213,14 +1213,14 @@ void Test::testIsNumberFormatSpecific()
 }
 
 {
-// en-ZA uses Y/M/D format, test that Y/M/D input leads to Y/M/D output
-// and ISO Y-M-D input leads to Y-M-D output.
+// en-ZA uses Y-M-D and Y/M/D format, test that either are accepted.
+// The default format changed from YY/MM/DD to -MM-DD.
 SvNumberFormatter aFormatter(m_xContext, LANGUAGE_ENGLISH_SAFRICA);
 
 std::vector aIO = {
-{ "1999/11/22", true, "99/11/22", 0 },  // if default YY 
changes to  adapt this
+{ "1999/11/22", true, "1999-11-22", 0 },
 { "1999-11-22", true, "1999-11-22", 0 },
-{ "11/2/1", true, "11/02/01", 0 },  // if default YY 
changes to  adapt this
+{ "11/2/1", true, "2011-02-01", 0 },
 { "99-2-11",true, "1999-02-11", 0 },
 { "22-2-11",true, "2022-02-11", 0 }
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2018-09-30 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/locale.dtd |   26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

New commits:
commit d8fe90fd1dcc881aa6a0f078dde202b9d4bea85d
Author: Matthias Seidel 
AuthorDate: Sat Sep 29 09:32:47 2018 +
Commit: Caolán McNamara 
CommitDate: Sun Sep 30 16:36:11 2018 +0200

Deleted whitespace, use correct branding, fixed typos

(cherry picked from commit 6cf656f2bbeb39e5a46984c58b32098ed6185699)

Change-Id: I88724806f5b8eb809661d4e754726a6246d47e8a
Reviewed-on: https://gerrit.libreoffice.org/61157
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/i18npool/source/localedata/data/locale.dtd 
b/i18npool/source/localedata/data/locale.dtd
index 062141456f3a..6cfd1f0e2a27 100644
--- a/i18npool/source/localedata/data/locale.dtd
+++ b/i18npool/source/localedata/data/locale.dtd
@@ -65,7 +65,7 @@
 3. Select the locale in the Language list box => MUST be assertion free.
 3.a. Assertions are only shown at the very first time a number formatter
  is created, respectively the first time a specific locale data is
- used.  To repeat steps 1.-3. you'd need to create another spreadsheet
+ used. To repeat steps 1.-3. you'd need to create another spreadsheet
  document.
 
 ===
@@ -103,13 +103,13 @@
 
 
 
 
 
@@ -442,7 +442,7 @@
  codes for compatibility with StarOffice5 and StarOffice4.
  Every locale data file MUST contain exactly one currency having this set 
to "true",
  and that currency MUST be used in format codes 12..17.
- For European countries using the EURo it MUST be the old currency, for 
example, DM.
+ For European countries using EUR it MUST be the old currency, for 
example, DM.
 -->
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2018-09-20 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/locale.dtd |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ad15354a7061b39d2ba22011a6d74b4ba2af4fae
Author: Eike Rathke 
AuthorDate: Thu Sep 20 18:54:14 2018 +0200
Commit: Eike Rathke 
CommitDate: Thu Sep 20 18:54:24 2018 +0200

Avoid U+21D2 Rightwards Double Arrow character

Change-Id: I181e5ad44027e261b3b8ad45c3d3d8cfcd23f987

diff --git a/i18npool/source/localedata/data/locale.dtd 
b/i18npool/source/localedata/data/locale.dtd
index d737cdf094e1..062141456f3a 100644
--- a/i18npool/source/localedata/data/locale.dtd
+++ b/i18npool/source/localedata/data/locale.dtd
@@ -376,8 +376,8 @@
  number formatter when encountering MMM or :
 
  * MMM or  immediately preceded or followed by a literal character
-   other than space ⇒ nominative month name (noun), for Excel and backwards
-   compatibility such as Finnish "ta"
+   other than space => nominative month name (noun), for Excel and
+   backwards compatibility such as Finnish "ta"
  * no day of month (D or DD) present in format code => nominative name
  * day of month (D or DD) after MMM or  => genitive name
* no genitive names defined => nominative name
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18npool/source

2018-09-20 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/locale.dtd |   41 +
 1 file changed, 36 insertions(+), 5 deletions(-)

New commits:
commit 0ffa7a733d834647dfd59b864c52a015028822b6
Author: Eike Rathke 
AuthorDate: Thu Sep 20 18:34:10 2018 +0200
Commit: Eike Rathke 
CommitDate: Thu Sep 20 18:40:21 2018 +0200

Document rules for use of nominative / genitive / partitive case month names

Change-Id: Ie322be2c85e1b652273565eb61a8b62f116b9f9e

diff --git a/i18npool/source/localedata/data/locale.dtd 
b/i18npool/source/localedata/data/locale.dtd
index 8ea44d2f0a4a..d737cdf094e1 100644
--- a/i18npool/source/localedata/data/locale.dtd
+++ b/i18npool/source/localedata/data/locale.dtd
@@ -342,7 +342,9 @@
  -->
 
 
-
+
 
 
+ be given if the RefLocale mechanism is not used! If not specified,
+ the MonthsOfYear names will be used in the context of the number
+ formatter's genitive case. -->
 
 
+ be given if the RefLocale mechanism is not used! If not specified,
+ GenitiveMonths names will be used, or if those are not specified then
+ MonthsOfYear, in the context of the number formatter's partitive case. -->
 
 
 
+
+
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


<    1   2   3   4   5   >