diff options
author | gokaysatir <gokaysatir@collabora.com> | 2020-09-22 13:00:44 +0300 |
---|---|---|
committer | Gökay ŞATIR <gokaysatir@collabora.com> | 2020-10-06 18:47:39 +0200 |
commit | 19a0fbf456129e011cb9ab9ab6ab730cba274bbd (patch) | |
tree | 6037565ea6a511144fe5f6aa4528ce5e6bd86611 /sc/source | |
parent | 1f8fbff65d91f1d8297b94dd67fffceb7475dce5 (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 'sc/source')
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 9e8768fe27d6..83e4adaf815f 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -641,7 +641,14 @@ void ScEditShell::Execute( SfxRequest& rReq ) { uno::Reference<datatransfer::clipboard::XClipboard> xClipboard = pEditView->GetWindow()->GetClipboard(); - vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard); + + if (comphelper::LibreOfficeKit::isActive()) + { + std::function<void (int, const char*)> callback = [&] (int callbackType, const char* text) { rViewData.GetViewShell()->libreOfficeKitViewCallback(callbackType, text); } ; + vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, &callback); + } + else + vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, nullptr); } } break; |