diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-01-23 19:37:51 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-01-23 20:49:05 +0100 |
commit | bf110d40efcc79efb9247fdce5d2f54bafa6550b (patch) | |
tree | 4e9fad96d91adfd5159b009b430a64d4a6863bd6 /editeng | |
parent | 75d8b305bbc1c2377f23361ecd64816a350baa4c (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 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index b47421f91916..1b585f7bbfe7 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -676,7 +676,7 @@ private: inline void EraseVirtualDevice() { pVirtDev.disposeAndClear(); } DECL_LINK( StatusTimerHdl, Timer *, void); - DECL_LINK( IdleFormatHdl, Idle *, void); + DECL_LINK( IdleFormatHdl, Timer *, void); DECL_LINK( OnlineSpellHdl, Timer *, void); DECL_LINK( DocModified, LinkParamNone*, void ); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index fc2b2aa1f4bc..0d89b4344669 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -145,15 +145,15 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : aSelEngine.SetFunctionSet( &aSelFuncSet ); aStatusTimer.SetTimeout( 200 ); - aStatusTimer.SetTimeoutHdl( LINK( this, ImpEditEngine, StatusTimerHdl ) ); + aStatusTimer.SetInvokeHandler( LINK( this, ImpEditEngine, StatusTimerHdl ) ); aStatusTimer.SetDebugName( "editeng::ImpEditEngine aStatusTimer" ); aIdleFormatter.SetPriority( TaskPriority::REPAINT ); - aIdleFormatter.SetIdleHdl( LINK( this, ImpEditEngine, IdleFormatHdl ) ); + aIdleFormatter.SetInvokeHandler( LINK( this, ImpEditEngine, IdleFormatHdl ) ); aIdleFormatter.SetDebugName( "editeng::ImpEditEngine aIdleFormatter" ); aOnlineSpellTimer.SetTimeout( 100 ); - aOnlineSpellTimer.SetTimeoutHdl( LINK( this, ImpEditEngine, OnlineSpellHdl ) ); + aOnlineSpellTimer.SetInvokeHandler( LINK( this, ImpEditEngine, OnlineSpellHdl ) ); aOnlineSpellTimer.SetDebugName( "editeng::ImpEditEngine aOnlineSpellTimer" ); // Access data already from here on! diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 59022d7fa599..c6f4e4d3e1fd 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -311,7 +311,7 @@ IMPL_LINK_NOARG(ImpEditEngine, OnlineSpellHdl, Timer *, void) aOnlineSpellTimer.Start(); } -IMPL_LINK_NOARG(ImpEditEngine, IdleFormatHdl, Idle *, void) +IMPL_LINK_NOARG(ImpEditEngine, IdleFormatHdl, Timer *, void) { aIdleFormatter.ResetRestarts(); |