[Libreoffice-commits] online.git: loolwsd/ChildProcessSession.cpp loolwsd/LOOLKit.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sat Apr 30 14:36:00 UTC 2016


 loolwsd/ChildProcessSession.cpp |   17 ++++++++++-------
 loolwsd/LOOLKit.cpp             |    4 ++--
 2 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit 67fb02d277b9f582486a36bd2392d864516c25f6
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Fri Apr 29 21:52:00 2016 -0400

    loolwsd: formatting, logging, and comments
    
    Change-Id: I0292c39b18d013829d20ef23afcf970eefbe7d42
    Reviewed-on: https://gerrit.libreoffice.org/24523
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/ChildProcessSession.cpp b/loolwsd/ChildProcessSession.cpp
index abd18a2..bb11a1a 100644
--- a/loolwsd/ChildProcessSession.cpp
+++ b/loolwsd/ChildProcessSession.cpp
@@ -1354,15 +1354,18 @@ bool ChildProcessSession::setClientPart(const char* /*buffer*/, int /*length*/,
 
     std::unique_lock<std::recursive_mutex> lock(Mutex);
 
-    if (part == _loKitDocument->pClass->getPart(_loKitDocument))
-        return true;
+    if (part != _loKitDocument->pClass->getPart(_loKitDocument))
+    {
+        if (_multiView)
+            _loKitDocument->pClass->setView(_loKitDocument, _viewId);
 
-    if (_multiView)
-        _loKitDocument->pClass->setView(_loKitDocument, _viewId);
+        _loKitDocument->pClass->setPart(_loKitDocument, part);
+
+        //FIXME: We shouldn't need to do this. The client should
+        // know what to do when they change the part.
+        loKitCallback(LOK_CALLBACK_INVALIDATE_TILES, "EMPTY");
+    }
 
-    _loKitDocument->pClass->setPart(_loKitDocument, part);
-    // invalidate all
-    loKitCallback(LOK_CALLBACK_INVALIDATE_TILES, std::string("EMPTY").c_str());
     return true;
 }
 
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index c62d504..14b2a85 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -720,9 +720,9 @@ private:
             _jailedUrl = uri;
             _isDocPasswordProtected = false;
 
-            Log::debug("Calling documentLoad");
+            Log::debug("Calling lokit::documentLoad.");
             _loKitDocument = _loKit->pClass->documentLoad(_loKit, uri.c_str());
-            Log::debug("documentLoad returned");
+            Log::debug("Returned lokit::documentLoad.");
 
             if (_loKitDocument == nullptr)
             {


More information about the Libreoffice-commits mailing list