summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorgokaysatir <gokaysatir@collabora.com>2020-09-22 13:00:44 +0300
committerGökay ŞATIR <gokaysatir@collabora.com>2020-10-06 18:47:39 +0200
commit19a0fbf456129e011cb9ab9ab6ab730cba274bbd (patch)
tree6037565ea6a511144fe5f6aa4528ce5e6bd86611 /include
parent1f8fbff65d91f1d8297b94dd67fffceb7475dce5 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103872 Tested-by: Jenkins
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 750e64f529f9..9a0eb01ca840 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 a95474417cf6..91c4ce6ce0e2 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::sun::star::datatransfer::clipboard {
class XClipboard;
@@ -56,7 +59,8 @@ namespace vcl::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
);
};