Kaydet (Commit) 3aaee117 authored tarafından Tomáš Chvátal's avatar Tomáš Chvátal Kaydeden (comit) Eike Rathke

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
Reviewed-on: https://gerrit.libreoffice.org/69311
Tested-by: Jenkins
Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
üst 743b0a92
......@@ -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 +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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment