summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui
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 /sw/source/uibase/utlui
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 'sw/source/uibase/utlui')
-rw-r--r--sw/source/uibase/utlui/content.cxx2
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx2
-rw-r--r--sw/source/uibase/utlui/navipi.cxx4
-rw-r--r--sw/source/uibase/utlui/unotools.cxx4
4 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index b5ec8107b975..fb66deaa091f 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -813,7 +813,7 @@ SwContentTree::SwContentTree(vcl::Window* pParent, SwNavigationPI* pDialog)
m_aContextStrings[i] = SW_RESSTR(i+STR_CONTEXT_FIRST);
}
m_nActiveBlock = m_pConfig->GetActiveBlock();
- m_aUpdTimer.SetTimeoutHdl(LINK(this, SwContentTree, TimerUpdate));
+ m_aUpdTimer.SetInvokeHandler(LINK(this, SwContentTree, TimerUpdate));
m_aUpdTimer.SetTimeout(1000);
Clear();
EnableContextMenuHandling();
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 79eed51b5295..76afe40eb09b 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -151,7 +151,7 @@ SwGlobalTree::SwGlobalTree(vcl::Window* pParent, SwNavigationPI* pDialog)
DragDropMode::ENABLE_TOP );
aUpdateTimer.SetTimeout(GLOBAL_UPDATE_TIMEOUT);
- aUpdateTimer.SetTimeoutHdl(LINK(this, SwGlobalTree, Timeout));
+ aUpdateTimer.SetInvokeHandler(LINK(this, SwGlobalTree, Timeout));
aUpdateTimer.Start();
for(sal_uInt16 i = 0; i < GLOBAL_CONTEXT_COUNT; i++)
{
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 99e144df55f5..6aff4df8deda 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -723,7 +723,7 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings,
else
m_aContentTree->GrabFocus();
UsePage();
- m_aPageChgIdle.SetIdleHdl(LINK(this, SwNavigationPI, ChangePageHdl));
+ m_aPageChgIdle.SetInvokeHandler(LINK(this, SwNavigationPI, ChangePageHdl));
m_aPageChgIdle.SetPriority(TaskPriority::LOWEST);
m_aContentTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_CONTENT));
@@ -1153,7 +1153,7 @@ bool SwNavigationPI::IsGlobalDoc() const
return bRet;
}
-IMPL_LINK_NOARG(SwNavigationPI, ChangePageHdl, Idle *, void)
+IMPL_LINK_NOARG(SwNavigationPI, ChangePageHdl, Timer *, void)
{
if (!IsDisposed())
{
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index 59d3afbda8c7..80c0f47545a0 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -82,7 +82,7 @@ SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin,
aInitializedLink = *pInitializedLink;
// the controller is asynchronously set
- aLoadedIdle.SetIdleHdl(LINK(this, SwOneExampleFrame, TimeoutHdl));
+ aLoadedIdle.SetInvokeHandler(LINK(this, SwOneExampleFrame, TimeoutHdl));
aLoadedIdle.SetPriority(TaskPriority::HIGH);
CreateControl();
@@ -193,7 +193,7 @@ static void disableScrollBars(uno::Reference< beans::XPropertySet > const & xVie
}
}
-IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void )
+IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer, void )
{
if(!_xControl.is())
return;