diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-04 17:28:40 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-05 10:21:54 +0200 |
commit | 8cafd08278c0b925aac91ea94d8f907d98f07047 (patch) | |
tree | 1c2b0e57c895511fdc67f8063647cc520ef5eaeb /sw/source/uibase | |
parent | 3363f828d63775a11073276dce927b9538b57be6 (diff) |
Use typed Timer::SetTimeoutHdl Link
Change-Id: Iaaf0c93e5b28c0f7dbe4f02eda8beeae30708100
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/docvw/HeaderFooterWin.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/PageBreakWin.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtdd.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 9 | ||||
-rw-r--r-- | sw/source/uibase/fldui/fldwrap.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/inc/HeaderFooterWin.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/PageBreakWin.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/chldwrap.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/conttree.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/inc/edtwin.hxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/inc/redlndlg.hxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/inc/swruler.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/view.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/misc/redlndlg.cxx | 14 | ||||
-rw-r--r-- | sw/source/uibase/misc/swruler.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uno/unomailmerge.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/utlui/glbltree.cxx | 3 |
19 files changed, 38 insertions, 51 deletions
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 78d24ba09cb7..3f8b5686b08a 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -510,7 +510,7 @@ void SwHeaderFooterWin::Select( ) ExecuteCommand( GetCurItemId() ); } -IMPL_LINK_NOARG(SwHeaderFooterWin, FadeHandler) +IMPL_LINK_NOARG_TYPED(SwHeaderFooterWin, FadeHandler, Timer *, void) { if ( m_bIsAppearing && m_nFadeRate > 0 ) m_nFadeRate -= 25; @@ -532,8 +532,6 @@ IMPL_LINK_NOARG(SwHeaderFooterWin, FadeHandler) if ( IsVisible( ) && m_nFadeRate > 0 && m_nFadeRate < 100 ) m_aFadeTimer.Start(); - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index 23b5902bc906..0840c825261c 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -441,14 +441,14 @@ IMPL_LINK_NOARG(SwPageBreakWin, HideHandler) return 0; } -IMPL_LINK_NOARG(SwPageBreakWin, FadeHandler) +IMPL_LINK_NOARG_TYPED(SwPageBreakWin, FadeHandler, Timer *, void) { const int TICKS_BEFORE_WE_APPEAR = 10; if ( m_bIsAppearing && m_nDelayAppearing < TICKS_BEFORE_WE_APPEAR ) { ++m_nDelayAppearing; m_aFadeTimer.Start(); - return 0; + return; } if ( m_bIsAppearing && m_nFadeRate > 0 ) @@ -468,8 +468,6 @@ IMPL_LINK_NOARG(SwPageBreakWin, FadeHandler) if ( IsVisible( ) && m_nFadeRate > 0 && m_nFadeRate < 100 ) m_aFadeTimer.Start(); - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index e3d86869daac..72dea948881c 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -475,7 +475,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) return DND_ACTION_NONE; } -IMPL_LINK_NOARG(SwEditWin, DDHandler) +IMPL_LINK_NOARG_TYPED(SwEditWin, DDHandler, Timer *, void) { g_bDDTimerStarted = false; m_aTimer.Stop(); @@ -489,7 +489,6 @@ IMPL_LINK_NOARG(SwEditWin, DDHandler) g_bExecuteDrag = true; StartExecuteDrag(); } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 4a8d91b7e401..58957e2aeede 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -593,7 +593,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier ) /** * Increase timer for selection */ -IMPL_LINK_NOARG(SwEditWin, TimerHandler) +IMPL_LINK_NOARG_TYPED(SwEditWin, TimerHandler, Timer *, void) { SwWrtShell &rSh = m_rView.GetWrtShell(); Point aModPt( m_aMovePos ); @@ -642,7 +642,6 @@ IMPL_LINK_NOARG(SwEditWin, TimerHandler) m_aMovePos += rSh.VisArea().Pos() - aOldVis.Pos(); JustifyAreaTimer(); - return 0; } void SwEditWin::JustifyAreaTimer() @@ -5729,16 +5728,14 @@ static SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType ) return pShell; } -IMPL_LINK_NOARG(SwEditWin, KeyInputFlushHandler) +IMPL_LINK_NOARG_TYPED(SwEditWin, KeyInputFlushHandler, Timer *, void) { FlushInBuffer(); - return 0; } -IMPL_LINK_NOARG(SwEditWin, KeyInputTimerHandler) +IMPL_LINK_NOARG_TYPED(SwEditWin, KeyInputTimerHandler, Timer *, void) { m_bTblInsDelMode = false; - return 0; } void SwEditWin::_InitStaticData() diff --git a/sw/source/uibase/fldui/fldwrap.cxx b/sw/source/uibase/fldui/fldwrap.cxx index 8e90321f1979..a027814fa755 100644 --- a/sw/source/uibase/fldui/fldwrap.cxx +++ b/sw/source/uibase/fldui/fldwrap.cxx @@ -46,11 +46,9 @@ SwChildWinWrapper::SwChildWinWrapper(vcl::Window *pParentWindow, sal_uInt16 nId) m_aUpdateTimer.SetTimeoutHdl(LINK(this, SwChildWinWrapper, UpdateHdl)); } -IMPL_LINK_NOARG(SwChildWinWrapper, UpdateHdl) +IMPL_LINK_NOARG_TYPED(SwChildWinWrapper, UpdateHdl, Timer *, void) { GetWindow()->Activate(); // update dialog - - return 0; } // newly initialise dialog after Doc switch diff --git a/sw/source/uibase/inc/HeaderFooterWin.hxx b/sw/source/uibase/inc/HeaderFooterWin.hxx index 76241f648c98..b9fa86e4a5c6 100644 --- a/sw/source/uibase/inc/HeaderFooterWin.hxx +++ b/sw/source/uibase/inc/HeaderFooterWin.hxx @@ -51,7 +51,7 @@ public: void SetReadonly( bool bReadonly ) SAL_OVERRIDE; private: - DECL_LINK( FadeHandler, void * ); + DECL_LINK_TYPED( FadeHandler, Timer *, void ); }; #endif diff --git a/sw/source/uibase/inc/PageBreakWin.hxx b/sw/source/uibase/inc/PageBreakWin.hxx index ab18dd86c4d9..d2c165e043b1 100644 --- a/sw/source/uibase/inc/PageBreakWin.hxx +++ b/sw/source/uibase/inc/PageBreakWin.hxx @@ -56,7 +56,7 @@ public: private: /// Hide the button (used when the popup menu is closed by clicking outside) DECL_LINK( HideHandler, void * ); - DECL_LINK( FadeHandler, void * ); + DECL_LINK_TYPED( FadeHandler, Timer *, void ); }; #endif diff --git a/sw/source/uibase/inc/chldwrap.hxx b/sw/source/uibase/inc/chldwrap.hxx index d9b6574b099c..ac457f1f8a31 100644 --- a/sw/source/uibase/inc/chldwrap.hxx +++ b/sw/source/uibase/inc/chldwrap.hxx @@ -29,7 +29,7 @@ class SwChildWinWrapper : public SfxChildWindow Timer m_aUpdateTimer; SwDocShell* m_pDocSh; - DECL_LINK( UpdateHdl, void* ); + DECL_LINK_TYPED( UpdateHdl, Timer*, void ); // Implementation in fldtdlg.cxx protected: diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index ee23a095d861..faf669d7136a 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -191,7 +191,7 @@ public: SwWrtShell* GetHiddenWrtShell() {return pHiddenShell;} DECL_LINK( ContentDoubleClickHdl, void * ); - DECL_LINK( TimerUpdate, void * ); + DECL_LINK_TYPED( TimerUpdate, Timer *, void ); virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* ) SAL_OVERRIDE; virtual void RequestingChildren( SvTreeListEntry* pParent ) SAL_OVERRIDE; @@ -294,7 +294,7 @@ protected: void Clear(); DECL_LINK( PopupHdl, Menu* ); - DECL_LINK( Timeout, void* ); + DECL_LINK_TYPED( Timeout, Timer*, void ); DECL_LINK( DoubleClickHdl, void* ); bool IsInternalDrag() const {return bIsInternalDrag;} diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index aa9e84873dfd..a0365836c4e7 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -165,16 +165,16 @@ friend void PageNumNotify( SwViewShell* pVwSh, * The selection is regularly increased towards the mouse * position. */ - DECL_LINK( TimerHandler, void * ); + DECL_LINK_TYPED( TimerHandler, Timer *, void ); void StartDDTimer(); void StopDDTimer(SwWrtShell *, const Point &); - DECL_LINK( DDHandler, void * ); + DECL_LINK_TYPED( DDHandler, Timer *, void ); // timer for ANY-KeyInut question without a following KeyInputEvent - DECL_LINK( KeyInputFlushHandler, void * ); + DECL_LINK_TYPED( KeyInputFlushHandler, Timer *, void ); // timer for overlapping KeyInputs (e.g. for tables) - DECL_LINK( KeyInputTimerHandler, void * ); + DECL_LINK_TYPED( KeyInputTimerHandler, Timer *, void ); // timer for ApplyTemplates via mouse (in disguise Drag&Drop) DECL_LINK( TemplateTimerHdl, void * ); diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx index 7fb471182a7d..6c5aabb1465c 100644 --- a/sw/source/uibase/inc/redlndlg.hxx +++ b/sw/source/uibase/inc/redlndlg.hxx @@ -100,7 +100,8 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg SAL_DLLPRIVATE DECL_LINK( UndoHdl, void* ); SAL_DLLPRIVATE DECL_LINK( DeselectHdl, void* ); SAL_DLLPRIVATE DECL_LINK( SelectHdl, void* ); - SAL_DLLPRIVATE DECL_LINK( GotoHdl, void* ); + SAL_DLLPRIVATE DECL_LINK_TYPED( SelectTimerHdl, Timer*, void ); + SAL_DLLPRIVATE DECL_LINK_TYPED( GotoHdl, Timer*, void ); SAL_DLLPRIVATE DECL_LINK( CommandHdl, void* ); SAL_DLLPRIVATE sal_uInt16 CalcDiff(sal_uInt16 nStart, bool bChild); diff --git a/sw/source/uibase/inc/swruler.hxx b/sw/source/uibase/inc/swruler.hxx index 94c23771b8da..8f5fb4659af8 100644 --- a/sw/source/uibase/inc/swruler.hxx +++ b/sw/source/uibase/inc/swruler.hxx @@ -115,7 +115,7 @@ protected: Color GetFadedColor(const Color &rHighColor, const Color &rLowColor); /// Fade timer callback. - DECL_LINK(FadeHandler, void *); + DECL_LINK_TYPED(FadeHandler, Timer *, void); }; #endif diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx index 2eafa89c0461..0f5eb6cd9e6e 100644 --- a/sw/source/uibase/inc/view.hxx +++ b/sw/source/uibase/inc/view.hxx @@ -281,7 +281,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SAL_DLLPRIVATE void CreateBtns(); SAL_DLLPRIVATE DECL_LINK( BtnPage, Button * ); - SAL_DLLPRIVATE DECL_LINK( TimeoutHdl, void* ); + SAL_DLLPRIVATE DECL_LINK_TYPED( TimeoutHdl, Timer*, void ); SAL_DLLPRIVATE DECL_LINK( UpdatePercentHdl, GraphicFilter* ); SAL_DLLPRIVATE DECL_LINK( FieldPopupModeEndHdl, void* ); diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index 411febaeaae1..b8cac8b31b33 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -212,7 +212,7 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer // avoid flickering of buttons: aDeselectTimer.SetTimeout(100); - aDeselectTimer.SetTimeoutHdl(LINK(this, SwRedlineAcceptDlg, SelectHdl)); + aDeselectTimer.SetTimeoutHdl(LINK(this, SwRedlineAcceptDlg, SelectTimerHdl)); // avoid multiple selection of the same texts: aSelectTimer.SetTimeout(100); @@ -943,13 +943,17 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, DeselectHdl) IMPL_LINK_NOARG(SwRedlineAcceptDlg, SelectHdl) { + SelectTimerHdl(nullptr); + return 0; +} + +IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, SelectTimerHdl, Timer *, void) +{ aDeselectTimer.Stop(); aSelectTimer.Start(); - - return 0; } -IMPL_LINK_NOARG(SwRedlineAcceptDlg, GotoHdl) +IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, GotoHdl, Timer *, void) { SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr(); aSelectTimer.Stop(); @@ -1014,8 +1018,6 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, GotoHdl) pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ ); pTPView->EnableReject( bEnable && bSel && bIsNotFormated /*&& !bReadonlySel*/ ); pTPView->EnableRejectAll( bEnable && !bOnlyFormatedRedlines && !bHasReadonlySel ); - - return 0; } IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl) diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx index 748aa9ceccb6..b462d36cb2b1 100644 --- a/sw/source/uibase/misc/swruler.cxx +++ b/sw/source/uibase/misc/swruler.cxx @@ -289,7 +289,7 @@ Color SwCommentRuler::GetFadedColor(const Color &rHighColor, const Color &rLowCo return aColor; } -IMPL_LINK_NOARG(SwCommentRuler, FadeHandler) +IMPL_LINK_NOARG_TYPED(SwCommentRuler, FadeHandler, Timer *, void) { const int nStep = 25; if ( mbIsHighlighted && mnFadeRate < 100 ) @@ -297,13 +297,12 @@ IMPL_LINK_NOARG(SwCommentRuler, FadeHandler) else if ( !mbIsHighlighted && mnFadeRate > 0 ) mnFadeRate -= nStep; else - return 0; + return; Invalidate(); if ( mnFadeRate != 0 && mnFadeRate != 100) maFadeTimer.Start(); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 085157fdf961..5a158033a097 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -517,12 +517,12 @@ IMPL_LINK_NOARG(SwView, AttrChangedNotify) return 0; } -IMPL_LINK_NOARG(SwView, TimeoutHdl) +IMPL_LINK_NOARG_TYPED(SwView, TimeoutHdl, Timer *, void) { if( m_pWrtShell->BasicActionPend() || g_bNoInterrupt ) { m_aTimer.Start(); - return 0; + return; } if ( m_bAttrChgNotifiedWithRegistrations ) @@ -540,8 +540,6 @@ IMPL_LINK_NOARG(SwView, TimeoutHdl) m_pWrtShell->DoUndo( bOldUndo ); m_bAttrChgNotified = false; GetViewImpl()->GetUNOObject_Impl()->NotifySelChanged(); - - return 0; } void SwView::_CheckReadonlyState() diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index 65d78e54fed0..d744d24c2630 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -211,7 +211,7 @@ namespace private: void implTakeOwnership( ); - DECL_LINK( OnTryDeleteFile, void* ); + DECL_LINK_TYPED( OnTryDeleteFile, Timer*, void ); }; DelayedFileDeletion::DelayedFileDeletion( const Reference< XModel >& _rxModel, const OUString& _rTemporaryFile ) @@ -240,7 +240,7 @@ namespace osl_atomic_decrement( &m_refCount ); } - IMPL_LINK_NOARG(DelayedFileDeletion, OnTryDeleteFile) + IMPL_LINK_NOARG_TYPED(DelayedFileDeletion, OnTryDeleteFile, Timer *, void) { ::osl::ClearableMutexGuard aGuard( m_aMutex ); @@ -278,7 +278,6 @@ namespace aGuard.clear(); release(); // this should be our last reference, we should be dead after this } - return 0L; } void DelayedFileDeletion::implTakeOwnership( ) diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index f5a63c3dcab1..36ab74aa71a4 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2446,10 +2446,10 @@ void SwContentTree::HideTree() // No idle with focus or while dragging. -IMPL_LINK_NOARG(SwContentTree, TimerUpdate) +IMPL_LINK_NOARG_TYPED(SwContentTree, TimerUpdate, Timer *, void) { if (IsDisposed()) - return 0; + return; // No update while drag and drop. // Query view because the Navigator is cleared too late. @@ -2490,7 +2490,6 @@ IMPL_LINK_NOARG(SwContentTree, TimerUpdate) Clear(); bIsIdleClear = true; } - return 0; } DragDropMode SwContentTree::NotifyStartDrag( diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index a3fc721718d9..012a6fd02a6f 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -1009,11 +1009,10 @@ void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry delete pContCopy; } -IMPL_LINK_NOARG(SwGlobalTree, Timeout) +IMPL_LINK_NOARG_TYPED(SwGlobalTree, Timeout, Timer *, void) { if(!IsDisposed() && !HasFocus() && Update( false )) Display(); - return 0; } void SwGlobalTree::GotoContent(const SwGlblDocContent* pCont) |