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 /vcl | |
parent | 8c4a1663f5d93380268365d35a5581d8065df897 (diff) |
Use typed Idle::SetIdleHdl Link
Change-Id: I189937950325dc4ef663f7f49cb45f38f8537de9
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/print/genprnpsp.cxx | 6 | ||||
-rw-r--r-- | vcl/source/edit/textdata.cxx | 4 | ||||
-rw-r--r-- | vcl/source/edit/texteng.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 16 | ||||
-rw-r--r-- | vcl/source/window/dockwin.cxx | 13 | ||||
-rw-r--r-- | vcl/source/window/paint.cxx | 9 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 5 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 4 |
8 files changed, 22 insertions, 38 deletions
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index c0d5751495ef..8bccc3d83ae5 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -1287,7 +1287,7 @@ class PrinterUpdate static int nActiveJobs; static void doUpdate(); - DECL_STATIC_LINK( PrinterUpdate, UpdateTimerHdl, void* ); + DECL_STATIC_LINK_TYPED( PrinterUpdate, UpdateTimerHdl, Idle*, void ); public: static void update(SalGenericInstance &rInstance); static void jobStarted() { nActiveJobs++; } @@ -1305,7 +1305,7 @@ void PrinterUpdate::doUpdate() pInst->PostPrintersChanged(); } -IMPL_STATIC_LINK_NOINSTANCE( PrinterUpdate, UpdateTimerHdl, void*, EMPTYARG ) +IMPL_STATIC_LINK_NOINSTANCE_NOARG_TYPED( PrinterUpdate, UpdateTimerHdl, Idle*, void ) { if( nActiveJobs < 1 ) { @@ -1315,8 +1315,6 @@ IMPL_STATIC_LINK_NOINSTANCE( PrinterUpdate, UpdateTimerHdl, void*, EMPTYARG ) } else pPrinterUpdateIdle->Start(); - - return 0; } void PrinterUpdate::update(SalGenericInstance &rInstance) diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx index d1f36aaf1989..30eb44e05f28 100644 --- a/vcl/source/edit/textdata.cxx +++ b/vcl/source/edit/textdata.cxx @@ -241,7 +241,7 @@ void IdleFormatter::DoIdleFormat( TextView* pV, sal_uInt16 nMaxRestarts ) if ( mnRestarts > nMaxRestarts ) { mnRestarts = 0; - ((Link<>&)GetIdleHdl()).Call( this ); + ((Link<Idle *, void>&)GetIdleHdl()).Call( this ); } else { @@ -255,7 +255,7 @@ void IdleFormatter::ForceTimeout() { Stop(); mnRestarts = 0; - ((Link<>&)GetIdleHdl()).Call( this ); + ((Link<Idle *, void>&)GetIdleHdl()).Call( this ); } } diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 235dd138be99..e5a3c84d2e2b 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -1514,10 +1514,9 @@ void TextEngine::UpdateViews( TextView* pCurView ) maInvalidRect = Rectangle(); } -IMPL_LINK_NOARG(TextEngine, IdleFormatHdl) +IMPL_LINK_NOARG_TYPED(TextEngine, IdleFormatHdl, Idle *, void) { FormatAndUpdate( mpIdleFormatter->GetView() ); - return 0; } void TextEngine::CheckIdleFormatter() diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 7d0f826c4406..89be3dbc1887 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -51,8 +51,8 @@ private: ImplSVEvent * mnLastUserEvent; DECL_LINK(DockingHdl, void *); - DECL_LINK(DockTimerHdl, void *); - DECL_LINK(EndDockTimerHdl, void *); + DECL_LINK_TYPED(DockTimerHdl, Idle *, void); + DECL_LINK_TYPED(EndDockTimerHdl, Idle *, void); public: ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits, ImplDockingWindowWrapper* pDockingWin ); @@ -108,7 +108,7 @@ void ImplDockFloatWin2::dispose() FloatingWindow::dispose(); } -IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl) +IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, DockTimerHdl, Idle *, void) { DBG_ASSERT( mpDockWin->IsFloatingMode(), "docktimer called but not floating" ); @@ -132,11 +132,9 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl) mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW ); maDockIdle.Start(); } - - return 0; } -IMPL_LINK_NOARG(ImplDockFloatWin2, EndDockTimerHdl) +IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, EndDockTimerHdl, Idle *, void) { DBG_ASSERT( mpDockWin->IsFloatingMode(), "enddocktimer called but not floating" ); @@ -151,8 +149,6 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, EndDockTimerHdl) { maEndDockIdle.Start(); } - - return 0; } IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) @@ -215,13 +211,13 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) maDockRect.TopLeft() ) ); mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW ); maEndDockIdle.Stop(); - DockTimerHdl( this ); + DockTimerHdl( nullptr ); } else { mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking(); maDockIdle.Stop(); - EndDockTimerHdl( this ); + EndDockTimerHdl( nullptr ); } } mbInMove = false; diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 408cb328a132..3ea561f2598a 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -68,7 +68,7 @@ private: ImplSVEvent * mnLastUserEvent; DECL_LINK(DockingHdl, void *); - DECL_LINK(DockTimerHdl, void *); + DECL_LINK_TYPED(DockTimerHdl, Idle *, void); public: ImplDockFloatWin( vcl::Window* pParent, WinBits nWinBits, DockingWindow* pDockingWin ); @@ -126,7 +126,7 @@ void ImplDockFloatWin::dispose() FloatingWindow::dispose(); } -IMPL_LINK_NOARG(ImplDockFloatWin, DockTimerHdl) +IMPL_LINK_NOARG_TYPED(ImplDockFloatWin, DockTimerHdl, Idle *, void) { DBG_ASSERT( mpDockWin->IsFloatingMode(), "docktimer called but not floating" ); @@ -151,8 +151,6 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockTimerHdl) mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW ); maDockIdle.Start(); } - - return 0; } IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl) @@ -179,7 +177,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl) if( ! bFloatMode ) { mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW ); - DockTimerHdl( this ); + DockTimerHdl( nullptr ); } else { @@ -1139,18 +1137,17 @@ void DockingWindow::queue_resize(StateChangedType /*eReason*/) maLayoutIdle.Start(); } -IMPL_LINK(DockingWindow, ImplHandleLayoutTimerHdl, void*, EMPTYARG) +IMPL_LINK_NOARG_TYPED(DockingWindow, ImplHandleLayoutTimerHdl, Idle*, void) { if (!isLayoutEnabled()) { SAL_WARN("vcl.layout", "DockingWindow has become non-layout because extra children have been added directly to it."); - return 0; + return; } Window *pBox = GetWindow(WINDOW_FIRSTCHILD); assert(pBox); setPosSizeOnContainee(GetSizePixel(), *pBox); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index e0220189c9f2..11c8a5d3cdc8 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -292,13 +292,13 @@ void Window::ImplPostPaint() mpWindowImpl->mpFrameData->maPaintIdle.Start(); } -IMPL_LINK_NOARG(Window, ImplHandlePaintHdl) +IMPL_LINK_NOARG_TYPED(Window, ImplHandlePaintHdl, Idle *, void) { // save paint events until layout is done if (!ImplDoTiledRendering() && IsSystemWindow() && static_cast<const SystemWindow*>(this)->hasPendingLayout()) { mpWindowImpl->mpFrameData->maPaintIdle.Start(); - return 0; + return; } // save paint events until resizing is done @@ -307,10 +307,9 @@ IMPL_LINK_NOARG(Window, ImplHandlePaintHdl) mpWindowImpl->mpFrameData->maPaintIdle.Start(); else if ( mpWindowImpl->mbReallyVisible ) ImplCallOverlapPaint(); - return 0; } -IMPL_LINK_NOARG(Window, ImplHandleResizeTimerHdl) +IMPL_LINK_NOARG_TYPED(Window, ImplHandleResizeTimerHdl, Idle *, void) { if( mpWindowImpl->mbReallyVisible ) { @@ -325,8 +324,6 @@ IMPL_LINK_NOARG(Window, ImplHandleResizeTimerHdl) mpWindowImpl->mpFrameData->maPaintIdle.GetIdleHdl().Call( NULL ); } } - - return 0; } void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 nFlags ) diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 13028b927695..1edd3b2940aa 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1051,18 +1051,17 @@ void SystemWindow::setPosSizeOnContainee(Size aSize, Window &rBox) VclContainer::setLayoutAllocation(rBox, aPos, aSize); } -IMPL_LINK( SystemWindow, ImplHandleLayoutTimerHdl, void*, EMPTYARG ) +IMPL_LINK_NOARG_TYPED( SystemWindow, ImplHandleLayoutTimerHdl, Idle*, void ) { if (!isLayoutEnabled()) { SAL_WARN("vcl.layout", "SystemWindow has become non-layout because extra children have been added directly to it."); - return 0; + return; } Window *pBox = GetWindow(WINDOW_FIRSTCHILD); assert(pBox); setPosSizeOnContainee(GetSizePixel(), *pBox); - return 0; } void SystemWindow::SetText(const OUString& rStr) diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 28806d8bb6ff..26590b7ab5c0 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2659,13 +2659,11 @@ IMPL_LINK_NOARG_TYPED(ToolBox, ImplDropdownLongClickHdl, Timer *, void) } } -IMPL_LINK_NOARG(ToolBox, ImplUpdateHdl) +IMPL_LINK_NOARG_TYPED(ToolBox, ImplUpdateHdl, Idle *, void) { if( mbFormat && mpData ) ImplFormat(); - - return 0; } static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, bool bSetColor, bool bRotate ) |