[Libreoffice-commits] online.git: bundled/include kit/ChildSession.cpp

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 27 20:39:22 UTC 2019


 bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h |   24 +++++++++++++++++++
 kit/ChildSession.cpp                                 |    6 ++++
 2 files changed, 30 insertions(+)

New commits:
commit 022224b7b4bc6195cc9a7e6f637edd86574f0059
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Sep 27 12:50:12 2019 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Sep 27 22:39:04 2019 +0200

    jsdialogs: introduce LOK_CALLBACK_JSDIALOG enum value
    
    Change-Id: Ib1175dedcc8b6c66a10f81915da07b3bcfe0b3f1
    Reviewed-on: https://gerrit.libreoffice.org/79717
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Tested-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 44bf83eab..40696da13 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -685,6 +685,26 @@ typedef enum
      * cell.
      */
     LOK_CALLBACK_TABLE_SELECTED = 44,
+
+    /*
+     * Show reference marks from payload.
+     *
+     * Example payload:
+     * {
+     *     "marks": [
+     *         { "rectangle": "3825, 3315, 1245, 2010", "color": "0000ff", "part": "0" },
+     *         { "rectangle": "8925, 4335, 2520, 735", "color": "ff0000", "part": "0" },
+     *         ...
+     *     ]
+     * }
+     */
+    LOK_CALLBACK_REFERENCE_MARKS = 45,
+
+    /**
+     * Callback related to native dialogs generated in JavaScript from
+     * the description.
+     */
+    LOK_CALLBACK_JSDIALOG = 46,
 }
 LibreOfficeKitCallbackType;
 
@@ -803,6 +823,10 @@ static inline const char* lokCallbackTypeToString(int nType)
         return "LOK_CALLBACK_CELL_AUTO_FILL_AREA";
     case LOK_CALLBACK_TABLE_SELECTED:
         return "LOK_CALLBACK_TABLE_SELECTED";
+    case LOK_CALLBACK_REFERENCE_MARKS:
+        return "LOK_CALLBACK_REFERENCE_MARKS";
+    case LOK_CALLBACK_JSDIALOG:
+        return "LOK_CALLBACK_JSDIALOG";
     }
 
     assert(!"Unknown LibreOfficeKitCallbackType type.");
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 7e5d87c4a..b201e4d34 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -2394,6 +2394,12 @@ void ChildSession::loKitCallback(const int type, const std::string& payload)
     case LOK_CALLBACK_TABLE_SELECTED:
         sendTextFrame("tableselected: " + payload);
         break;
+    case LOK_CALLBACK_REFERENCE_MARKS:
+        // TODO
+        break;
+    case LOK_CALLBACK_JSDIALOG:
+        sendTextFrame("jsdialog: " + payload);
+        break;
 
 #if !ENABLE_DEBUG
     // we want a compilation-time failure in the debug builds; but ERR in the


More information about the Libreoffice-commits mailing list