[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - desktop/source include/LibreOfficeKit

Marco Cecchetti marco.cecchetti at collabora.com
Thu Sep 15 13:18:14 UTC 2016


 desktop/source/lib/init.cxx               |   19 +------------------
 include/LibreOfficeKit/LibreOfficeKit.h   |    4 ----
 include/LibreOfficeKit/LibreOfficeKit.hxx |   11 -----------
 3 files changed, 1 insertion(+), 33 deletions(-)

New commits:
commit c0dd075d52409031876f5bc3923062ba5847fd53
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date:   Wed Sep 14 10:26:55 2016 +0200

    Revert "LOK: we use callbacks latch for not missing messages sent very early"
    
    This reverts commit bbae556d12e4edf7795b0b5643df77fd8cdbdacd.
    
    Change-Id: If1370751b612ff06ef5be13e8a4017af7dc34a7c
    Reviewed-on: https://gerrit.libreoffice.org/28908
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 582c52c..a4ec903 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -392,6 +392,7 @@ static void doc_getDocumentSize(LibreOfficeKitDocument* pThis,
                                 long* pHeight);
 static void doc_initializeForRendering(LibreOfficeKitDocument* pThis,
                                        const char* pArguments);
+
 static void doc_registerCallback(LibreOfficeKitDocument* pThis,
                                 LibreOfficeKitCallback pCallback,
                                 void* pData);
@@ -443,9 +444,6 @@ static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
                           int* pFontWidth,
                           int* pFontHeight);
 static char* doc_getPartHash(LibreOfficeKitDocument* pThis, int nPart);
-static void doc_setCallbackLatch(LibreOfficeKitDocument* pThis,
-                                 bool bCallbackLatch);
-
 
 LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent)
     : mxComponent(xComponent)
@@ -492,8 +490,6 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone
         m_pDocumentClass->renderFont = doc_renderFont;
         m_pDocumentClass->getPartHash = doc_getPartHash;
 
-        m_pDocumentClass->setCallbackLatch = doc_setCallbackLatch;
-
         gDocumentClass = m_pDocumentClass;
     }
     pClass = m_pDocumentClass.get();
@@ -2369,19 +2365,6 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/,
     return nullptr;
 }
 
-static void doc_setCallbackLatch(LibreOfficeKitDocument* pThis, bool bCallbackLatch)
-{
-    SolarMutexGuard aGuard;
-    LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis);
-
-    int nView = SfxLokHelper::getView();
-    if (nView < 0)
-        return;
-
-    if (pDocument->mpCallbackFlushHandlers[nView])
-        pDocument->mpCallbackFlushHandlers[nView]->setEventLatch(bCallbackLatch);
-}
-
 static char* lo_getError (LibreOfficeKit *pThis)
 {
     LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 53162a3..81d65c1 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -244,10 +244,6 @@ struct _LibreOfficeKitDocumentClass
                            const int nTileWidth,
                            const int nTileHeight);
 
-    /// @see lok::Document::setCallbackLatch().
-    void (*setCallbackLatch) (LibreOfficeKitDocument* pThis,
-                              bool bCallbackLatch);
-
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index d2d6877..aae5f38 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -435,17 +435,6 @@ public:
                                             nTileWidth, nTileHeight);
     }
 
-    /**
-     * 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)
-    {
-        mpDoc->pClass->setCallbackLatch(mpDoc, bCallbackLatch);
-    }
-
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 


More information about the Libreoffice-commits mailing list