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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 1 13:52:41 UTC 2019


 desktop/source/lib/init.cxx |   16 ----------------
 1 file changed, 16 deletions(-)

New commits:
commit 64d1b9673260b70e241fa1775a5116be74469b71
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Aug 1 13:59:52 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Aug 1 15:51:58 2019 +0200

    remove unnecessary code in doc_registerCallback
    
    after
        commit 98c0cefb18d8af7aa4732708ba0ae6be2e808d6f
        Date:   Wed Jul 31 12:40:29 2019 +0200
        desktop: fix UB in DesktopLOKTest::testCommentsCallbacksWriter()
    
    Change-Id: I254d8413e707d4525efbfb2050e5b29f70c4bed7
    Reviewed-on: https://gerrit.libreoffice.org/76796
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 89e93d1723a1..2ecf065de95d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2828,22 +2828,6 @@ static void doc_registerCallback(LibreOfficeKitDocument* pThis,
 
     LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis);
 
-    // This is used by unit-tests to unregister stack-local callback objects where we have multiple views
-    // so we cannot rely on SfxLokHelper::getView
-    if (pCallback == nullptr && pData != nullptr)
-    {
-        for (auto& pair1 : pDocument->mpCallbackFlushHandlers)
-        {
-            int nView = pair1.first;
-            for (auto& pair2 : pDocument->mpCallbackFlushHandlers)
-            {
-                pair2.second->removeViewStates(nView);
-            }
-            pDocument->mpCallbackFlushHandlers[nView].reset(new CallbackFlushHandler(pThis, nullptr, nullptr));
-        }
-        return;
-    }
-
     int nView = SfxLokHelper::getView();
     if (nView < 0)
         return;


More information about the Libreoffice-commits mailing list