bundled/include/LibreOfficeKit/LibreOfficeKit.h | 5 ---- bundled/include/LibreOfficeKit/LibreOfficeKit.hxx | 11 --------- kit/ChildSession.cpp | 25 ---------------------- kit/ChildSession.hpp | 1 loleaflet/src/control/Control.JSDialogBuilder.js | 4 --- loleaflet/src/control/Control.LokDialog.js | 2 - wsd/ClientSession.cpp | 7 ------ 7 files changed, 3 insertions(+), 52 deletions(-)
New commits: commit ca4351e6ef5be85378e4a88833510f326c37c06c Author: Szymon Kłos <[email protected]> AuthorDate: Tue Oct 15 14:06:08 2019 +0200 Commit: Szymon Kłos <[email protected]> CommitDate: Tue Oct 15 14:06:08 2019 +0200 Revert "jsdialogs: send events to the core" core not yet ready This reverts commit 80ecaa60f62aa41584ef1ab8b040806f8d92a0a7. diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/bundled/include/LibreOfficeKit/LibreOfficeKit.h index 2e846c7fa..6060b015b 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h +++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h @@ -199,11 +199,6 @@ struct _LibreOfficeKitDocumentClass int nButtons, int nModifier); - /// @see lok::Document::sendDialogEvent - void (*sendDialogEvent) (LibreOfficeKitDocument* pThis, - unsigned nLOKWindowId, - const char* pArguments); - /// @see lok::Document::postUnoCommand void (*postUnoCommand) (LibreOfficeKitDocument* pThis, const char* pCommand, diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx index 26093f387..a695c4113 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -303,17 +303,6 @@ public: } /** - * Posts a dialog event for the window with given id - * - * @param nWindowId id of the window to notify - * @param pArguments arguments of the event. - */ - void sendDialogEvent(unsigned nWindowId, const char* pArguments = NULL) - { - mpDoc->pClass->sendDialogEvent(mpDoc, nWindowId, pArguments); - } - - /** * Posts an UNO command to the document. * * Example argument string: diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index 05c9ba772..cd38ec7a7 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -42,7 +42,6 @@ #include <Util.hpp> #include <Unit.hpp> #include <Clipboard.hpp> -#include <string> using Poco::JSON::Object; using Poco::JSON::Parser; @@ -296,8 +295,7 @@ bool ChildSession::_handleInput(const char *buffer, int length) tokens[0] == "uploadsigneddocument" || tokens[0] == "exportsignanduploaddocument" || tokens[0] == "rendershapeselection" || - tokens[0] == "removetextcontext" || - tokens[0] == "dialogevent"); + tokens[0] == "removetextcontext"); if (tokens[0] == "clientzoom") { @@ -421,10 +419,6 @@ bool ChildSession::_handleInput(const char *buffer, int length) { return removeTextContext(buffer, length, tokens); } - else if (tokens[0] == "dialogevent") - { - return dialogEvent(buffer, length, tokens); - } else { assert(false && "Unknown command token."); @@ -1381,23 +1375,6 @@ bool ChildSession::mouseEvent(const char* /*buffer*/, int /*length*/, return true; } -bool ChildSession::dialogEvent(const char* /*buffer*/, int /*length*/, const std::vector<std::string>& tokens) -{ - if (tokens.size() <= 2) - { - sendTextFrame("error: cmd=dialogevent kind=syntax"); - return false; - } - - getLOKitDocument()->setView(_viewId); - - unsigned nLOKWindowId = std::stoi(tokens[1].c_str()); - getLOKitDocument()->sendDialogEvent(nLOKWindowId, - Poco::cat(std::string(" "), tokens.begin() + 2, tokens.end()).c_str()); - - return true; -} - bool ChildSession::unoCommand(const char* /*buffer*/, int /*length*/, const std::vector<std::string>& tokens) { if (tokens.size() <= 1) diff --git a/kit/ChildSession.hpp b/kit/ChildSession.hpp index 971b4158b..88166a0c4 100644 --- a/kit/ChildSession.hpp +++ b/kit/ChildSession.hpp @@ -259,7 +259,6 @@ private: bool dialogKeyEvent(const char* buffer, int length, const std::vector<std::string>& tokens); bool mouseEvent(const char* buffer, int length, const std::vector<std::string>& tokens, const LokEventTargetEnum target); bool gestureEvent(const char* buffer, int length, const std::vector<std::string>& tokens); - bool dialogEvent(const char* buffer, int length, const std::vector<std::string>& tokens); bool unoCommand(const char* buffer, int length, const std::vector<std::string>& tokens); bool selectText(const char* buffer, int length, const std::vector<std::string>& tokens); bool selectGraphic(const char* buffer, int length, const std::vector<std::string>& tokens); diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index a94fbc778..aee7a23f5 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -91,12 +91,10 @@ L.Control.JSDialogBuilder = L.Control.extend({ // by default send new state to the core _defaultCallbackHandler: function(objectType, eventType, object, data, builder) { - console.debug('control: \'' + objectType + '\' id:\'' + object.id + '\' event: \'' + eventType + '\' state: \'' + data + '\''); + console.debug('control: \'' + objectType + '\' event: \'' + eventType + '\' state: \'' + data + '\''); if (objectType == 'toolbutton' && eventType == 'click') { builder.map.sendUnoCommand(data); - } else { - builder.map._socket.sendMessage('dialogevent ' + window.sidebarId + ' ' + object.id); } }, diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 1c1c88eae..b346eb3f2 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -263,8 +263,6 @@ L.Control.LokDialog = L.Control.extend({ } else if (e.winType === 'deck') { if (!window.mode.isMobile()) { this._launchSidebar(e.id, width, height); - } else { - window.sidebarId = e.id; } } else if (e.winType === 'child') { var parentId = parseInt(e.parentId); diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp index 996273218..9e30fe65b 100644 --- a/wsd/ClientSession.cpp +++ b/wsd/ClientSession.cpp @@ -427,8 +427,7 @@ bool ClientSession::_handleInput(const char *buffer, int length) tokens[0] != "removesession" && tokens[0] != "renamefile" && tokens[0] != "resizewindow" && - tokens[0] != "removetextcontext" && - tokens[0] != "dialogevent") + tokens[0] != "removetextcontext") { LOG_ERR("Session [" << getId() << "] got unknown command [" << tokens[0] << "]."); sendTextFrame("error: cmd=" + tokens[0] + " kind=unknown"); @@ -697,10 +696,6 @@ bool ClientSession::_handleInput(const char *buffer, int length) docBroker->saveAsToStorage(getId(), "", wopiFilename, true); return true; } - else if (tokens[0] == "dialogevent") - { - return forwardToChild(firstLine, docBroker); - } else { if (tokens[0] == "key") _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
