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 /include/svtools | |
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 'include/svtools')
-rw-r--r-- | include/svtools/asynclink.hxx | 3 | ||||
-rw-r--r-- | include/svtools/filechangedchecker.hxx | 2 | ||||
-rw-r--r-- | include/svtools/treelistbox.hxx | 2 | ||||
-rw-r--r-- | include/svtools/wizdlg.hxx | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/include/svtools/asynclink.hxx b/include/svtools/asynclink.hxx index ceee99b4bacc..d037504b0464 100644 --- a/include/svtools/asynclink.hxx +++ b/include/svtools/asynclink.hxx @@ -26,6 +26,7 @@ #include <osl/mutex.hxx> class Idle; +class Timer; struct ImplSVEvent; namespace svtools { @@ -40,7 +41,7 @@ class SVT_DLLPUBLIC AsynchronLink void* _pArg; ::osl::Mutex* _pMutex; - DECL_DLLPRIVATE_LINK( HandleCall_Idle, Idle*, void ); + DECL_DLLPRIVATE_LINK( HandleCall_Idle, Timer*, void ); DECL_DLLPRIVATE_LINK( HandleCall_PostUserEvent, void*, void ); SVT_DLLPRIVATE void Call_Impl( void* pArg ); diff --git a/include/svtools/filechangedchecker.hxx b/include/svtools/filechangedchecker.hxx index 0a1bc42b9200..f9634e18919b 100644 --- a/include/svtools/filechangedchecker.hxx +++ b/include/svtools/filechangedchecker.hxx @@ -32,7 +32,7 @@ private: ::std::function<void ()> mpCallback; bool SVT_DLLPRIVATE getCurrentModTime(TimeValue& o_rValue) const; - DECL_LINK(TimerHandler, Idle *, void); + DECL_LINK(TimerHandler, Timer *, void); public: void resetTimer(); diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index da18634d1f4e..c4e9d8847e45 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -790,7 +790,7 @@ class SvInplaceEdit2 bool bAlreadyInCallBack; void CallCallBackHdl_Impl(); - DECL_LINK( Timeout_Impl, Idle *, void ); + DECL_LINK( Timeout_Impl, Timer *, void ); DECL_LINK( ReturnHdl_Impl, Accelerator&, void ); DECL_LINK( EscapeHdl_Impl, Accelerator&, void ); diff --git a/include/svtools/wizdlg.hxx b/include/svtools/wizdlg.hxx index 9f9ffe177738..cd21d66c4fb8 100644 --- a/include/svtools/wizdlg.hxx +++ b/include/svtools/wizdlg.hxx @@ -203,7 +203,7 @@ private: sal_Int16 mnLeftAlignCount; bool mbEmptyViewMargin; - DECL_DLLPRIVATE_LINK( ImplHandleWizardLayoutTimerHdl, Idle*, void ); + DECL_DLLPRIVATE_LINK( ImplHandleWizardLayoutTimerHdl, Timer*, void ); protected: long LogicalCoordinateToPixel(int iCoordinate); |