summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-rw-r--r--sc/source/ui/view/editsh.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 61888c663ef4..03b282f942fb 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) { pViewData->GetViewShell()->libreOfficeKitViewCallback(callbackType, text); } ;
+ vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, &callback);
+ }
+ else
+ vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, nullptr);
}
}
break;