[Libreoffice-commits] online.git: loolwsd/bundled loolwsd/ChildSession.cpp loolwsd/LibreOfficeKit.hpp loolwsd/LOKitClient.cpp loolwsd/LOOLKit.cpp

Marco Cecchetti marco.cecchetti at collabora.com
Sat Sep 10 18:53:11 UTC 2016


 loolwsd/ChildSession.cpp                                |    2 --
 loolwsd/LOKitClient.cpp                                 |    2 +-
 loolwsd/LOOLKit.cpp                                     |    2 +-
 loolwsd/LibreOfficeKit.hpp                              |   16 ++--------------
 loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h |    7 +------
 5 files changed, 5 insertions(+), 24 deletions(-)

New commits:
commit edc1302f16d707c14995f4342353e35284934091
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date:   Sat Sep 10 20:51:59 2016 +0200

    Revert "loolwsd: we use callbacks latch for not missing messages sent very early"
    
    This reverts commit f2106157f31801d96ac8fdf5e74956455ebbf778.

diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index 93c4cf6..93a2312 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -357,8 +357,6 @@ bool ChildSession::loadDocument(const char * /*buffer*/, int /*length*/, StringT
     // Inform this view of other views
     _docManager.notifyCurrentViewOfOtherViews(getId());
 
-    _loKitDocument->setCallbackLatch(false);
-
     Log::info("Loaded session " + getId());
     return true;
 }
diff --git a/loolwsd/LOKitClient.cpp b/loolwsd/LOKitClient.cpp
index 13a180e..b882b79 100644
--- a/loolwsd/LOKitClient.cpp
+++ b/loolwsd/LOKitClient.cpp
@@ -112,7 +112,7 @@ protected:
             return Application::EXIT_UNAVAILABLE;
         }
 
-        loKitDocument->pClass->registerCallback(loKitDocument, myCallback, nullptr, /*callback latch*/ false);
+        loKitDocument->pClass->registerCallback(loKitDocument, myCallback, nullptr);
 
         loKitDocument->pClass->initializeForRendering(loKitDocument, nullptr);
 
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 261821b..94c0846 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -1138,7 +1138,7 @@ private:
             viewId = _loKitDocument->getView();
             _viewIdToCallbackDescr.emplace(viewId,
                                            std::unique_ptr<CallbackDescriptor>(new CallbackDescriptor({ this, viewId })));
-            _loKitDocument->registerCallback(ViewCallback, _viewIdToCallbackDescr[viewId].get(), /*callback latch*/ true);
+            _loKitDocument->registerCallback(ViewCallback, _viewIdToCallbackDescr[viewId].get());
 
             Log::info() << "Document [" << _url << "] view ["
                         << viewId << "] loaded, leaving "
diff --git a/loolwsd/LibreOfficeKit.hpp b/loolwsd/LibreOfficeKit.hpp
index 700db4b..5881c77 100644
--- a/loolwsd/LibreOfficeKit.hpp
+++ b/loolwsd/LibreOfficeKit.hpp
@@ -214,27 +214,15 @@ public:
     }
 
     /**
-     * Enable/disable callbacks latch. LOK will set the latch when it wants to
-     * queue new callbacks but not flush them.
-     *
-     * @param bCallbackLatch: true enables the latch, false disables it.
-     */
-    inline void setCallbackLatch(bool bCallbackLatch)
-    {
-        _pDoc->pClass->setCallbackLatch(_pDoc, bCallbackLatch);
-    }
-
-    /**
      * Registers a callback. LOK will invoke this function when it wants to
      * inform the client about events.
      *
      * @param pCallback the callback to invoke
      * @param pData the user data, will be passed to the callback on invocation
-     * @param bCallbackLatch the event latch status to be set before the callback is registered
      */
-    inline void registerCallback(LibreOfficeKitCallback pCallback, void* pData, bool bCallbackLatch = false)
+    inline void registerCallback(LibreOfficeKitCallback pCallback, void* pData)
     {
-        _pDoc->pClass->registerCallback(_pDoc, pCallback, pData, bCallbackLatch);
+        _pDoc->pClass->registerCallback(_pDoc, pCallback, pData);
     }
 
     /**
diff --git a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index e03163f..81d65c1 100644
--- a/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/loolwsd/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -147,15 +147,10 @@ struct _LibreOfficeKitDocumentClass
     void (*initializeForRendering) (LibreOfficeKitDocument* pThis,
                                     const char* pArguments);
 
-    /// @see lok::Document::setCallbackLatch().
-    void (*setCallbackLatch) (LibreOfficeKitDocument* pThis,
-                              bool bCallbackLatch);
-
     /// @see lok::Document::registerCallback().
     void (*registerCallback) (LibreOfficeKitDocument* pThis,
                               LibreOfficeKitCallback pCallback,
-                              void* pData,
-                              bool bCallbackLatch);
+                              void* pData);
 
     /// @see lok::Document::postKeyEvent
     void (*postKeyEvent) (LibreOfficeKitDocument* pThis,


More information about the Libreoffice-commits mailing list