summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorgokaysatir <gokaysatir@collabora.com>2020-10-07 12:57:13 +0300
committerJan Holesovsky <kendy@collabora.com>2020-12-10 09:27:22 +0100
commit56f708b3449230c328f3640709217f9aa802e4c1 (patch)
tree357091b8a58a16e389ccdebe246f576b69f22092 /vcl/source/app
parent4d6f00a097e68715c63c3388b1183bf08fa8cdbb (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/+/104058 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'vcl/source/app')
-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 8e33aeefc55a..bc3e64573ab2 100644
--- a/vcl/source/app/unohelp2.cxx
+++ b/vcl/source/app/unohelp2.cxx
@@ -41,7 +41,7 @@ namespace vcl::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::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& )