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 /cui/source/dialogs | |
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 'cui/source/dialogs')
-rw-r--r-- | cui/source/dialogs/cuifmsearch.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 6 | ||||
-rw-r--r-- | cui/source/dialogs/cuigrfflt.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/hldoctp.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/hlinettp.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/linkdlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/dialogs/thesdlg.cxx | 4 |
7 files changed, 11 insertions, 11 deletions
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index e21e81e6c66a..0e1675105acd 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -269,7 +269,7 @@ void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sIni LINK(this, FmSearchDialog, OnSearchTextModified).Call(*m_pcmbSearchText); // initial - m_aDelayedPaint.SetTimeoutHdl(LINK(this, FmSearchDialog, OnDelayedPaint)); + m_aDelayedPaint.SetInvokeHandler(LINK(this, FmSearchDialog, OnDelayedPaint)); m_aDelayedPaint.SetTimeout(500); EnableSearchUI(true); diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 185ffc6be5c3..a8ec9ef2ed2a 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -449,7 +449,7 @@ short ActualizeProgress::Execute() short nRet; pIdle = new Idle("ActualizeProgressTimeout"); - pIdle->SetIdleHdl( LINK( this, ActualizeProgress, TimeoutHdl ) ); + pIdle->SetInvokeHandler( LINK( this, ActualizeProgress, TimeoutHdl ) ); pIdle->SetPriority( TaskPriority::LOWEST ); pIdle->Start(); @@ -466,7 +466,7 @@ IMPL_LINK_NOARG(ActualizeProgress, ClickCancelBtn, Button*, void) } -IMPL_LINK( ActualizeProgress, TimeoutHdl, Idle*, _pTimer, void) +IMPL_LINK( ActualizeProgress, TimeoutHdl, Timer*, _pTimer, void) { if ( _pTimer ) { @@ -738,7 +738,7 @@ void TPGalleryThemeProperties::SetXChgData( ExchangeData* _pData ) { pData = _pData; - aPreviewTimer.SetTimeoutHdl( LINK( this, TPGalleryThemeProperties, PreviewTimerHdl ) ); + aPreviewTimer.SetInvokeHandler( LINK( this, TPGalleryThemeProperties, PreviewTimerHdl ) ); aPreviewTimer.SetTimeout( 500 ); m_pBtnSearch->SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickSearchHdl)); m_pBtnTake->SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickTakeHdl)); diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index 947a7e843b56..60ee026c8fd1 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -138,7 +138,7 @@ GraphicFilterDialog::GraphicFilterDialog(vcl::Window* pParent, { bIsBitmap = rGraphic.GetType() == GraphicType::Bitmap; - maTimer.SetTimeoutHdl( LINK( this, GraphicFilterDialog, ImplPreviewTimeoutHdl ) ); + maTimer.SetInvokeHandler( LINK( this, GraphicFilterDialog, ImplPreviewTimeoutHdl ) ); maTimer.SetTimeout( 5 ); get(mpPreview, "preview"); diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index b4cb44e42680..5d970fe6c465 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -72,7 +72,7 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( vcl::Window *pParent, IconChoiceDialog* p m_pCbbPath->SetLoseFocusHdl( LINK ( this, SvxHyperlinkDocTp, LostFocusPathHdl_Impl ) ); - maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkDocTp, TimeoutHdl_Impl ) ); + maTimer.SetInvokeHandler ( LINK ( this, SvxHyperlinkDocTp, TimeoutHdl_Impl ) ); } SvxHyperlinkDocTp::~SvxHyperlinkDocTp() diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 402fb9c6246b..9b6ff256b5f1 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -70,7 +70,7 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( vcl::Window *pParent, m_pEdLogin->SetModifyHdl ( LINK ( this, SvxHyperlinkInternetTp, ModifiedLoginHdl_Impl ) ); m_pCbbTarget->SetLoseFocusHdl ( LINK ( this, SvxHyperlinkInternetTp, LostFocusTargetHdl_Impl ) ); m_pCbbTarget->SetModifyHdl ( LINK ( this, SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl ) ); - maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkInternetTp, TimeoutHdl_Impl ) ); + maTimer.SetInvokeHandler ( LINK ( this, SvxHyperlinkInternetTp, TimeoutHdl_Impl ) ); } SvxHyperlinkInternetTp::~SvxHyperlinkInternetTp() diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 1da650d9a322..f2161ec4947d 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -123,7 +123,7 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b m_pTbLinks->Resize(); // OS: hack for correct selection // UpdateTimer for DDE-/Grf-links, which are waited for - aUpdateIdle.SetIdleHdl( LINK( this, SvBaseLinksDlg, UpdateWaitingHdl ) ); + aUpdateIdle.SetInvokeHandler( LINK( this, SvBaseLinksDlg, UpdateWaitingHdl ) ); aUpdateIdle.SetPriority( TaskPriority::LOWEST ); m_pPbOpenSource->Hide(); @@ -501,7 +501,7 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, BreakLinkClickHdl, Button*, void ) } } -IMPL_LINK_NOARG( SvBaseLinksDlg, UpdateWaitingHdl, Idle*, void ) +IMPL_LINK_NOARG( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, void ) { m_pTbLinks->SetUpdateMode(false); for( sal_uLong nPos = m_pTbLinks->GetEntryCount(); nPos; ) diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 3f831e7ba00e..4b8bad46d825 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -63,7 +63,7 @@ LookUpComboBox::LookUpComboBox(vcl::Window *pParent) { EnableAutoSize(true); - m_aModifyIdle.SetIdleHdl( LINK( this, LookUpComboBox, ModifyTimer_Hdl ) ); + m_aModifyIdle.SetInvokeHandler( LINK( this, LookUpComboBox, ModifyTimer_Hdl ) ); m_aModifyIdle.SetPriority( TaskPriority::LOWEST ); EnableAutocomplete( false ); @@ -92,7 +92,7 @@ void LookUpComboBox::Modify() m_aModifyIdle.Start(); } -IMPL_LINK_NOARG( LookUpComboBox, ModifyTimer_Hdl, Idle *, void ) +IMPL_LINK_NOARG( LookUpComboBox, ModifyTimer_Hdl, Timer *, void ) { m_pDialog->LookUp( GetText() ); m_aModifyIdle.Stop(); |