summaryrefslogtreecommitdiff
path: root/formula
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 /formula
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 'formula')
-rw-r--r--formula/source/ui/dlg/formula.cxx10
-rw-r--r--formula/source/ui/dlg/funcutl.cxx10
2 files changed, 10 insertions, 10 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index a0eacea77068..d795395884f7 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -352,11 +352,11 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
FormulaDlg_Impl::~FormulaDlg_Impl()
{
- if(aIdle.IsActive())
+ if (aIdle.IsActive())
{
- aIdle.SetIdleHdl(Link<Idle *, void>());
+ aIdle.ClearInvokeHandler();
aIdle.Stop();
- }// if(aIdle.IsActive())
+ }
bIsShutDown=true;// Set it in order to PreNotify not to save GetFocus.
m_pTabCtrl->RemovePage(TP_FUNCTION);
@@ -1802,7 +1802,7 @@ void FormulaDlg::Update()
{
m_pImpl->Update();
m_pImpl->aIdle.SetPriority(TaskPriority::LOWER);
- m_pImpl->aIdle.SetIdleHdl(LINK( this, FormulaDlg, UpdateFocusHdl));
+ m_pImpl->aIdle.SetInvokeHandler(LINK( this, FormulaDlg, UpdateFocusHdl));
m_pImpl->aIdle.Start();
}
@@ -1876,7 +1876,7 @@ void FormulaDlg::SetEdSelection()
m_pImpl->SetEdSelection();
}
-IMPL_LINK_NOARG(FormulaDlg, UpdateFocusHdl, Idle *, void)
+IMPL_LINK_NOARG(FormulaDlg, UpdateFocusHdl, Timer *, void)
{
FormEditData* pData = m_pImpl->m_pHelper->getFormEditData();
if (!pData)
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx
index 6472fdebcb1d..685381fadb1c 100644
--- a/formula/source/ui/dlg/funcutl.cxx
+++ b/formula/source/ui/dlg/funcutl.cxx
@@ -408,7 +408,7 @@ RefEdit::RefEdit( vcl::Window* _pParent, vcl::Window* pShrinkModeLabel, WinBits
, pAnyRefDlg( nullptr )
, pLabelWidget(pShrinkModeLabel)
{
- aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) );
+ aIdle.SetInvokeHandler( LINK( this, RefEdit, UpdateHdl ) );
aIdle.SetPriority( TaskPriority::LOW );
}
@@ -425,7 +425,7 @@ RefEdit::~RefEdit()
void RefEdit::dispose()
{
- aIdle.SetIdleHdl( Link<Idle *, void>() );
+ aIdle.ClearInvokeHandler();
aIdle.Stop();
pLabelWidget.clear();
Edit::dispose();
@@ -477,12 +477,12 @@ void RefEdit::SetReferences( IControlReferenceHandler* pDlg, vcl::Window* pLabel
if( pDlg )
{
- aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) );
+ aIdle.SetInvokeHandler( LINK( this, RefEdit, UpdateHdl ) );
aIdle.SetPriority( TaskPriority::LOW );
}
else
{
- aIdle.SetIdleHdl( Link<Idle *, void>() );
+ aIdle.ClearInvokeHandler();
aIdle.Stop();
}
}
@@ -516,7 +516,7 @@ void RefEdit::LoseFocus()
pAnyRefDlg->HideReference();
}
-IMPL_LINK_NOARG(RefEdit, UpdateHdl, Idle *, void)
+IMPL_LINK_NOARG(RefEdit, UpdateHdl, Timer *, void)
{
if( pAnyRefDlg )
pAnyRefDlg->ShowReference( GetText() );