From 19a0fbf456129e011cb9ab9ab6ab730cba274bbd Mon Sep 17 00:00:00 2001 From: gokaysatir Date: Tue, 22 Sep 2020 13:00:44 +0300 Subject: 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 Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103872 Tested-by: Jenkins --- sc/source/ui/view/editsh.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sc/source/ui') 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 xClipboard = pEditView->GetWindow()->GetClipboard(); - vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard); + + if (comphelper::LibreOfficeKit::isActive()) + { + std::function 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; -- cgit