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 /basctl/source/basicide | |
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 'basctl/source/basicide')
-rw-r--r-- | basctl/source/basicide/baside2.hxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index d1799d116fae..eac82321f975 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -88,7 +88,7 @@ private: SyntaxHighlighter aHighlighter; Idle aSyntaxIdle; std::set<sal_uInt16> aSyntaxLineTable; - DECL_LINK(SyntaxTimerHdl, Idle *, void); + DECL_LINK(SyntaxTimerHdl, Timer *, void); // progress bar class ProgressInfo; diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index a7d88ef8c3fd..bd0b4cff2249 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -961,7 +961,7 @@ void EditorWindow::CreateEditEngine() ImplSetFont(); aSyntaxIdle.SetPriority( TaskPriority::LOWER ); - aSyntaxIdle.SetIdleHdl( LINK( this, EditorWindow, SyntaxTimerHdl ) ); + aSyntaxIdle.SetInvokeHandler( LINK( this, EditorWindow, SyntaxTimerHdl ) ); bool bWasDoSyntaxHighlight = bDoSyntaxHighlight; bDoSyntaxHighlight = false; // too slow for large texts... @@ -1253,7 +1253,7 @@ void EditorWindow::DoDelayedSyntaxHighlight( sal_uLong nPara ) } } -IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl, Idle *, void) +IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl, Timer *, void) { DBG_ASSERT( pEditView, "Noch keine View, aber Syntax-Highlight ?!" ); |