summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorgokaysatir <gokaysatir@collabora.com>2020-09-22 13:00:44 +0300
committerJan Holesovsky <kendy@collabora.com>2020-09-30 15:08:16 +0200
commit9162014433f1c40b88e1093dfb458436e8ecf007 (patch)
tree61fdc53b6c0bdded66eec72cb093cb4c199a5dcd /include
parente3970b941db8783692beb606b7d9de4f833cb31b (diff)
Online: Copy hyperlink location. / Core side.
Payload format is added to LOK_CALLBACK_CLIPBOARD_CHANGED. Clipboard changed event is not fired when "copy hyperlink location" command is issued. So i added a call to LOK_CALLBACK_CLIPBOARD_CHANGED inside TextDataObject::CopyStringTo function. Change-Id: I8157572288da88b5522662e13abe151ef8548b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103164 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h7
-rw-r--r--include/vcl/unohelp2.hxx6
2 files changed, 8 insertions, 5 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index cabea69a29be..79cc937e349c 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -644,10 +644,9 @@ typedef enum
* Notification that the clipboard contents have changed.
* Typically fired in response to copying to clipboard.
*
- * The payload currently is empty and it's up to the
- * client to get the contents, if necessary. However,
- * in the future the contents might be included for
- * convenience.
+ * Payload is optional. When payload is empty, Online gets string from selected text.
+ * Payload format is JSON.
+ * Example: { "mimeType": "string", "content": "some content" }
*/
LOK_CALLBACK_CLIPBOARD_CHANGED = 38,
diff --git a/include/vcl/unohelp2.hxx b/include/vcl/unohelp2.hxx
index 27ab0973dd37..219244964eee 100644
--- a/include/vcl/unohelp2.hxx
+++ b/include/vcl/unohelp2.hxx
@@ -25,6 +25,9 @@
#include <rtl/ustring.hxx>
#include <osl/mutex.hxx>
#include <vcl/dllapi.h>
+#include <comphelper/lok.hxx>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <boost/property_tree/json_parser.hpp>
namespace com { namespace sun { namespace star { namespace datatransfer { namespace clipboard {
class XClipboard;
@@ -56,7 +59,8 @@ namespace vcl { namespace unohelper {
/// copies a given string to a given clipboard
static void CopyStringTo(
const OUString& rContent,
- const css::uno::Reference< css::datatransfer::clipboard::XClipboard >& rxClipboard
+ const css::uno::Reference< css::datatransfer::clipboard::XClipboard >& rxClipboard,
+ std::function<void (int, const char*)> *callback = nullptr
);
};