wsd/ClientSession.cpp  |    4 ++--
 wsd/ClientSession.hpp  |    6 +++---
 wsd/DocumentBroker.cpp |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 7019ca8c257b6f4e4b91988243da12236c9de94a
Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk>
Date:   Thu Apr 20 22:17:08 2017 -0400

    wsd: ClientSession's isLoaded -> isViewLoaded
    
    Not to confuse with the DocumentBroker isLoaded,
    this is view-specific. Except for the first view,
    which is identical to the document being loaded,
    subsequent view loadings are independent from,
    though follow, document loading.
    
    Change-Id: I0f21016fa84bf507ca4bc0e7a6c7d0d76b033c60
    Reviewed-on: https://gerrit.libreoffice.org/36761
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 8be60603..11db33af 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -38,7 +38,7 @@ ClientSession::ClientSession(const std::string& id,
     _uriPublic(uriPublic),
     _isDocumentOwner(false),
     _isAttached(false),
-    _isLoaded(false)
+    _isViewLoaded(false)
 {
     const size_t curConnections = ++LOOLWSD::NumConnections;
     LOG_INF("ClientSession ctor [" << getName() << "], current number of 
connections: " << curConnections);
@@ -632,7 +632,7 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
         }
         else if (tokens[0] == "status:")
         {
-            setLoaded();
+            setViewLoaded();
             docBroker->setLoaded();
 
             // Forward the status response to the client.
diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp
index 81c55c70..b0eefecf 100644
--- a/wsd/ClientSession.hpp
+++ b/wsd/ClientSession.hpp
@@ -39,8 +39,8 @@ public:
     void setAttached() { _isAttached = true; }
 
     /// Returns true if this session has loaded a view (i.e. we got status 
message).
-    bool isLoaded() const { return _isLoaded; }
-    void setLoaded() { _isLoaded = true; }
+    bool isViewLoaded() const { return _isViewLoaded; }
+    void setViewLoaded() { _isViewLoaded = true; }
 
     const std::string getUserId() const { return _userId; }
     const std::string getUserName() const {return _userName; }
@@ -148,7 +148,7 @@ private:
     bool _isAttached;
 
     /// If we have loaded a view.
-    bool _isLoaded;
+    bool _isViewLoaded;
 
     /// Wopi FileInfo object
     std::unique_ptr<WopiStorage::WOPIFileInfo> _wopiFileInfo;
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index fd3a6ea9..a2b90d50 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1216,7 +1216,7 @@ void DocumentBroker::destroyIfLastEditor(const 
std::string& id)
         for (const auto& it : _sessions)
         {
             if (it.second->getId() != id &&
-                it.second->isLoaded() &&
+                it.second->isViewLoaded() &&
                 !it.second->isReadOnly())
             {
                 // Found another editable.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to