From 4ea70f87f7a2b61eda6e5ab1f48debf6fcfadc1f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 3 Sep 2015 11:10:57 +0200 Subject: convert Link<> to typed Change-Id: I2136c3db2742afcb4722f69297276bea1e0119f4 Reviewed-on: https://gerrit.libreoffice.org/18306 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/ui/annotations/annotationwindow.cxx | 3 +-- sd/source/ui/annotations/annotationwindow.hxx | 2 +- sd/source/ui/dlg/RemoteDialogClientBox.cxx | 4 +--- sd/source/ui/dlg/RemoteDialogClientBox.hxx | 2 +- sd/source/ui/inc/ViewShell.hxx | 4 ++-- sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx | 10 ++++------ .../ui/slidesorter/inc/controller/SlsScrollBarManager.hxx | 4 ++-- sd/source/ui/view/viewshe2.cxx | 8 ++++---- 8 files changed, 16 insertions(+), 21 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 2dcc76389af2..4cd50e15c22b 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -504,11 +504,10 @@ long AnnotationWindow::GetPostItTextHeight() return mpOutliner ? LogicToPixel(mpOutliner->CalcTextSize()).Height() : 0; } -IMPL_LINK(AnnotationWindow, ScrollHdl, ScrollBar*, pScroll) +IMPL_LINK_TYPED(AnnotationWindow, ScrollHdl, ScrollBar*, pScroll, void) { long nDiff = getView()->GetEditView().GetVisArea().Top() - pScroll->GetThumbPos(); getView()->Scroll( 0, nDiff ); - return 0; } SvxLanguageItem AnnotationWindow::GetLanguage() diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx index a574c1edc1dd..640f3d4086c2 100644 --- a/sd/source/ui/annotations/annotationwindow.hxx +++ b/sd/source/ui/annotations/annotationwindow.hxx @@ -97,7 +97,7 @@ class AnnotationWindow : public FloatingWindow protected: void SetSizePixel( const Size& rNewSize ) SAL_OVERRIDE; - DECL_LINK(ScrollHdl, ScrollBar*); + DECL_LINK_TYPED(ScrollHdl, ScrollBar*, void); public: AnnotationWindow( AnnotationManagerImpl& rManager, DrawDocShell* pDocShell, vcl::Window* pParent ); diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index f18454650d51..527ef5855a41 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -719,11 +719,9 @@ void ClientBox::DoScroll( long nDelta ) m_aScrollBar->SetPosPixel( aNewSBPt ); } -IMPL_LINK( ClientBox, ScrollHdl, ScrollBar*, pScrBar ) +IMPL_LINK_TYPED( ClientBox, ScrollHdl, ScrollBar*, pScrBar, void ) { DoScroll( pScrBar->GetDelta() ); - - return 1; } IMPL_LINK_NOARG_TYPED( ClientBox, DeauthoriseHdl, Button*, void ) diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx index e5a1133ee716..359af2fbe3fe 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx @@ -130,7 +130,7 @@ class ClientBox : public Control bool HandleCursorKey( sal_uInt16 nKeyCode ); void DeleteRemoved(); - DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar* ); + DECL_DLLPRIVATE_LINK_TYPED( ScrollHdl, ScrollBar*, void ); DECL_DLLPRIVATE_LINK_TYPED( DeauthoriseHdl, Button*, void ); //Index starts with 1. //Throws an com::sun::star::lang::IllegalArgumentException, when the index is invalid. diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 51da996c5848..24fe233896d9 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -529,8 +529,8 @@ protected: void ImpSidUndo(bool bDrawViewShell, SfxRequest& rReq); void ImpSidRedo(bool bDrawViewShell, SfxRequest& rReq); - DECL_LINK( HScrollHdl, ScrollBar * ); - DECL_LINK( VScrollHdl, ScrollBar * ); + DECL_LINK_TYPED( HScrollHdl, ScrollBar *, void ); + DECL_LINK_TYPED( VScrollHdl, ScrollBar *, void ); // virtual scroll handler, here, derivative classes can add themselves here virtual long VirtHScrollHdl(ScrollBar* pHScroll); diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx index 1efe989526be..849ab8447f05 100644 --- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx @@ -88,11 +88,11 @@ void ScrollBarManager::Disconnect() { if (mpVerticalScrollBar != nullptr) { - mpVerticalScrollBar->SetScrollHdl (Link<>()); + mpVerticalScrollBar->SetScrollHdl( Link() ); } if (mpHorizontalScrollBar != nullptr) { - mpHorizontalScrollBar->SetScrollHdl (Link<>()); + mpHorizontalScrollBar->SetScrollHdl( Link() ); } } @@ -252,7 +252,7 @@ void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScro } } -IMPL_LINK(ScrollBarManager, VerticalScrollBarHandler, ScrollBar*, pScrollBar) +IMPL_LINK_TYPED(ScrollBarManager, VerticalScrollBarHandler, ScrollBar*, pScrollBar, void) { if (pScrollBar!=NULL && pScrollBar==mpVerticalScrollBar.get() @@ -265,10 +265,9 @@ IMPL_LINK(ScrollBarManager, VerticalScrollBarHandler, ScrollBar*, pScrollBar) mrSlideSorter.GetContentWindow()->SetVisibleXY(-1, nRelativePosition); mrSlideSorter.GetController().GetVisibleAreaManager().DeactivateCurrentSlideTracking(); } - return sal_IntPtr(true); } -IMPL_LINK(ScrollBarManager, HorizontalScrollBarHandler, ScrollBar*, pScrollBar) +IMPL_LINK_TYPED(ScrollBarManager, HorizontalScrollBarHandler, ScrollBar*, pScrollBar, void) { if (pScrollBar!=NULL && pScrollBar==mpHorizontalScrollBar.get() @@ -281,7 +280,6 @@ IMPL_LINK(ScrollBarManager, HorizontalScrollBarHandler, ScrollBar*, pScrollBar) mrSlideSorter.GetContentWindow()->SetVisibleXY(nRelativePosition, -1); mrSlideSorter.GetController().GetVisibleAreaManager().DeactivateCurrentSlideTracking(); } - return sal_IntPtr(true); } void ScrollBarManager::SetWindowOrigin ( diff --git a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx index c6398a20c4f5..422d8835635c 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx @@ -245,8 +245,8 @@ private: void CalcAutoScrollOffset (const Point& rMouseWindowPosition); bool RepeatAutoScroll(); - DECL_LINK(HorizontalScrollBarHandler, ScrollBar*); - DECL_LINK(VerticalScrollBarHandler, ScrollBar*); + DECL_LINK_TYPED(HorizontalScrollBarHandler, ScrollBar*, void); + DECL_LINK_TYPED(VerticalScrollBarHandler, ScrollBar*, void); DECL_LINK_TYPED(AutoScrollTimeoutHandler, Timer *, void); void PlaceHorizontalScrollBar (const Rectangle& aArea); diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index d1381fc69895..5d39817bc881 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -132,9 +132,9 @@ void ViewShell::UpdateScrollBars() /** * Handling for horizontal Scrollbars */ -IMPL_LINK(ViewShell, HScrollHdl, ScrollBar *, pHScroll ) +IMPL_LINK_TYPED(ViewShell, HScrollHdl, ScrollBar *, pHScroll, void ) { - return VirtHScrollHdl(pHScroll); + VirtHScrollHdl(pHScroll); } /** @@ -188,9 +188,9 @@ long ViewShell::VirtHScrollHdl(ScrollBar* pHScroll) /** * handling for vertical Scrollbars */ -IMPL_LINK(ViewShell, VScrollHdl, ScrollBar *, pVScroll ) +IMPL_LINK_TYPED(ViewShell, VScrollHdl, ScrollBar *, pVScroll, void ) { - return VirtVScrollHdl(pVScroll); + VirtVScrollHdl(pVScroll); } /** -- cgit