diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 75fd8f82b874..0281ab3f4cbf 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -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 |