summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-01-23 19:37:51 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2017-01-23 20:49:05 +0100
commitbf110d40efcc79efb9247fdce5d2f54bafa6550b (patch)
tree4e9fad96d91adfd5159b009b430a64d4a6863bd6 /linguistic
parent75d8b305bbc1c2377f23361ecd64816a350baa4c (diff)
Change all Idle* LINKs to be Timer*
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles Link in the Timer class. Now there are two possible solution: 1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or 2. split the inheritance of Idle from Timer again to maintain different Link<>s and move all common code into a TimerBase. While the 1st is more correct, the 2nd has a better indicator for Idles. This implements the first solution. And while at it, this also converts all call sites of SetTimeoutHdl and SetIdleHdl to SetInvokeHandler and gets rid of some local Link objects, which are just passed to the SetInvokeHandler call. It also introduces ClearInvokeHandler() and replaces the respective call sites of SetInvokeHandler( Link<Timer *, void>() ). Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/lngsvcmgr.cxx4
-rw-r--r--linguistic/source/lngsvcmgr.hxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index e7028ee9ff5f..4cc4fa7c8b9f 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -448,7 +448,7 @@ LngSvcMgr::LngSvcMgr()
UpdateAll();
aUpdateIdle.SetPriority(TaskPriority::LOWEST);
- aUpdateIdle.SetIdleHdl(LINK(this, LngSvcMgr, updateAndBroadcast));
+ aUpdateIdle.SetInvokeHandler(LINK(this, LngSvcMgr, updateAndBroadcast));
// request to be notified if an extension has been added/removed
uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
@@ -496,7 +496,7 @@ void LngSvcMgr::modified(const lang::EventObject&)
//needs to be run in the main thread because
//utl::ConfigChangeListener_Impl::changesOccurred grabs the SolarMutex and we
//get notified that an extension was added from an extension manager thread
-IMPL_LINK_NOARG(LngSvcMgr, updateAndBroadcast, Idle *, void)
+IMPL_LINK_NOARG(LngSvcMgr, updateAndBroadcast, Timer *, void)
{
osl::MutexGuard aGuard( GetLinguMutex() );
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index 348ca0905a0e..75b4c1ca1b1e 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -127,7 +127,7 @@ class LngSvcMgr :
void UpdateAll();
void stopListening();
- DECL_LINK( updateAndBroadcast, Idle*, void );
+ DECL_LINK( updateAndBroadcast, Timer*, void );
public:
LngSvcMgr();