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

Pranav Kant pranavk at collabora.co.uk
Mon Aug 29 13:10:26 UTC 2016


 loolwsd/ChildSession.cpp |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit c67c85793b8e925ed8e64dbd2f8f810154480a39
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Mon Aug 29 17:03:49 2016 +0530

    loolwsd: Inform opening view about existing views
    
    Change-Id: I84de6f78ffa21f3018e987e9e0bfeafd0cfb2b52

diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index b9a2f49..762ffea 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -345,6 +345,15 @@ bool ChildSession::loadDocument(const char * /*buffer*/, int /*length*/, StringT
         return false;
     }
 
+    // Inform this view of other views
+    for (const auto viewId: _docManager.getViewIds())
+    {
+        if (viewId != _viewId)
+        {
+            sendTextFrame("addview: " + std::to_string(viewId));
+        }
+    }
+
     Log::info("Loaded session " + getId());
     return true;
 }


More information about the Libreoffice-commits mailing list