summaryrefslogtreecommitdiff
path: root/sd
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 /sd
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 'sd')
-rw-r--r--sd/source/ui/view/drviews2.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 269eb8ac065e..7bcf623b40df 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2251,7 +2251,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);
}
}