diff options
author | Henry Castro <hcastro@collabora.com> | 2019-04-18 18:22:18 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2019-04-26 15:32:58 +0200 |
commit | 6bb4edd62ce5d20ef0c2ddc648acd17f35bf1008 (patch) | |
tree | 6ae71d04355cb2475593008a3026676f5a1f88b1 | |
parent | bf520d5fa5d0595ddc3d06402861a9ac3bf51f95 (diff) |
wsd: allow paste content to tunneled dialog
Change-Id: I32fabaa533a0e9d853226b329d2d8b1c489dd776
Reviewed-on: https://gerrit.libreoffice.org/70960
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
-rw-r--r-- | bundled/include/LibreOfficeKit/LibreOfficeKit.h | 2 | ||||
-rw-r--r-- | bundled/include/LibreOfficeKit/LibreOfficeKit.hxx | 4 | ||||
-rw-r--r-- | bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h | 3 | ||||
-rw-r--r-- | kit/ChildSession.cpp | 4 |
4 files changed, 8 insertions, 5 deletions
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/bundled/include/LibreOfficeKit/LibreOfficeKit.h index 62bd3c429..e4e96483c 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h +++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h @@ -294,7 +294,7 @@ struct _LibreOfficeKitDocumentClass const int width, const int height); /// @see lok::Document::postWindow(). - void (*postWindow) (LibreOfficeKitDocument* pThis, unsigned nWindowId, int nAction); + void (*postWindow) (LibreOfficeKitDocument* pThis, unsigned nWindowId, int nAction, const char* pData); /// @see lok::Document::postWindowKeyEvent(). void (*postWindowKeyEvent) (LibreOfficeKitDocument* pThis, diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx index 7027298a1..47983e68f 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -188,9 +188,9 @@ public: * * @param nWindowid */ - void postWindow(unsigned nWindowId, int nAction) + void postWindow(unsigned nWindowId, int nAction, const char* pData) { - return mpDoc->pClass->postWindow(mpDoc, nWindowId, nAction); + return mpDoc->pClass->postWindow(mpDoc, nWindowId, nAction, pData); } /** diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h index ef2482898..33d235af8 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -42,7 +42,8 @@ LibreOfficeKitTileMode; typedef enum { - LOK_WINDOW_CLOSE + LOK_WINDOW_CLOSE, + LOK_WINDOW_PASTE } LibreOfficeKitWindowAction; diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index 7a98bfe2d..d8255442e 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -1358,7 +1358,9 @@ bool ChildSession::sendWindowCommand(const char* /*buffer*/, int /*length*/, con getLOKitDocument()->setView(_viewId); if (tokens.size() > 2 && tokens[2] == "close") - getLOKitDocument()->postWindow(winId, LOK_WINDOW_CLOSE); + getLOKitDocument()->postWindow(winId, LOK_WINDOW_CLOSE, nullptr); + else if (tokens.size() > 3 && tokens[2] == "paste") + getLOKitDocument()->postWindow(winId, LOK_WINDOW_PASTE, tokens[3].c_str()); return true; } |