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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Apr 26 13:33:16 UTC 2019


 bundled/include/LibreOfficeKit/LibreOfficeKit.h      |    2 +-
 bundled/include/LibreOfficeKit/LibreOfficeKit.hxx    |    4 ++--
 bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h |    3 ++-
 kit/ChildSession.cpp                                 |    4 +++-
 4 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 6bb4edd62ce5d20ef0c2ddc648acd17f35bf1008
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Apr 18 18:22:18 2019 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Fri Apr 26 15:32:58 2019 +0200

    wsd: allow paste content to tunneled dialog
    
    Change-Id: I32fabaa533a0e9d853226b329d2d8b1c489dd776
    Reviewed-on: https://gerrit.libreoffice.org/70960
    Reviewed-by: Henry Castro <hcastro at collabora.com>
    Tested-by: Henry Castro <hcastro at collabora.com>

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;
 }


More information about the Libreoffice-commits mailing list