summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorgokaysatir <gokaysatir@collabora.com>2020-10-07 12:57:13 +0300
committerJan Holesovsky <kendy@collabora.com>2020-10-08 13:56:55 +0200
commitca84daab26d4fec1b43be81478ef629f8c1be7cf (patch)
treee1405659d6f17514b4e96f88667154873af6c06c /vcl
parentbbeb488ce5de2b6fa361b3e623b838e0237b128d (diff)
Online: "Copy hyperlink location" feature improvement.
Lambda functions are replaced with class pointers. Change-Id: I48628d3105533aad2463bd8ade1f65cf5b154b0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104054 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/unohelp2.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/app/unohelp2.cxx b/vcl/source/app/unohelp2.cxx
index 5cf0744467e5..cb7dc8f7d323 100644
--- a/vcl/source/app/unohelp2.cxx
+++ b/vcl/source/app/unohelp2.cxx
@@ -41,7 +41,7 @@ namespace vcl { namespace unohelper {
void TextDataObject::CopyStringTo( const OUString& rContent,
const uno::Reference< datatransfer::clipboard::XClipboard >& rxClipboard,
- std::function<void (int, const char*)> *callback)
+ const vcl::ILibreOfficeKitNotifier* pNotifier)
{
SAL_WARN_IF( !rxClipboard.is(), "vcl", "TextDataObject::CopyStringTo: invalid clipboard!" );
if ( !rxClipboard.is() )
@@ -58,14 +58,14 @@ namespace vcl { namespace unohelper {
if( xFlushableClipboard.is() )
xFlushableClipboard->flushClipboard();
- if (callback != nullptr && comphelper::LibreOfficeKit::isActive())
+ if (pNotifier != nullptr && comphelper::LibreOfficeKit::isActive())
{
boost::property_tree::ptree aTree;
aTree.put("content", rContent);
aTree.put("mimeType", "text/plain");
std::stringstream aStream;
boost::property_tree::write_json(aStream, aTree);
- (*callback)(LOK_CALLBACK_CLIPBOARD_CHANGED, aStream.str().c_str());
+ pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_CLIPBOARD_CHANGED, aStream.str().c_str());
}
}
catch( const uno::Exception& )