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 /sd | |
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 'sd')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 8f511aab3922..f32acb5d3182 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -2250,7 +2250,18 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { uno::Reference<datatransfer::clipboard::XClipboard> xClipboard = pOutView->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) + { + SfxViewFrame* pFrame = GetViewFrame(); + pFrame->GetViewShell()->libreOfficeKitViewCallback(callbackType, text); + }; + vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, &callback); + } + else + vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard); } } |