summaryrefslogtreecommitdiff
path: root/forms
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 /forms
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 'forms')
-rw-r--r--forms/source/component/DatabaseForm.cxx2
-rw-r--r--forms/source/component/ListBox.cxx4
-rw-r--r--forms/source/component/ListBox.hxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index dfa72246951a..2cad1f8431fa 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -2534,7 +2534,7 @@ void ODatabaseForm::impl_createLoadTimer()
OSL_PRECOND( m_pLoadTimer == nullptr, "ODatabaseForm::impl_createLoadTimer: timer already exists!" );
m_pLoadTimer = new Timer("DatabaseFormLoadTimer");
m_pLoadTimer->SetTimeout(100);
- m_pLoadTimer->SetTimeoutHdl(LINK(this,ODatabaseForm,OnTimeout));
+ m_pLoadTimer->SetInvokeHandler(LINK(this,ODatabaseForm,OnTimeout));
}
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 8a7276c8dd31..6874feb25059 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -1799,7 +1799,7 @@ namespace frm
doSetDelegator();
m_aChangeIdle.SetPriority(TaskPriority::LOWEST);
- m_aChangeIdle.SetIdleHdl(LINK(this,OListBoxControl,OnTimeout));
+ m_aChangeIdle.SetInvokeHandler(LINK(this,OListBoxControl,OnTimeout));
}
@@ -1984,7 +1984,7 @@ namespace frm
}
- IMPL_LINK_NOARG(OListBoxControl, OnTimeout, Idle*, void)
+ IMPL_LINK_NOARG(OListBoxControl, OnTimeout, Timer*, void)
{
m_aChangeListeners.notifyEach( &XChangeListener::changed, EventObject( *this ) );
}
diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx
index 3946d33edfb4..f12391e00817 100644
--- a/forms/source/component/ListBox.hxx
+++ b/forms/source/component/ListBox.hxx
@@ -327,7 +327,7 @@ protected:
virtual void processEvent( const ::comphelper::AnyEvent& _rEvent ) override;
private:
- DECL_LINK( OnTimeout, Idle*, void );
+ DECL_LINK( OnTimeout, Timer*, void );
};