Hello community,

here is the log from the commit of package libreoffice for openSUSE:Factory 
checked in at 2019-03-26 15:36:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libreoffice (Old)
 and      /work/SRC/openSUSE:Factory/.libreoffice.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libreoffice"

Tue Mar 26 15:36:33 2019 rev:176 rq:687580 version:6.2.2.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libreoffice/libreoffice.changes  2019-03-14 
14:57:00.051745170 +0100
+++ /work/SRC/openSUSE:Factory/.libreoffice.new.25356/libreoffice.changes       
2019-03-26 15:36:57.392383790 +0100
@@ -1,0 +2,28 @@
+Fri Mar 22 10:52:26 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update the old-icu.patch based on the upstream feedback
+
+-------------------------------------------------------------------
+Mon Mar 19 10:44:31 UTC 2019 - Adam Majer <[email protected]>
+
+- old-boost.patch: update patch to fix build with Boost from SLE-12
+
+-------------------------------------------------------------------
+Mon Mar 18 12:27:36 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 6.2.2.2:
+  * Few more tweaks over previous RC1
+
+-------------------------------------------------------------------
+Fri Mar 15 15:05:42 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Add patch to fix build with old icu from Leap 42:
+  * old-icu.patch
+
+-------------------------------------------------------------------
+Thu Mar 14 14:44:58 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Add patch to fix build on Leap 42:
+  * kde5.patch
+
+-------------------------------------------------------------------

Old:
----
  libreoffice-6.2.2.1.tar.xz
  libreoffice-6.2.2.1.tar.xz.asc
  libreoffice-help-6.2.2.1.tar.xz
  libreoffice-help-6.2.2.1.tar.xz.asc
  libreoffice-translations-6.2.2.1.tar.xz
  libreoffice-translations-6.2.2.1.tar.xz.asc

New:
----
  kde5.patch
  libreoffice-6.2.2.2.tar.xz
  libreoffice-6.2.2.2.tar.xz.asc
  libreoffice-help-6.2.2.2.tar.xz
  libreoffice-help-6.2.2.2.tar.xz.asc
  libreoffice-translations-6.2.2.2.tar.xz
  libreoffice-translations-6.2.2.2.tar.xz.asc
  old-icu.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libreoffice.spec ++++++
--- /var/tmp/diff_new_pack.8cRfVz/_old  2019-03-26 15:37:05.592380350 +0100
+++ /var/tmp/diff_new_pack.8cRfVz/_new  2019-03-26 15:37:05.596380348 +0100
@@ -52,7 +52,7 @@
 %bcond_with gtk3
 %endif
 Name:           libreoffice
-Version:        6.2.2.1
+Version:        6.2.2.2
 Release:        0
 Summary:        A Free Office Suite (Framework)
 License:        LGPL-3.0-or-later AND MPL-2.0+
@@ -103,6 +103,8 @@
 Patch7:         libreoffice-postgresql.patch
 Patch8:         0001-Fix-LTO-segfault-in-libtest_sw_uwriter-test.patch
 Patch9:         boost_169.patch
+Patch10:        kde5.patch
+Patch11:        old-icu.patch
 # try to save space by using hardlinks
 Patch990:       install-with-hardlinks.diff
 # save time by relying on rpm check rather than doing stupid find+grep
@@ -969,6 +971,8 @@
 %patch7
 %patch8 -p1
 %patch9 -p1
+%patch10 -p1
+%patch11 -p1
 %patch990 -p1
 %patch991 -p1
 







++++++ kde5.patch ++++++
>From 265caa4381c048c346c907b017561ab0fe0367ff Mon Sep 17 00:00:00 2001
From: Michael Stahl <[email protected]>
Date: Fri, 22 Feb 2019 19:19:27 +0100
Subject: [PATCH] tdf#119856 vcl: Qt5/KDE5 RunInMainThread

The problem with the current approach of transferring calls to the main
thread with Q_EMIT signals is that if the code that should run in the
main thread needs SolarMutex, then the non-main-thread must use
SolarMutexReleaser - but then the main thread will run not only the call
that is needed right now, but will potentially process all pending
events, and the other thread hasn't prepared for that.

We need the inter-thread feature of Qt::BlockingQueuedConnection and the
non-queued feature of Qt::DirectConnection, but this combination doesn't
appear to exist.

So the SolarMutexReleaser needs to go - but then the main thread does
need SolarMutex for some things, and hence we need to trick it into
believing it has SolarMutex with the m_bNoYieldLock hack.

Then it becomes apparent that the main thread may be blocked on either
Qt events, which is fine, or on the SalYieldMutex's m_aMutex, which will
never be released now.

So the main thread must never block on m_aMutex; the alternative is to
use the same approach as the osx code (and, in a somewhat different
form, the svp code), and add some condition variables on which the main
thread can block if it fails to acquire the m_aMutex immediately.

It's even possible to do this in a somewhat generic way with lambdas.

This does appear to work, but it makes the Q_EMIT approach entirely
untenable, because now the main thread will be blocked on the condition
variable and the non-main-thread will be blocked until the Qt event is
processed.

Change-Id: I6480a6b909d5ec8814b2ff10dbefb0f3686a83c7
Reviewed-on: https://gerrit.libreoffice.org/68232
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <[email protected]>
---
 vcl/inc/qt5/Qt5Instance.hxx      |   7 +-
 vcl/qt5/Qt5Instance.cxx          | 175 ++++++++++++++++++++++++++++---
 vcl/unx/kde5/KDE5SalInstance.cxx |  23 ++--
 vcl/unx/kde5/KDE5SalInstance.hxx |   8 +-
 4 files changed, 181 insertions(+), 32 deletions(-)

Index: libreoffice-6.2.2.1/vcl/inc/qt5/Qt5Instance.hxx
===================================================================
--- libreoffice-6.2.2.1.orig/vcl/inc/qt5/Qt5Instance.hxx
+++ libreoffice-6.2.2.1/vcl/inc/qt5/Qt5Instance.hxx
@@ -27,6 +27,8 @@
 
 #include <QtCore/QObject>
 
+#include <functional>
+
 class QApplication;
 class SalYieldMutex;
 class SalFrame;
@@ -50,15 +52,18 @@ public:
 
 private Q_SLOTS:
     bool ImplYield(bool bWait, bool bHandleAllCurrentEvents);
+    void ImplRunInMain();
 
 Q_SIGNALS:
     bool ImplYieldSignal(bool bWait, bool bHandleAllCurrentEvents);
-    std::unique_ptr<SalMenu> createMenuSignal(bool, Menu*);
+    void ImplRunInMainSignal();
 
 public:
     explicit Qt5Instance(bool bUseCairo = false);
     virtual ~Qt5Instance() override;
 
+    void RunInMainThread(std::function<void()> func);
+
     virtual SalFrame* CreateFrame(SalFrame* pParent, SalFrameStyleFlags 
nStyle) override;
     virtual SalFrame* CreateChildFrame(SystemParentData* pParent,
                                        SalFrameStyleFlags nStyle) override;
Index: libreoffice-6.2.2.1/vcl/qt5/Qt5Instance.cxx
===================================================================
--- libreoffice-6.2.2.1.orig/vcl/qt5/Qt5Instance.cxx
+++ libreoffice-6.2.2.1/vcl/qt5/Qt5Instance.cxx
@@ -43,13 +43,165 @@
 #include <QtWidgets/QWidget>
 
 #include <vclpluginapi.h>
+#include <tools/debug.hxx>
+#include <comphelper/flagguard.hxx>
 #include <sal/log.hxx>
 #include <osl/process.h>
 
 #include <headless/svpbmp.hxx>
 
+#include <mutex>
+#include <condition_variable>
+
+/// TODO: not much Qt5 specific here? could be generalised, esp. for OSX...
+/// this subclass allows for the transfer of a closure for running on the main
+/// thread, to handle all the thread affine stuff in Qt5; the SolarMutex is
+/// "loaned" to the main thread for the execution of the closure.
+/// @note it doesn't work to just use "emit" and signals/slots to move calls to
+/// the main thread, because the other thread has the SolarMutex; the other
+/// thread (typically) cannot release SolarMutex, because then the main thread
+/// will handle all sorts of events and whatnot; this design ensures that the
+/// main thread only runs the passed closure (unless the closure releases
+/// SolarMutex itself, which should probably be avoided).
+class Qt5YieldMutex : public SalYieldMutex
+{
+public:
+    /// flag only accessed on main thread:
+    /// main thread has "borrowed" SolarMutex from another thread
+    bool m_bNoYieldLock = false;
+    /// members for communication from non-main thread to main thread
+    std::mutex m_RunInMainMutex;
+    std::condition_variable m_InMainCondition;
+    bool m_isWakeUpMain = false;
+    std::function<void()> m_Closure; ///< code for main thread to run
+    /// members for communication from main thread to non-main thread
+    std::condition_variable m_ResultCondition;
+    bool m_isResultReady = false;
+
+    virtual bool IsCurrentThread() const override;
+    virtual void doAcquire(sal_uInt32 nLockCount) override;
+    virtual sal_uInt32 doRelease(bool const bUnlockAll) override;
+};
+
+bool Qt5YieldMutex::IsCurrentThread() const
+{
+    auto const* pSalInst(static_cast<Qt5Instance 
const*>(GetSalData()->m_pInstance));
+    assert(pSalInst);
+    if (pSalInst->IsMainThread() && m_bNoYieldLock)
+    {
+        return true; // main thread has borrowed SolarMutex
+    }
+    return SalYieldMutex::IsCurrentThread();
+}
+
+void Qt5YieldMutex::doAcquire(sal_uInt32 nLockCount)
+{
+    auto const* pSalInst(static_cast<Qt5Instance 
const*>(GetSalData()->m_pInstance));
+    assert(pSalInst);
+    if (!pSalInst->IsMainThread())
+    {
+        SalYieldMutex::doAcquire(nLockCount);
+        return;
+    }
+    if (m_bNoYieldLock)
+    {
+        return; // special case for main thread: borrowed from other thread
+    }
+    do // main thread acquire...
+    {
+        std::function<void()> func; // copy of closure on thread stack
+        {
+            std::unique_lock<std::mutex> g(m_RunInMainMutex);
+            if (m_aMutex.tryToAcquire())
+            {
+                // if there's a closure, the other thread holds m_aMutex
+                assert(!m_Closure);
+                m_isWakeUpMain = false;
+                --nLockCount; // have acquired once!
+                ++m_nCount;
+                break;
+            }
+            m_InMainCondition.wait(g, [this]() { return m_isWakeUpMain; });
+            m_isWakeUpMain = false;
+            std::swap(func, m_Closure);
+        }
+        if (func)
+        {
+            assert(!m_bNoYieldLock);
+            m_bNoYieldLock = true; // execute closure with borrowed SolarMutex
+            func();
+            m_bNoYieldLock = false;
+            std::unique_lock<std::mutex> g(m_RunInMainMutex);
+            assert(!m_isResultReady);
+            m_isResultReady = true;
+            m_ResultCondition.notify_all(); // unblock other thread
+        }
+    } while (true);
+    SalYieldMutex::doAcquire(nLockCount);
+}
+
+sal_uInt32 Qt5YieldMutex::doRelease(bool const bUnlockAll)
+{
+    auto const* pSalInst(static_cast<Qt5Instance 
const*>(GetSalData()->m_pInstance));
+    assert(pSalInst);
+    if (pSalInst->IsMainThread() && m_bNoYieldLock)
+    {
+        return 1; // dummy value
+    }
+
+    std::unique_lock<std::mutex> g(m_RunInMainMutex);
+    // read m_nCount before doRelease (it's guarded by m_aMutex)
+    bool const isReleased(bUnlockAll || m_nCount == 1);
+    sal_uInt32 nCount = SalYieldMutex::doRelease(bUnlockAll);
+    if (isReleased && !pSalInst->IsMainThread())
+    {
+        m_isWakeUpMain = true;
+        m_InMainCondition.notify_all(); // unblock main thread
+    }
+    return nCount;
+}
+
+// this could be abstracted to be independent of Qt5 by passing in the
+// event-trigger as another function parameter...
+// it could also be a template of the return type, then it could return the
+// result of func... but then how to handle the result in doAcquire?
+void Qt5Instance::RunInMainThread(std::function<void()> func)
+{
+    DBG_TESTSOLARMUTEX();
+    if (IsMainThread())
+    {
+        func();
+        return;
+    }
+
+    Qt5YieldMutex* const pMutex(static_cast<Qt5YieldMutex*>(GetYieldMutex()));
+    {
+        std::unique_lock<std::mutex> g(pMutex->m_RunInMainMutex);
+        assert(!pMutex->m_Closure);
+        pMutex->m_Closure = func;
+        // unblock main thread in case it is blocked on condition
+        pMutex->m_isWakeUpMain = true;
+        pMutex->m_InMainCondition.notify_all();
+    }
+    // wake up main thread in case it is blocked on event queue
+    // TriggerUserEventProcessing() appears to be insufficient in case the
+    // main thread does QEventLoop::WaitForMoreEvents
+    Q_EMIT ImplRunInMainSignal();
+    {
+        std::unique_lock<std::mutex> g(pMutex->m_RunInMainMutex);
+        pMutex->m_ResultCondition.wait(g, [pMutex]() { return 
pMutex->m_isResultReady; });
+        pMutex->m_isResultReady = false;
+    }
+}
+
+void Qt5Instance::ImplRunInMain()
+{
+    SolarMutexGuard g; // trigger the dispatch code in Qt5YieldMutex::doAcquire
+    (void)this; // suppress unhelpful [loplugin:staticmethods]; can't be static
+}
+
 Qt5Instance::Qt5Instance(bool bUseCairo)
-    : SalGenericInstance(o3tl::make_unique<SalYieldMutex>())
+    : SalGenericInstance(o3tl::make_unique<Qt5YieldMutex>())
     , m_postUserEventId(-1)
     , m_bUseCairo(bUseCairo)
 {
@@ -65,8 +217,8 @@ Qt5Instance::Qt5Instance(bool bUseCairo)
     // is processed before the thread emitting the signal continues
     connect(this, SIGNAL(ImplYieldSignal(bool, bool)), this, 
SLOT(ImplYield(bool, bool)),
             Qt::BlockingQueuedConnection);
-    connect(this, &Qt5Instance::createMenuSignal, this, 
&Qt5Instance::CreateMenu,
-            Qt::BlockingQueuedConnection);
+    connect(this, &Qt5Instance::ImplRunInMainSignal, this, 
&Qt5Instance::ImplRunInMain,
+            Qt::QueuedConnection); // no Blocking!
 }
 
 Qt5Instance::~Qt5Instance()
@@ -136,15 +288,14 @@ Qt5Instance::CreateVirtualDevice(SalGrap
 
 std::unique_ptr<SalMenu> Qt5Instance::CreateMenu(bool bMenuBar, Menu* pVCLMenu)
 {
-    if (qApp->thread() != QThread::currentThread())
-    {
-        SolarMutexReleaser aReleaser;
-        return Q_EMIT createMenuSignal(bMenuBar, pVCLMenu);
-    }
-
-    Qt5Menu* pSalMenu = new Qt5Menu(bMenuBar);
-    pSalMenu->SetMenu(pVCLMenu);
-    return std::unique_ptr<SalMenu>(pSalMenu);
+    std::unique_ptr<SalMenu> pRet;
+    RunInMainThread([&pRet, bMenuBar, pVCLMenu]() {
+        Qt5Menu* pSalMenu = new Qt5Menu(bMenuBar);
+        pRet.reset(pSalMenu);
+        pSalMenu->SetMenu(pVCLMenu);
+    });
+    assert(pRet);
+    return pRet;
 }
 
 std::unique_ptr<SalMenuItem> Qt5Instance::CreateMenuItem(const SalItemParams& 
rItemData)
Index: libreoffice-6.2.2.1/vcl/unx/kde5/KDE5SalInstance.cxx
===================================================================
--- libreoffice-6.2.2.1.orig/vcl/unx/kde5/KDE5SalInstance.cxx
+++ libreoffice-6.2.2.1/vcl/unx/kde5/KDE5SalInstance.cxx
@@ -46,21 +46,16 @@ KDE5SalInstance::KDE5SalInstance()
     pSVData->maAppData.mxToolkitName = OUString("kde5");
 
     KDE5SalData::initNWF();
-
-    connect(this, &KDE5SalInstance::createFrameSignal, this, 
&KDE5SalInstance::CreateFrame,
-            Qt::BlockingQueuedConnection);
-    connect(this, &KDE5SalInstance::createFilePickerSignal, this,
-            &KDE5SalInstance::createFilePicker, Qt::BlockingQueuedConnection);
 }
 
 SalFrame* KDE5SalInstance::CreateFrame(SalFrame* pParent, SalFrameStyleFlags 
nState)
 {
-    if (!IsMainThread())
-    {
-        SolarMutexReleaser aReleaser;
-        return Q_EMIT createFrameSignal(pParent, nState);
-    }
-    return new KDE5SalFrame(static_cast<KDE5SalFrame*>(pParent), nState, true);
+    SalFrame* pRet(nullptr);
+    RunInMainThread([&pRet, pParent, nState]() {
+        pRet = new KDE5SalFrame(static_cast<KDE5SalFrame*>(pParent), nState, 
true);
+    });
+    assert(pRet);
+    return pRet;
 }
 
 uno::Reference<ui::dialogs::XFilePicker2>
@@ -68,7 +63,11 @@ KDE5SalInstance::createFilePicker(const
 {
     if (!IsMainThread())
     {
-        return Q_EMIT createFilePickerSignal(xMSF);
+        uno::Reference<ui::dialogs::XFilePicker2> xRet;
+        RunInMainThread(
+            [&xRet, this, xMSF]() { xRet = this->createFilePicker(xMSF); });
+        assert(xRet);
+        return xRet;
     }
 
     // In order to insert custom controls, KDE5FilePicker currently relies on 
KFileWidget
Index: libreoffice-6.2.2.1/vcl/unx/kde5/KDE5SalInstance.hxx
===================================================================
--- libreoffice-6.2.2.1.orig/vcl/unx/kde5/KDE5SalInstance.hxx
+++ libreoffice-6.2.2.1/vcl/unx/kde5/KDE5SalInstance.hxx
@@ -42,13 +42,7 @@ public:
 
     virtual bool IsMainThread() const override;
 
-Q_SIGNALS:
-    SalFrame* createFrameSignal(SalFrame* pParent, SalFrameStyleFlags nStyle);
-
-    css::uno::Reference<css::ui::dialogs::XFilePicker2>
-    createFilePickerSignal(const 
css::uno::Reference<css::uno::XComponentContext>&);
-
-private Q_SLOTS:
+private:
     virtual SalFrame* CreateFrame(SalFrame* pParent, SalFrameStyleFlags 
nStyle) override;
 
     virtual css::uno::Reference<css::ui::dialogs::XFilePicker2>
++++++ libreoffice-6.2.2.1.tar.xz -> libreoffice-6.2.2.2.tar.xz ++++++
/work/SRC/openSUSE:Factory/libreoffice/libreoffice-6.2.2.1.tar.xz 
/work/SRC/openSUSE:Factory/.libreoffice.new.25356/libreoffice-6.2.2.2.tar.xz 
differ: char 26, line 1

++++++ libreoffice-help-6.2.2.1.tar.xz -> libreoffice-help-6.2.2.2.tar.xz ++++++
/work/SRC/openSUSE:Factory/libreoffice/libreoffice-help-6.2.2.1.tar.xz 
/work/SRC/openSUSE:Factory/.libreoffice.new.25356/libreoffice-help-6.2.2.2.tar.xz
 differ: char 27, line 1

++++++ libreoffice-translations-6.2.2.1.tar.xz -> 
libreoffice-translations-6.2.2.2.tar.xz ++++++
/work/SRC/openSUSE:Factory/libreoffice/libreoffice-translations-6.2.2.1.tar.xz 
/work/SRC/openSUSE:Factory/.libreoffice.new.25356/libreoffice-translations-6.2.2.2.tar.xz
 differ: char 26, line 1



++++++ old-boost.patch ++++++
--- /var/tmp/diff_new_pack.8cRfVz/_old  2019-03-26 15:37:05.768380276 +0100
+++ /var/tmp/diff_new_pack.8cRfVz/_new  2019-03-26 15:37:05.768380276 +0100
@@ -1,7 +1,7 @@
-Index: libreoffice-6.1.0.0.beta2/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
+Index: libreoffice-6.2.2.1/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
 ===================================================================
---- 
libreoffice-6.1.0.0.beta2.orig/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
-+++ libreoffice-6.1.0.0.beta2/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
+--- libreoffice-6.2.2.1.orig/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
++++ libreoffice-6.2.2.1/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
 @@ -58,7 +58,7 @@ OUString applicationDirPath()
      const auto utf8Path = applicationSystemPath.toUtf8();
      auto ret = boost::filesystem::path(utf8Path.getStr(), utf8Path.getStr() + 
utf8Path.getLength());
@@ -11,3 +11,46 @@
  }
  
  OUString findPickerExecutable()
+Index: libreoffice-6.2.2.1/sw/source/core/crsr/findtxt.cxx
+===================================================================
+--- libreoffice-6.2.2.1.orig/sw/source/core/crsr/findtxt.cxx
++++ libreoffice-6.2.2.1/sw/source/core/crsr/findtxt.cxx
+@@ -152,7 +152,11 @@ public:
+     {
+         if (pFrame)
+         {
++#if BOOST_VERSION < 105600
++            m_oMergedIter.reset(*pFrame);
++#else
+             m_oMergedIter.emplace(*pFrame);
++#endif
+         }
+     }
+ 
+Index: libreoffice-6.2.2.1/sw/source/core/inc/txtfrm.hxx
+===================================================================
+--- libreoffice-6.2.2.1.orig/sw/source/core/inc/txtfrm.hxx
++++ libreoffice-6.2.2.1/sw/source/core/inc/txtfrm.hxx
+@@ -24,6 +24,8 @@
+ #include <ndtxt.hxx>
+ #include "TextFrameIndex.hxx"
+ 
++#include <boost/version.hpp>
++
+ namespace com { namespace sun { namespace star { namespace linguistic2 { 
class XHyphenatedWord; } } } }
+ 
+ namespace sw { namespace mark { class IMark; } }
+@@ -980,8 +982,13 @@ struct MergedPara
+ class MergedAttrIterBase
+ {
+ protected:
++#if BOOST_VERSION < 105600
++    sw::MergedPara const* m_pMerged;
++    SwTextNode const* m_pNode;
++#else
+     sw::MergedPara const*const m_pMerged;
+     SwTextNode const*const m_pNode;
++#endif
+     size_t m_CurrentExtent;
+     size_t m_CurrentHint;
+     MergedAttrIterBase(SwTextFrame const& rFrame);

++++++ old-icu.patch ++++++
>From 8e264d64093e11fbabdd13e0f86bec8b7c989796 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <[email protected]>
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..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
-- 
2.21.0


Reply via email to