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

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sun Jan 10 20:03:14 PST 2016


 loolwsd/ChildProcessSession.hpp |   10 +++++++---
 loolwsd/LOOLKit.cpp             |    9 ++-------
 2 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 2e34e2c8cf3f72fba530718c3f9e02c0e4941f63
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Fri Jan 8 20:45:51 2016 -0500

    loolwsd: public -> private
    
    Change-Id: Ibd662a17389d4a77bc31b84a50bc7a2e3b48bde0
    Reviewed-on: https://gerrit.libreoffice.org/21318
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/ChildProcessSession.hpp b/loolwsd/ChildProcessSession.hpp
index b895296..e6b6600 100644
--- a/loolwsd/ChildProcessSession.hpp
+++ b/loolwsd/ChildProcessSession.hpp
@@ -46,10 +46,11 @@ public:
 
     int getViewId() const  { return _viewId; }
 
-    LibreOfficeKitDocument *_loKitDocument;
-    std::string _docType;
+    const std::string& getDocType() const { return _docType; }
+
+    LibreOfficeKitDocument *getLoKitDocument() const { return _loKitDocument; }
+
     static Poco::NotificationQueue _callbackQueue;
-    static Poco::Mutex _mutex;
 
  protected:
     virtual bool loadDocument(const char *buffer, int length, Poco::StringTokenizer& tokens) override;
@@ -79,6 +80,9 @@ private:
     virtual bool _handleInput(const char *buffer, int length) override;
 
 private:
+    LibreOfficeKitDocument *_loKitDocument;
+    std::string _docType;
+    static Poco::Mutex _mutex;
     const bool _multiView;
     LibreOfficeKit *_loKit;
     const std::string _jailId;
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index d2f2141..990ed74 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -157,9 +157,9 @@ public:
         {
         case LOK_CALLBACK_INVALIDATE_TILES:
             {
-                int curPart = srv->_loKitDocument->pClass->getPart(srv->_loKitDocument);
+                int curPart = srv->getLoKitDocument()->pClass->getPart(srv->getLoKitDocument());
                 srv->sendTextFrame("curpart: part=" + std::to_string(curPart));
-                if (srv->_docType == "text")
+                if (srv->getDocType() == "text")
                 {
                     curPart = 0;
                 }
@@ -346,11 +346,6 @@ public:
     const std::string& getSessionId() const { return _sessionId; }
     std::shared_ptr<WebSocket> getWebSocket() const { return _ws; }
 
-    LibreOfficeKitDocument * getLOKitDocument()
-    {
-        return (_session ? _session->_loKitDocument : nullptr);
-    }
-
     void start()
     {
         _thread.start(*this);


More information about the Libreoffice-commits mailing list