From bfba39e33a2879e4f85eed869f17b7703608d4d61809ea24356ff322b8843b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 22 Mar 2019 10:52:56 +0000 Subject: [PATCH] - Update the old-icu.patch based on the upstream feedback OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=775 --- libreoffice.changes | 5 +++++ old-icu.patch | 31 ++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/libreoffice.changes b/libreoffice.changes index 0f31057..ef128b3 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 22 10:52:26 UTC 2019 - Tomáš Chvátal + +- Update the old-icu.patch based on the upstream feedback + ------------------------------------------------------------------- Mon Mar 19 10:44:31 UTC 2019 - Adam Majer diff --git a/old-icu.patch b/old-icu.patch index bda0a0f..0bb1d6b 100644 --- a/old-icu.patch +++ b/old-icu.patch @@ -1,24 +1,49 @@ +From 8e264d64093e11fbabdd13e0f86bec8b7c989796 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= +Date: Fri, 15 Mar 2019 16:43:31 +0100 +Subject: [PATCH] Use RegexMatcher.find(pos, status) call on old ICU + +The RegexMatcher.find(status) is new since icu 55 and this works even +on the old releases thus revert there to the available albeit slower +call. + +Change-Id: I964c10efd15515b04ac9037cda3b5b309910baf5 +--- + sc/source/core/tool/interpr1.cxx | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx -index 75fd8f82b874..caf84853071e 100644 +index 75fd8f82b874..0281ab3f4cbf 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx -@@ -9408,7 +9408,8 @@ void ScInterpreter::ScRegex() +@@ -9408,7 +9408,12 @@ void ScInterpreter::ScRegex() { // Find n-th occurrence. sal_Int32 nCount = 0; - while (aRegexMatcher.find( status) && U_SUCCESS(status) && ++nCount < nOccurrence) ++#if (U_ICU_VERSION_MAJOR_NUM < 55) + int32_t nStartPos = 0; + while (aRegexMatcher.find(nStartPos, status) && U_SUCCESS(status) && ++nCount < nOccurrence) ++#else ++ while (aRegexMatcher.find(status) && U_SUCCESS(status) && ++nCount < nOccurrence) ++#endif ; if (U_FAILURE(status)) { -@@ -9448,7 +9449,8 @@ void ScInterpreter::ScRegex() +@@ -9448,7 +9453,12 @@ void ScInterpreter::ScRegex() { // Replace n-th occurrence of match with replacement. sal_Int32 nCount = 0; - while (aRegexMatcher.find( status) && U_SUCCESS(status)) ++#if (U_ICU_VERSION_MAJOR_NUM < 55) + int32_t nStartPos = 0; + while (aRegexMatcher.find(nStartPos, status) && U_SUCCESS(status)) ++#else ++ while (aRegexMatcher.find(status) && U_SUCCESS(status)) ++#endif { // XXX NOTE: After several RegexMatcher::find() the // RegexMatcher::appendReplacement() still starts at the +-- +2.21.0 +