[Libreoffice-commits] online.git: 2 commits - .gitignore kit/ChildSession.cpp kit/Kit.cpp kit/KitHelper.hpp tools/KitClient.cpp wsd/protocol.txt

Pranav Kant pranavk at collabora.co.uk
Fri Jan 27 18:10:20 UTC 2017


 .gitignore           |    4 ++++
 kit/ChildSession.cpp |    3 +++
 kit/Kit.cpp          |    6 ++++--
 kit/KitHelper.hpp    |    2 ++
 tools/KitClient.cpp  |    1 +
 wsd/protocol.txt     |    5 +++++
 6 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 440ca8e2f73d904c2abc5ac8d4803b0b38ec6252
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Mon Jan 23 22:31:57 2017 +0530

    Initial support for comments lok api
    
    Change-Id: I1fc48e245a47f7b8d4260009d8c377c30d0b8820

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 0489bd9..4be66f2 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1206,6 +1206,9 @@ void ChildSession::loKitCallback(const int type, const std::string& payload)
     case LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED:
         sendTextFrame("redlinetablemodified: " + payload);
         break;
+    case LOK_CALLBACK_COMMENT:
+        sendTextFrame("comment: " + payload);
+        break;
     default:
         LOG_ERR("Unknown callback event (" << type << "): " << payload);
     }
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 16e20ac..4401a6c 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -1154,7 +1154,8 @@ private:
 
             const auto flags = LOK_FEATURE_DOCUMENT_PASSWORD
                              | LOK_FEATURE_DOCUMENT_PASSWORD_TO_MODIFY
-                             | LOK_FEATURE_PART_IN_INVALIDATION_CALLBACK;
+                             | LOK_FEATURE_PART_IN_INVALIDATION_CALLBACK
+                             | LOK_FEATURE_NO_TILED_ANNOTATIONS;
             _loKit->setOptionalFeatures(flags);
 
             // Save the provided password with us and the jailed url
@@ -1809,7 +1810,8 @@ void lokit_main(const std::string& childRoot,
 
         const auto flags = LOK_FEATURE_DOCUMENT_PASSWORD
                            | LOK_FEATURE_DOCUMENT_PASSWORD_TO_MODIFY
-                           | LOK_FEATURE_PART_IN_INVALIDATION_CALLBACK;
+                           | LOK_FEATURE_PART_IN_INVALIDATION_CALLBACK
+                           | LOK_FEATURE_NO_TILED_ANNOTATIONS;
         loKit->setOptionalFeatures(flags);
         loKitDoc.reset(loKit->documentLoad(uri.c_str()));
         if (!loKitDoc || !loKitDoc->get())
diff --git a/kit/KitHelper.hpp b/kit/KitHelper.hpp
index 7afa22a..038a386 100644
--- a/kit/KitHelper.hpp
+++ b/kit/KitHelper.hpp
@@ -108,6 +108,8 @@ namespace LOKitHelper
             return "VIEW_CURSOR_VISIBLE";
         case LOK_CALLBACK_VIEW_LOCK:
             return "VIEW_LOCK";
+        case LOK_CALLBACK_COMMENT:
+            return "COMMENT";
         }
 
         return std::to_string(type);
diff --git a/tools/KitClient.cpp b/tools/KitClient.cpp
index dcc2ed3..33eec54 100644
--- a/tools/KitClient.cpp
+++ b/tools/KitClient.cpp
@@ -74,6 +74,7 @@ extern "C"
             CASE(VIEW_LOCK);
             CASE(REDLINE_TABLE_SIZE_CHANGED);
             CASE(REDLINE_TABLE_ENTRY_MODIFIED);
+            CASE(COMMENT);
 #undef CASE
         }
         std::cout << " payload: " << payload << std::endl;
diff --git a/wsd/protocol.txt b/wsd/protocol.txt
index bb135e9..2e63de2 100644
--- a/wsd/protocol.txt
+++ b/wsd/protocol.txt
@@ -375,6 +375,11 @@ redlinetablechanged:
     Signals that the redlines table has been modified.
     Redlines are used for tracking changes.
 
+comment:
+
+    Signals that comment has either been added, removed or modified. See
+    LOK_CALLBACK_COMMENT for JSON structure.
+
 stats: <key> <value>
 
     Contains statistical data. Eg: 'stats: wopiloadduration 5' means that
commit 8df085fbffb832ff58345b5b5698c44f5347f226
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Mon Jan 23 22:25:36 2017 +0530

    .gitignore: Ignore TAGS file
    
    Change-Id: I23a1de867ea623e0355688caab6fba5b3d5d2474

diff --git a/.gitignore b/.gitignore
index adfe2e1..14fcf08 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,3 +57,7 @@ loolstress
 loolforkit-nocaps
 loadtest
 unittest
+
+# make tags
+TAGS
+test/TAGS


More information about the Libreoffice-commits mailing list