summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2025-01-22 12:54:21 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2025-01-23 12:40:26 +0100
commitb811b283c254fb48d8991576dfee0bae3dc322dd (patch)
tree51b484ce368c8f1477d9c85fca5aa99f4abb885b /sfx2
parent10d8402957fe7b8a148a2abd719b7f2cb15f05a7 (diff)
Extend the Link DBG_UTIL support to non-member function Links
...so that they don't report "unknown" (and make empty links report "empty" instead, for clarification). This introduces a new LINK_NONMEMBER macro; the non-default Link ctor should no longer be used directly, so make it private. Change-Id: I4ae99758de57adb8569ce98cb3824e875b26c959 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180593 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/shell.cxx4
-rw-r--r--sfx2/source/dialog/backingwindow.cxx2
-rw-r--r--sfx2/source/view/lokhelper.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index f87fbb7d8282..f5899ecccc36 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -429,7 +429,7 @@ void SfxShell::ExecuteSlot( SfxRequest& rReq, bool bAsync )
{
if( !pImpl->pExecuter )
pImpl->pExecuter.reset( new svtools::AsynchronLink(
- Link<void*,void>( this, ShellCall_Impl ) ) );
+ LINK_NONMEMBER( this, ShellCall_Impl ) ) );
pImpl->pExecuter->Call( new SfxRequest( rReq ) );
}
}
@@ -672,7 +672,7 @@ void SfxShell::UIFeatureChanged()
// something may get stuck in the bunkered tools. Asynchronous call to
// prevent recursion.
if ( !pImpl->pUpdater )
- pImpl->pUpdater.reset( new svtools::AsynchronLink( Link<void*,void>( this, DispatcherUpdate_Impl ) ) );
+ pImpl->pUpdater.reset( new svtools::AsynchronLink( LINK_NONMEMBER( this, DispatcherUpdate_Impl ) ) );
// Multiple views allowed
pImpl->pUpdater->Call( pFrame->GetDispatcher(), true );
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index d351a79beec2..32a3c4c5f0ee 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -801,7 +801,7 @@ void BackingWindow::dispatchURL( const OUString& i_rURL,
if ( xDispatch.is() )
{
std::unique_ptr<ImplDelayedDispatch> pDisp(new ImplDelayedDispatch( xDispatch, std::move(aDispatchURL), i_rArgs ));
- if( Application::PostUserEvent( Link<void*,void>( nullptr, implDispatchDelayed ), pDisp.get() ) )
+ if( Application::PostUserEvent( LINK_NONMEMBER( nullptr, implDispatchDelayed ), pDisp.get() ) )
pDisp.release();
}
}
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 0ea04c16238f..f025e2598411 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -1231,7 +1231,7 @@ namespace
LOKPostAsyncEvent(pEvent, nullptr);
}
else
- Application::PostUserEvent(Link<void*, void>(pEvent, LOKPostAsyncEvent));
+ Application::PostUserEvent(LINK_NONMEMBER(pEvent, LOKPostAsyncEvent));
}
}