diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-05 09:59:27 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-05 12:05:38 +0200 |
commit | c9b4c5681194a1cd3297a36d4a1f4e4cc3aac55a (patch) | |
tree | 2cb864a67b556f807ba175507296f7dfc5254944 /svtools | |
parent | 8c4a1663f5d93380268365d35a5581d8065df897 (diff) |
Use typed Idle::SetIdleHdl Link
Change-Id: I189937950325dc4ef663f7f49cb45f38f8537de9
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/imivctl.hxx | 10 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 20 | ||||
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 8 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 3 | ||||
-rw-r--r-- | svtools/source/control/asynclink.cxx | 11 | ||||
-rw-r--r-- | svtools/source/control/tabbar.cxx | 8 | ||||
-rw-r--r-- | svtools/source/dialogs/wizdlg.cxx | 3 | ||||
-rw-r--r-- | svtools/source/inc/svimpbox.hxx | 4 | ||||
-rw-r--r-- | svtools/source/misc/filechangedchecker.cxx | 3 |
9 files changed, 31 insertions, 39 deletions
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index c5d3b4b2db53..5b8151fd1ff1 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -226,13 +226,13 @@ class SvxIconChoiceCtrl_Impl DECL_LINK( ScrollUpDownHdl, ScrollBar * ); DECL_LINK( ScrollLeftRightHdl, ScrollBar * ); - DECL_LINK(EditTimeoutHdl, void *); + DECL_LINK_TYPED(EditTimeoutHdl, Idle *, void); DECL_LINK( UserEventHdl, void* ); DECL_LINK( EndScrollHdl, void* ); - DECL_LINK( AutoArrangeHdl, void* ); - DECL_LINK( DocRectChangedHdl, void* ); - DECL_LINK( VisRectChangedHdl, void* ); - DECL_LINK( CallSelectHdlHdl, void* ); + DECL_LINK_TYPED( AutoArrangeHdl, Idle*, void ); + DECL_LINK_TYPED( DocRectChangedHdl, Idle*, void ); + DECL_LINK_TYPED( VisRectChangedHdl, Idle*, void ); + DECL_LINK_TYPED( CallSelectHdlHdl, Idle*, void ); void AdjustScrollBars( bool bVirtSizeGrowedOnly = false); void PositionScrollBars( long nRealWidth, long nRealHeight ); diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index e9d2412f1cb3..8f2b6f660681 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -64,7 +64,7 @@ class IcnViewEdit_Impl : public MultiLineEdit bool bGrabFocus; void CallCallBackHdl_Impl(); - DECL_LINK(Timeout_Impl, void *); + DECL_LINK_TYPED(Timeout_Impl, Idle *, void); DECL_LINK( ReturnHdl_Impl, Accelerator * ); DECL_LINK( EscapeHdl_Impl, Accelerator * ); @@ -2854,25 +2854,22 @@ void SvxIconChoiceCtrl_Impl::ClearSelectedRectList() aSelectedRectList.clear(); } -IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, AutoArrangeHdl) +IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, AutoArrangeHdl, Idle *, void) { aAutoArrangeIdle.Stop(); Arrange( IsAutoArrange() ); - return 0; } -IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, VisRectChangedHdl) +IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, VisRectChangedHdl, Idle *, void) { aVisRectChangedIdle.Stop(); pView->VisibleRectChanged(); - return 0; } -IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, DocRectChangedHdl) +IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, DocRectChangedHdl, Idle *, void) { aDocRectChangedIdle.Stop(); pView->DocumentRectChanged(); - return 0; } bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ) @@ -2883,7 +2880,7 @@ bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Po return false; } -IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, EditTimeoutHdl) +IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, EditTimeoutHdl, Idle *, void) { SvxIconChoiceCtrlEntry* pEntry = GetCurEntry(); if( bEntryEditingEnabled && pEntry && @@ -2891,7 +2888,6 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, EditTimeoutHdl) { EditEntry( pEntry ); } - return 0; } @@ -3306,10 +3302,9 @@ void IcnViewEdit_Impl::CallCallBackHdl_Impl() } } -IMPL_LINK_NOARG(IcnViewEdit_Impl, Timeout_Impl) +IMPL_LINK_NOARG_TYPED(IcnViewEdit_Impl, Timeout_Impl, Idle *, void) { CallCallBackHdl_Impl(); - return 0; } IMPL_LINK( IcnViewEdit_Impl, ReturnHdl_Impl, Accelerator*, EMPTYARG ) @@ -3738,12 +3733,11 @@ void SvxIconChoiceCtrl_Impl::CallSelectHandler( SvxIconChoiceCtrlEntry* ) aCallSelectHdlIdle.Start(); } -IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, CallSelectHdlHdl) +IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, CallSelectHdlHdl, Idle *, void) { pHdlEntry = 0; pView->ClickIcon(); //pView->Select(); - return 0; } void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos ) diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 784efbc231ae..c53906f4f2d1 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -2931,10 +2931,9 @@ void SvImpLBox::BeginDrag() } } -IMPL_LINK_NOARG(SvImpLBox, BeginDragHdl) +IMPL_LINK_NOARG_TYPED(SvImpLBox, BeginDragHdl, Idle *, void) { pView->StartDrag( 0, aAsyncBeginDragPos ); - return 0; } void SvImpLBox::PaintDDCursor( SvTreeListEntry* pInsertionPos ) @@ -3145,7 +3144,7 @@ void SvImpLBox::SetCurEntry( SvTreeListEntry* pEntry ) pView->Select( pEntry, true ); } -IMPL_LINK_NOARG(SvImpLBox, EditTimerCall) +IMPL_LINK_NOARG_TYPED(SvImpLBox, EditTimerCall, Idle *, void) { if( pView->IsInplaceEditingEnabled() ) { @@ -3157,7 +3156,7 @@ IMPL_LINK_NOARG(SvImpLBox, EditTimerCall) || ( std::abs( aCurrentMousePos.Y() - aEditClickPos.Y() ) > 5 ) ) { - return 0L; + return; } } @@ -3169,7 +3168,6 @@ IMPL_LINK_NOARG(SvImpLBox, EditTimerCall) ShowCursor( true ); } } - return 0; } bool SvImpLBox::RequestHelp( const HelpEvent& rHEvt ) diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 6d98310924b6..47559982645c 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -242,10 +242,9 @@ void SvInplaceEdit2::LoseFocus() } } -IMPL_LINK_NOARG(SvInplaceEdit2, Timeout_Impl) +IMPL_LINK_NOARG_TYPED(SvInplaceEdit2, Timeout_Impl, Idle *, void) { CallCallBackHdl_Impl(); - return 0; } void SvInplaceEdit2::CallCallBackHdl_Impl() diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx index 87e30ec3c7f1..2a86642c9eea 100644 --- a/svtools/source/control/asynclink.cxx +++ b/svtools/source/control/asynclink.cxx @@ -57,14 +57,14 @@ bAllowDoubles _pIdle = new Idle; _pIdle->SetPriority( SchedulerPriority::HIGHEST ); _pIdle->SetIdleHdl( LINK( - this, AsynchronLink, HandleCall) ); + this, AsynchronLink, HandleCall_Idle) ); } _pIdle->Start(); } else { if( _pMutex ) _pMutex->acquire(); - _nEventId = Application::PostUserEvent( LINK( this, AsynchronLink, HandleCall), 0 ); + _nEventId = Application::PostUserEvent( LINK( this, AsynchronLink, HandleCall_PostUserEvent), 0 ); if( _pMutex ) _pMutex->release(); } } @@ -81,12 +81,17 @@ AsynchronLink::~AsynchronLink() delete _pMutex; } -IMPL_STATIC_LINK( AsynchronLink, HandleCall, void*, EMPTYARG ) +IMPL_STATIC_LINK_TYPED( AsynchronLink, HandleCall_Idle, Idle*, EMPTYARG, void ) { if( pThis->_pMutex ) pThis->_pMutex->acquire(); pThis->_nEventId = 0; if( pThis->_pMutex ) pThis->_pMutex->release(); pThis->Call_Impl( pThis->_pArg ); +} + +IMPL_STATIC_LINK( AsynchronLink, HandleCall_PostUserEvent, void*, EMPTYARG ) +{ + HandleCall_Idle(pThis, nullptr); return 0; } diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index a918c0fbbe8e..f8fd9a35d604 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -236,7 +236,7 @@ private: bool mbPostEvt; DECL_LINK( ImplEndEditHdl, void* ); - DECL_LINK( ImplEndTimerHdl, void* ); + DECL_LINK_TYPED( ImplEndTimerHdl, Idle*, void ); public: TabBarEdit( TabBar* pParent, WinBits nWinStyle = 0 ); @@ -317,10 +317,10 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel ) return 0; } -IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl) +IMPL_LINK_NOARG_TYPED(TabBarEdit, ImplEndTimerHdl, Idle *, void) { if ( HasFocus() ) - return 0; + return; // We need this query, because the edit gets a losefocus event, // when it shows the context menu or the insert symbol dialog @@ -328,8 +328,6 @@ IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl) maLoseFocusIdle.Start(); else GetParent()->EndEditMode( true ); - - return 0; } struct TabBar_Impl diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 74c04e77f15e..3e68e1719805 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -125,11 +125,10 @@ void WizardDialog::queue_resize(StateChangedType /*eReason*/) maWizardLayoutIdle.Start(); } -IMPL_LINK( WizardDialog, ImplHandleWizardLayoutTimerHdl, void*, EMPTYARG ) +IMPL_LINK_NOARG_TYPED( WizardDialog, ImplHandleWizardLayoutTimerHdl, Idle*, void ) { ImplPosCtrls(); ImplPosTabPage(); - return 0; } void WizardDialog::ImplPosCtrls() diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 4f0c79f5e3db..3abde0e2b5a0 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -161,9 +161,9 @@ private: // #97680# -------------------- std::vector< short > aContextBmpWidthVector; - DECL_LINK(EditTimerCall, void *); + DECL_LINK_TYPED(EditTimerCall, Idle *, void); - DECL_LINK( BeginDragHdl, void* ); + DECL_LINK_TYPED( BeginDragHdl, Idle*, void ); DECL_LINK( MyUserEvent,void*); void StopUserEvent(); diff --git a/svtools/source/misc/filechangedchecker.cxx b/svtools/source/misc/filechangedchecker.cxx index 5fb6fee99c3e..ea35296baa9c 100644 --- a/svtools/source/misc/filechangedchecker.cxx +++ b/svtools/source/misc/filechangedchecker.cxx @@ -75,7 +75,7 @@ bool FileChangedChecker::hasFileChanged() return false; } -IMPL_LINK_NOARG(FileChangedChecker, TimerHandler) +IMPL_LINK_NOARG_TYPED(FileChangedChecker, TimerHandler, Idle *, void) { // If the file has changed, then update the graphic in the doc OSL_TRACE("Timeout Called"); @@ -87,7 +87,6 @@ IMPL_LINK_NOARG(FileChangedChecker, TimerHandler) // Reset the Idle in any case resetTimer(); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |