diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-03 11:10:57 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-04 06:31:30 +0000 |
commit | 4ea70f87f7a2b61eda6e5ab1f48debf6fcfadc1f (patch) | |
tree | 83ba4d72bdf86a5fa252b14d32345fdf91fffe09 | |
parent | 5338d2abe4078626d2cfa38cde99dfa1d4eb2f6b (diff) |
convert Link<> to typed
Change-Id: I2136c3db2742afcb4722f69297276bea1e0119f4
Reviewed-on: https://gerrit.libreoffice.org/18306
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
104 files changed, 190 insertions, 273 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index ab0ec278edcb..c97480b1132c 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -281,7 +281,7 @@ private: protected: virtual void Resize() SAL_OVERRIDE; - DECL_LINK( ScrollHdl, ScrollBar * ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); public: explicit ComplexEditorWindow( ModulWindow* pParent ); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 168d441e92bd..5de9144aeb87 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -2054,7 +2054,7 @@ void ComplexEditorWindow::Resize() aEWVScrollBar->SetPosSizePixel( Point( aOutSz.Width() - DWBORDER - nSBWidth, DWBORDER ), Size( nSBWidth, aSz.Height() ) ); } -IMPL_LINK(ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar ) +IMPL_LINK_TYPED(ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar, void ) { if (aEdtWindow->GetEditView()) { @@ -2066,8 +2066,6 @@ IMPL_LINK(ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar ) aEdtWindow->GetEditView()->ShowCursor(false); pCurScrollBar->SetThumbPos( aEdtWindow->GetEditView()->GetStartDocPos().Y() ); } - - return 0; } void ComplexEditorWindow::DataChanged(DataChangedEvent const & rDCEvt) diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 8072fe397e7f..8b88008adc5e 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -61,9 +61,9 @@ BaseWindow::~BaseWindow() void BaseWindow::dispose() { if ( pShellVScrollBar ) - pShellVScrollBar->SetScrollHdl( Link<>() ); + pShellVScrollBar->SetScrollHdl( Link<ScrollBar*,void>() ); if ( pShellHScrollBar ) - pShellHScrollBar->SetScrollHdl( Link<>() ); + pShellHScrollBar->SetScrollHdl( Link<ScrollBar*,void>() ); pShellVScrollBar.clear(); pShellHScrollBar.clear(); vcl::Window::dispose(); @@ -96,10 +96,9 @@ void BaseWindow::GrabScrollBars( ScrollBar* pHScroll, ScrollBar* pVScroll ) -IMPL_LINK( BaseWindow, ScrollHdl, ScrollBar *, pCurScrollBar ) +IMPL_LINK_TYPED( BaseWindow, ScrollHdl, ScrollBar *, pCurScrollBar, void ) { DoScroll( pCurScrollBar ); - return 0; } void BaseWindow::ExecuteCommand (SfxRequest&) diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 6b32a2d1d76a..7a98027dbfd5 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -153,7 +153,7 @@ private: VclPtr<ScrollBar> pShellHScrollBar; VclPtr<ScrollBar> pShellVScrollBar; - DECL_LINK( ScrollHdl, ScrollBar * ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); int nStatus; ScriptDocument m_aDocument; diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index fbcb8ea56c98..789c3fa235c5 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -1494,11 +1494,9 @@ namespace svx } - IMPL_LINK_NOARG( HangulHanjaEditDictDialog, ScrollHdl ) + IMPL_LINK_NOARG_TYPED( HangulHanjaEditDictDialog, ScrollHdl, ScrollBar*, void ) { UpdateScrollbar(); - - return 0; } IMPL_LINK_NOARG( HangulHanjaEditDictDialog, OriginalModifyHdl ) @@ -1781,7 +1779,7 @@ namespace svx #error number of suggestions should not under-run the value of 5 #endif - Link<> aScrLk( LINK( this, HangulHanjaEditDictDialog, ScrollHdl ) ); + Link<ScrollBar*,void> aScrLk( LINK( this, HangulHanjaEditDictDialog, ScrollHdl ) ); m_aScrollSB->SetScrollHdl( aScrLk ); m_aScrollSB->SetEndScrollHdl( aScrLk ); m_aScrollSB->SetRangeMin( 0 ); diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index e60d723c3eec..ca8fadfd0a2a 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -290,7 +290,7 @@ namespace svx bool m_bModifiedOriginal; DECL_LINK( OriginalModifyHdl, void* ); - DECL_LINK( ScrollHdl, void* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); DECL_LINK( EditModifyHdl1, Edit* ); DECL_LINK( EditModifyHdl2, Edit* ); DECL_LINK( EditModifyHdl3, Edit* ); diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 1f90dcf72efc..a6c58658056b 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -846,7 +846,7 @@ class ColorConfigCtrl_Impl : public VclVBox EditableColorConfig* pColorConfig; EditableExtendedColorConfig* pExtColorConfig; - DECL_LINK(ScrollHdl, ScrollBar*); + DECL_LINK_TYPED(ScrollHdl, ScrollBar*, void); DECL_LINK_TYPED(ClickHdl, Button*, void); DECL_LINK(ColorHdl, ColorListBox*); DECL_LINK(ControlFocusHdl, Control*); @@ -897,7 +897,7 @@ ColorConfigCtrl_Impl::ColorConfigCtrl_Impl(vcl::Window* pParent) m_pScrollWindow->set_expand(true); m_pScrollWindow->set_fill(true); - Link<> aScrollLink = LINK(this, ColorConfigCtrl_Impl, ScrollHdl); + Link<ScrollBar*,void> aScrollLink = LINK(this, ColorConfigCtrl_Impl, ScrollHdl); m_pVScroll->SetScrollHdl(aScrollLink); m_pVScroll->SetEndScrollHdl(aScrollLink); @@ -950,10 +950,9 @@ void ColorConfigCtrl_Impl::Update () m_pScrollWindow->Update(pColorConfig, pExtColorConfig); } -IMPL_LINK(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar) +IMPL_LINK_TYPED(ColorConfigCtrl_Impl, ScrollHdl, ScrollBar*, pScrollBar, void) { m_pScrollWindow->ScrollHdl(*pScrollBar); - return 0; } bool ColorConfigCtrl_Impl::PreNotify( NotifyEvent& rNEvt ) diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index d2a95d8d6fb3..92cde5ca0261 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -242,10 +242,9 @@ void OFieldDescControl::Init() ::dbaui::setEvalDateFormatForFormatter(xFormatter); } -IMPL_LINK(OFieldDescControl, OnScroll, ScrollBar*, /*pBar*/) +IMPL_LINK_TYPED(OFieldDescControl, OnScroll, ScrollBar*, /*pBar*/, void) { ScrollAllAggregates(); - return 0; } namespace diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx index e0c00701a589..791bcb4f7f9b 100644 --- a/dbaccess/source/ui/inc/FieldDescControl.hxx +++ b/dbaccess/source/ui/inc/FieldDescControl.hxx @@ -114,7 +114,7 @@ namespace dbaui OFieldDescription* pActFieldDescr; - DECL_LINK( OnScroll, ScrollBar*); + DECL_LINK_TYPED( OnScroll, ScrollBar*, void); DECL_LINK_TYPED( FormatClickHdl, Button *, void ); DECL_LINK( ChangeHdl, ListBox * ); diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx index 09df160ab198..c80c2331f490 100644 --- a/dbaccess/source/ui/inc/JoinTableView.hxx +++ b/dbaccess/source/ui/inc/JoinTableView.hxx @@ -127,7 +127,7 @@ namespace dbaui // own methods ScrollBar& GetHScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetHScrollBar(); } ScrollBar& GetVScrollBar() { return static_cast<OScrollWindowHelper*>(GetParent())->GetVScrollBar(); } - DECL_LINK( ScrollHdl, ScrollBar* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); void DrawConnections(vcl::RenderContext& rRenderContext, const Rectangle& rRect); void InvalidateConnections(); diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 4de43b5c65e1..51e837419ebc 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -201,12 +201,10 @@ void OJoinTableView::dispose() vcl::Window::dispose(); } -IMPL_LINK( OJoinTableView, ScrollHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( OJoinTableView, ScrollHdl, ScrollBar*, pScrollBar, void ) { // move all windows ScrollPane( pScrollBar->GetDelta(), (pScrollBar == &GetHScrollBar()), false ); - - return 0; } void OJoinTableView::Resize() diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 0c876826b330..fea7d6b0ccec 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -129,7 +129,7 @@ class ExtBoxWithBtns_Impl : public ExtensionBox_Impl MENU_COMMAND ShowPopupMenu( const Point &rPos, const long nPos ); - DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar * ); + DECL_DLLPRIVATE_LINK_TYPED( ScrollHdl, ScrollBar*, void ); DECL_DLLPRIVATE_LINK_TYPED( HandleOptionsBtn, Button*, void ); DECL_DLLPRIVATE_LINK_TYPED( HandleEnableBtn, Button*, void ); @@ -468,7 +468,7 @@ void ExtBoxWithBtns_Impl::enableButtons( bool bEnable ) } -IMPL_LINK( ExtBoxWithBtns_Impl, ScrollHdl, ScrollBar*, pScrBar ) +IMPL_LINK_TYPED( ExtBoxWithBtns_Impl, ScrollHdl, ScrollBar*, pScrBar, void ) { long nDelta = pScrBar->GetDelta(); @@ -481,8 +481,6 @@ IMPL_LINK( ExtBoxWithBtns_Impl, ScrollHdl, ScrollBar*, pScrBar ) m_pOptionsBtn->SetPosPixel( aNewOptPt ); m_pRemoveBtn->SetPosPixel( aNewRemPt ); m_pEnableBtn->SetPosPixel( aNewEnPt ); - - return 1; } diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 3ff477c7afbb..c5885a50b052 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -1238,7 +1238,7 @@ void ExtensionBox_Impl::checkEntries() } -void ExtensionBox_Impl::SetScrollHdl( const Link<>& rLink ) +void ExtensionBox_Impl::SetScrollHdl( const Link<ScrollBar*,void>& rLink ) { if ( m_pScrollBar ) m_pScrollBar->SetScrollHdl( rLink ); @@ -1258,11 +1258,9 @@ void ExtensionBox_Impl::DoScroll( long nDelta ) } -IMPL_LINK( ExtensionBox_Impl, ScrollHdl, ScrollBar*, pScrBar ) +IMPL_LINK_TYPED( ExtensionBox_Impl, ScrollHdl, ScrollBar*, pScrBar, void ) { DoScroll( pScrBar->GetDelta() ); - - return 1; } } //namespace dp_gui diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 433f557a40b5..befa6d0a58e0 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -163,7 +163,7 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox void DeleteRemoved(); - DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar * ); + DECL_DLLPRIVATE_LINK_TYPED( ScrollHdl, ScrollBar*, void ); //Index starts with 1. //Throws an com::sun::star::lang::IllegalArgumentException, when the index is invalid. @@ -188,7 +188,7 @@ public: Rectangle GetEntryRect( const long nPos ) const; bool HasActive() { return m_bHasActive; } long PointToPos( const Point& rPos ); - void SetScrollHdl( const Link<>& rLink ); + void SetScrollHdl( const Link<ScrollBar*,void>& rLink ); void DoScroll( long nDelta ); void SetHyperlinkHdl( const Link<>& rLink ){ m_aClickHdl = rLink; } virtual void RecalcAll(); diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 011d80c848cf..7cfc7b5c4a39 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -841,7 +841,7 @@ namespace pcr } - IMPL_LINK(OBrowserListBox, ScrollHdl, ScrollBar*, _pScrollBar ) + IMPL_LINK_TYPED(OBrowserListBox, ScrollHdl, ScrollBar*, _pScrollBar, void ) { DBG_ASSERT(_pScrollBar == m_aVScroll.get(), "OBrowserListBox::ScrollHdl: where does this come from?"); (void)_pScrollBar; @@ -873,7 +873,6 @@ namespace pcr } m_aLinesPlayground->EnablePaint(true); - return 0; } diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx index 193ec8164a01..72771c52d8de 100644 --- a/extensions/source/propctrlr/browserlistbox.hxx +++ b/extensions/source/propctrlr/browserlistbox.hxx @@ -170,7 +170,7 @@ namespace pcr using Window::SetHelpText; private: - DECL_LINK( ScrollHdl, ScrollBar* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); /** retrieves the index of a given control in our line list @param _rxControl diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index 6fe4348311bf..32b512a9b623 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -318,17 +318,15 @@ namespace frm } - IMPL_LINK( RichTextControlImpl, OnHScroll, ScrollBar*, _pScrollbar ) + IMPL_LINK_TYPED( RichTextControlImpl, OnHScroll, ScrollBar*, _pScrollbar, void ) { m_pView->Scroll( -_pScrollbar->GetDelta(), 0, ScrollRangeCheck::PaperWidthTextSize ); - return 0L; } - IMPL_LINK( RichTextControlImpl, OnVScroll, ScrollBar*, _pScrollbar ) + IMPL_LINK_TYPED( RichTextControlImpl, OnVScroll, ScrollBar*, _pScrollbar, void ) { m_pView->Scroll( 0, -_pScrollbar->GetDelta(), ScrollRangeCheck::PaperWidthTextSize ); - return 0L; } diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx index aba1e061288b..48087c0eb174 100644 --- a/forms/source/richtext/richtextimplcontrol.hxx +++ b/forms/source/richtext/richtextimplcontrol.hxx @@ -174,8 +174,8 @@ namespace frm private: DECL_LINK( OnInvalidateAllAttributes, void* ); - DECL_LINK( OnHScroll, ScrollBar* ); - DECL_LINK( OnVScroll, ScrollBar* ); + DECL_LINK_TYPED( OnHScroll, ScrollBar*, void ); + DECL_LINK_TYPED( OnVScroll, ScrollBar*, void ); }; diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index ef7460ddd894..4cb2352a1b48 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -620,11 +620,9 @@ IMPL_LINK( ParaWin, GetEdFocusHdl, ArgInput*, pPtr ) } -IMPL_LINK_NOARG(ParaWin, ScrollHdl) +IMPL_LINK_NOARG_TYPED(ParaWin, ScrollHdl, ScrollBar*, void) { SliderMoved(); - - return 0; } IMPL_LINK( ParaWin, ModifyHdl, ArgInput*, pPtr ) diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index b34d76e7c8bf..46332891ec53 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -93,7 +93,7 @@ private: ::std::vector<OUString> aParaArray; - DECL_LINK(ScrollHdl, void *); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void); DECL_LINK( ModifyHdl, ArgInput* ); DECL_LINK( GetEdFocusHdl, ArgInput* ); DECL_LINK( GetFxFocusHdl, ArgInput* ); diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 2d8ba49c809c..5629902b60cb 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -474,7 +474,7 @@ private: sal_Int32 m_nThumbPos; - DECL_LINK( ScrollHdl, ScrollBar* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); DECL_LINK_TYPED( RemovedHdl, void*, void ); public: @@ -598,7 +598,7 @@ private: CmisPropertiesWindow m_pPropertiesWin; VclScrolledWindow& m_rScrolledWindow; ScrollBar& m_rVertScroll; - DECL_LINK( ScrollHdl, ScrollBar* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); void checkAutoVScroll(); diff --git a/include/sfx2/sidebar/Deck.hxx b/include/sfx2/sidebar/Deck.hxx index 43fddcc096b7..1d799ce73111 100644 --- a/include/sfx2/sidebar/Deck.hxx +++ b/include/sfx2/sidebar/Deck.hxx @@ -92,7 +92,7 @@ private: VclPtr<vcl::Window> mpFiller; VclPtr<ScrollBar> mpVerticalScrollBar; - DECL_LINK(HandleVerticalScrollBarChange,void*); + DECL_LINK_TYPED(HandleVerticalScrollBarChange, ScrollBar*, void); bool ProcessWheelEvent(CommandEvent* pCommandEvent); }; diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx index fa4563d3c732..5c5efee18e8d 100644 --- a/include/sfx2/thumbnailview.hxx +++ b/include/sfx2/thumbnailview.hxx @@ -290,7 +290,7 @@ protected: SFX2_DLLPRIVATE ThumbnailViewItem* ImplGetVisibleItem( sal_uInt16 nVisiblePos ); SFX2_DLLPRIVATE void ImplFireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue ); SFX2_DLLPRIVATE bool ImplHasAccessibleListeners(); - DECL_DLLPRIVATE_LINK( ImplScrollHdl, ScrollBar* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplScrollHdl, ScrollBar*, void ); DECL_LINK(OnItemSelected, ThumbnailViewItem*); diff --git a/include/svtools/addresstemplate.hxx b/include/svtools/addresstemplate.hxx index 0607377e9b3d..be355f34ec6a 100644 --- a/include/svtools/addresstemplate.hxx +++ b/include/svtools/addresstemplate.hxx @@ -125,7 +125,7 @@ namespace svt // initialize the dialog from the configuration data void loadConfiguration(); - DECL_LINK(OnFieldScroll, ScrollBar*); + DECL_LINK_TYPED(OnFieldScroll, ScrollBar*, void); DECL_LINK(OnFieldSelect, ListBox*); DECL_LINK_TYPED(OnAdministrateDatasources, Button*, void); DECL_STATIC_LINK(AddressBookSourceDialog, OnComboGetFocus, ComboBox*); diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index bd54832488a7..6a48b5bf9119 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -311,13 +311,13 @@ private: SVT_DLLPRIVATE long ImpGetDataRowHeight() const; SVT_DLLPRIVATE Rectangle ImplFieldRectPixel( long nRow, sal_uInt16 nColId ) const; - SVT_DLLPRIVATE sal_uInt16 FrozenColCount() const; + SVT_DLLPRIVATE sal_uInt16 FrozenColCount() const; SVT_DLLPRIVATE void ColumnInserted( sal_uInt16 nPos ); - DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar * ); - DECL_DLLPRIVATE_LINK( EndScrollHdl, void * ); - DECL_DLLPRIVATE_LINK_TYPED( StartDragHdl, HeaderBar *, void ); + DECL_DLLPRIVATE_LINK_TYPED( ScrollHdl, ScrollBar*, void ); + DECL_DLLPRIVATE_LINK_TYPED( EndScrollHdl, ScrollBar*, void ); + DECL_DLLPRIVATE_LINK_TYPED( StartDragHdl, HeaderBar*, void ); SVT_DLLPRIVATE long GetFrozenWidth() const; diff --git a/include/svtools/scrwin.hxx b/include/svtools/scrwin.hxx index 6f29fa04f168..a96b62c032a4 100644 --- a/include/svtools/scrwin.hxx +++ b/include/svtools/scrwin.hxx @@ -64,8 +64,8 @@ private: bVCenter:1; SVT_DLLPRIVATE void ImpInitialize( ScrollableWindowFlags nFlags ); - DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar * ); - DECL_DLLPRIVATE_LINK( EndScrollHdl, ScrollBar * ); + DECL_DLLPRIVATE_LINK_TYPED( ScrollHdl, ScrollBar *, void ); + DECL_DLLPRIVATE_LINK_TYPED( EndScrollHdl, ScrollBar *, void ); public: ScrollableWindow( vcl::Window* pParent, WinBits nBits = 0, diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 7b4684c06e6e..3ad941c28bb2 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -271,7 +271,7 @@ private: SVT_DLLPRIVATE bool ImplHasAccessibleListeners(); SVT_DLLPRIVATE void ImplTracking( const Point& rPos, bool bRepeat ); SVT_DLLPRIVATE void ImplEndTracking( const Point& rPos, bool bCancel ); - DECL_DLLPRIVATE_LINK( ImplScrollHdl, ScrollBar* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplScrollHdl, ScrollBar*, void ); DECL_DLLPRIVATE_LINK_TYPED( ImplTimerHdl, Timer*, void ); ValueSet (const ValueSet &) SAL_DELETED_FUNCTION; diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx index 636f9c256532..e23f941bffe7 100644 --- a/include/svx/charmap.hxx +++ b/include/svx/charmap.hxx @@ -120,7 +120,7 @@ private: void InitSettings(vcl::RenderContext& rRenderContext); // abstraction layers are: Unicode<->MapIndex<->Pixel Point MapIndexToPixel( int) const; - DECL_LINK(VscrollHdl, void *); + DECL_LINK_TYPED(VscrollHdl, ScrollBar*, void); void init(); Rectangle getGridRectangle(const Point &rPointUL, const Size &rOutputSize); diff --git a/include/svx/dlgctl3d.hxx b/include/svx/dlgctl3d.hxx index 80e442ea62de..65fc6f479dd2 100644 --- a/include/svx/dlgctl3d.hxx +++ b/include/svx/dlgctl3d.hxx @@ -177,7 +177,7 @@ protected: DECL_LINK( InternalInteractiveChange, void*); DECL_LINK( InternalSelectionChange, void*); - DECL_LINK( ScrollBarMove, void*); + DECL_LINK_TYPED( ScrollBarMove, ScrollBar*, void); DECL_LINK_TYPED( ButtonPress, Button*, void); // initialize local parameters diff --git a/include/svx/rubydialog.hxx b/include/svx/rubydialog.hxx index 3a7cbdbbfbab..b7108e2e7aed 100644 --- a/include/svx/rubydialog.hxx +++ b/include/svx/rubydialog.hxx @@ -131,7 +131,7 @@ class SvxRubyDialog : public SfxModelessDialog DECL_LINK_TYPED(ApplyHdl_Impl, Button*, void); DECL_LINK_TYPED(CloseHdl_Impl, Button*, void); DECL_LINK_TYPED(StylistHdl_Impl, Button*, void); - DECL_LINK(ScrollHdl_Impl, ScrollBar*); + DECL_LINK_TYPED(ScrollHdl_Impl, ScrollBar*, void); DECL_LINK(PositionHdl_Impl, ListBox*); DECL_LINK(AdjustHdl_Impl, ListBox*); DECL_LINK(CharStyleHdl_Impl, void *); diff --git a/include/toolkit/awt/scrollabledialog.hxx b/include/toolkit/awt/scrollabledialog.hxx index 42b70fe9b20c..87738f9dc38b 100644 --- a/include/toolkit/awt/scrollabledialog.hxx +++ b/include/toolkit/awt/scrollabledialog.hxx @@ -62,7 +62,7 @@ namespace toolkit virtual void SetScrollTop( long Top ) SAL_OVERRIDE; void setScrollVisibility( ScrollBarVisibility rState ); - DECL_LINK( ScrollBarHdl, ScrollBar* ); + DECL_LINK_TYPED( ScrollBarHdl, ScrollBar*, void ); virtual void ResetScrollBars(); // Window virtual void Resize() SAL_OVERRIDE; diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index d9a643f8f5cd..e0a72bc9c2cb 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -527,7 +527,7 @@ public: protected: virtual Size calculateRequisition() const SAL_OVERRIDE; virtual void setAllocation(const Size &rAllocation) SAL_OVERRIDE; - DECL_LINK(ScrollBarHdl, void *); + DECL_LINK_TYPED(ScrollBarHdl, ScrollBar*, void); void InitScrollBars(const Size &rRequest); virtual bool Notify(NotifyEvent& rNEvt) SAL_OVERRIDE; private: diff --git a/include/vcl/scrbar.hxx b/include/vcl/scrbar.hxx index b83bfbb585ca..f125740521bb 100644 --- a/include/vcl/scrbar.hxx +++ b/include/vcl/scrbar.hxx @@ -59,14 +59,14 @@ private: long mnLineSize; long mnPageSize; long mnDelta; - sal_uInt16 mnDragDraw; - sal_uInt16 mnStateFlags; + sal_uInt16 mnDragDraw; + sal_uInt16 mnStateFlags; ScrollType meScrollType; ScrollType meDDScrollType; bool mbCalcSize; bool mbFullDrag; - Link<> maScrollHdl; - Link<> maEndScrollHdl; + Link<ScrollBar*,void> maScrollHdl; + Link<ScrollBar*,void> maEndScrollHdl; SAL_DLLPRIVATE Rectangle* ImplFindPartRect( const Point& rPt ); using Window::ImplInit; @@ -133,9 +133,9 @@ public: long GetDelta() const { return mnDelta; } ScrollType GetType() const { return meScrollType; } - void SetScrollHdl( const Link<>& rLink ) { maScrollHdl = rLink; } - void SetEndScrollHdl( const Link<>& rLink ) { maEndScrollHdl = rLink; } - const Link<>& GetEndScrollHdl() const { return maEndScrollHdl; } + void SetScrollHdl( const Link<ScrollBar*,void>& rLink ) { maScrollHdl = rLink; } + void SetEndScrollHdl( const Link<ScrollBar*,void>& rLink ) { maEndScrollHdl = rLink; } + const Link<ScrollBar*,void>& GetEndScrollHdl() const { return maEndScrollHdl; } virtual Size GetOptimalSize() const SAL_OVERRIDE; }; diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index 1f9efb73c6c6..e99a84ce22f8 100644 --- a/reportdesign/source/ui/dlg/CondFormat.cxx +++ b/reportdesign/source/ui/dlg/CondFormat.cxx @@ -309,7 +309,7 @@ namespace rptui impl_ensureConditionVisible( nNewConditionIndex ); } - IMPL_LINK( ConditionalFormattingDialog, OnScroll, ScrollBar*, /*_pNotInterestedIn*/ ) + IMPL_LINK_TYPED( ConditionalFormattingDialog, OnScroll, ScrollBar*, /*_pNotInterestedIn*/, void ) { size_t nFirstCondIndex( impl_getFirstVisibleConditionIndex() ); size_t nFocusCondIndex = impl_getFocusedConditionIndex( nFirstCondIndex ); @@ -320,8 +320,6 @@ namespace rptui impl_focusCondition( nFirstCondIndex ); else if ( nFocusCondIndex >= nFirstCondIndex + MAX_CONDITIONS ) impl_focusCondition( nFirstCondIndex + MAX_CONDITIONS - 1 ); - - return 0; } void ConditionalFormattingDialog::impl_layoutConditions() diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx index e0ebc887027d..56da7f6e9643 100644 --- a/reportdesign/source/ui/inc/CondFormat.hxx +++ b/reportdesign/source/ui/inc/CondFormat.hxx @@ -110,7 +110,7 @@ namespace rptui virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; private: - DECL_LINK( OnScroll, ScrollBar* ); + DECL_LINK_TYPED( OnScroll, ScrollBar*, void ); private: /// returns the current number of conditions diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx index af65cccbdcf7..373c7a3dd40b 100644 --- a/reportdesign/source/ui/inc/ScrollHelper.hxx +++ b/reportdesign/source/ui/inc/ScrollHelper.hxx @@ -57,7 +57,7 @@ namespace rptui ::rtl::Reference<comphelper::OPropertyChangeMultiplexer > m_pReportDefinitionMultiPlexer; // listener for property changes - DECL_LINK( ScrollHdl, ScrollBar*); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void); Size ResizeScrollBars(); void ImplInitSettings(); void impl_initScrollBar( ScrollBar& _rScrollBar ) const; diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 2d80af0c01e7..71e2cddc8de1 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -193,10 +193,9 @@ void OScrollWindowHelper::Resize() m_aReportWindow->SetPosSizePixel(Point( 0, 0 ),aTotalOutputSize); } -IMPL_LINK( OScrollWindowHelper, ScrollHdl, ScrollBar*, /*pScroll*/ ) +IMPL_LINK_TYPED( OScrollWindowHelper, ScrollHdl, ScrollBar*, /*pScroll*/, void ) { m_aReportWindow->ScrollChildren( getThumbPos() ); - return 0; } void OScrollWindowHelper::addSection(const uno::Reference< report::XSection >& _xSection diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 9601a748b7b5..4ca59a7cd746 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1147,10 +1147,9 @@ void ScInputBarGroup::TriggerToolboxLayout() } } -IMPL_LINK_NOARG(ScInputBarGroup, Impl_ScrollHdl) +IMPL_LINK_NOARG_TYPED(ScInputBarGroup, Impl_ScrollHdl, ScrollBar*, void) { aMultiTextWnd->DoScroll(); - return 0; } void ScInputBarGroup::TextGrabFocus() diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 4a18293ccc03..60f13958ff70 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -410,10 +410,9 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry*, pEntry ) return 0; } -IMPL_LINK_NOARG( ScCondFormatList, ScrollHdl ) +IMPL_LINK_NOARG_TYPED( ScCondFormatList, ScrollHdl, ScrollBar*, void ) { DoScroll(mpScrollBar->GetDelta()); - return 0; } // ------------------------------------------------------------------- diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx index 9ecbfb06a234..7120f84a2222 100644 --- a/sc/source/ui/dbgui/csvtablebox.cxx +++ b/sc/source/ui/dbgui/csvtablebox.cxx @@ -44,13 +44,13 @@ ScCsvTableBox::ScCsvTableBox( vcl::Window* pParent, WinBits nBits ) : maRuler->SetCmdHdl( aLink ); maGrid->SetCmdHdl( aLink ); - aLink = LINK( this, ScCsvTableBox, ScrollHdl ); - maHScroll->SetScrollHdl( aLink ); - maVScroll->SetScrollHdl( aLink ); + Link<ScrollBar*,void> aLink2 = LINK( this, ScCsvTableBox, ScrollHdl ); + maHScroll->SetScrollHdl( aLink2 ); + maVScroll->SetScrollHdl( aLink2 ); - aLink = LINK( this, ScCsvTableBox, ScrollEndHdl ); - maHScroll->SetEndScrollHdl( aLink ); - maVScroll->SetEndScrollHdl( aLink ); + aLink2 = LINK( this, ScCsvTableBox, ScrollEndHdl ); + maHScroll->SetEndScrollHdl( aLink2 ); + maVScroll->SetEndScrollHdl( aLink2 ); InitControls(); } @@ -392,7 +392,7 @@ IMPL_LINK( ScCsvTableBox, CsvCmdHdl, ScCsvControl*, pCtrl ) return 0; } -IMPL_LINK( ScCsvTableBox, ScrollHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( ScCsvTableBox, ScrollHdl, ScrollBar*, pScrollBar, void ) { OSL_ENSURE( pScrollBar, "ScCsvTableBox::ScrollHdl - missing sender" ); @@ -400,11 +400,9 @@ IMPL_LINK( ScCsvTableBox, ScrollHdl, ScrollBar*, pScrollBar ) Execute( CSVCMD_SETPOSOFFSET, pScrollBar->GetThumbPos() ); else if( pScrollBar == maVScroll.get() ) Execute( CSVCMD_SETLINEOFFSET, pScrollBar->GetThumbPos() ); - - return 0; } -IMPL_LINK( ScCsvTableBox, ScrollEndHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( ScCsvTableBox, ScrollEndHdl, ScrollBar*, pScrollBar, void ) { OSL_ENSURE( pScrollBar, "ScCsvTableBox::ScrollEndHdl - missing sender" ); @@ -415,8 +413,6 @@ IMPL_LINK( ScCsvTableBox, ScrollEndHdl, ScrollBar*, pScrollBar ) if( GetGridCursorPos() != CSV_POS_INVALID ) Execute( CSVCMD_MOVEGRIDCURSOR, maGrid->GetNoScrollCol( GetGridCursorPos() ) ); } - - return 0; } // accessibility -------------------------------------------------------------- diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 23d2a08e6df9..e1dc6a56e9a5 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -1144,10 +1144,9 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd ) return 0; } -IMPL_LINK_NOARG(ScFilterDlg, ScrollHdl) +IMPL_LINK_NOARG_TYPED(ScFilterDlg, ScrollHdl, ScrollBar*, void) { SliderMoved(); - return 0; } void ScFilterDlg::SliderMoved() diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx index 6ffbf109b1ea..5b353a39aa06 100644 --- a/sc/source/ui/dbgui/sortkeydlg.cxx +++ b/sc/source/ui/dbgui/sortkeydlg.cxx @@ -91,7 +91,7 @@ ScSortKeyCtrl::ScSortKeyCtrl(SfxTabPage* pParent, ScSortKeyItems& rItems) m_rVertScroll.SetRangeMin( 0 ); m_rVertScroll.SetVisibleSize( 0xFFFF ); - Link<> aScrollLink = LINK( this, ScSortKeyCtrl, ScrollHdl ); + Link<ScrollBar*,void> aScrollLink = LINK( this, ScSortKeyCtrl, ScrollHdl ); m_rVertScroll.SetScrollHdl( aScrollLink ); } @@ -123,12 +123,11 @@ void ScSortKeyCtrl::setScrollRange() checkAutoVScroll(); } -IMPL_LINK( ScSortKeyCtrl, ScrollHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( ScSortKeyCtrl, ScrollHdl, ScrollBar*, pScrollBar, void ) { sal_Int32 nOffset = m_aSortWin.GetItemHeight(); nOffset *= pScrollBar->GetThumbPos(); m_aSortWin.DoScroll( -nOffset ); - return 0; } void ScSortKeyCtrl::AddSortKey( sal_uInt16 nItem ) diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 75c211cafe38..62678a1efd89 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -88,7 +88,7 @@ public: DECL_LINK_TYPED( AddBtnHdl, Button*, void ); DECL_LINK_TYPED( RemoveBtnHdl, Button*, void ); - DECL_LINK( ScrollHdl, void* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); DECL_LINK( EntrySelectHdl, ScCondFrmtEntry* ); DECL_LINK( TypeListHdl, ListBox*); diff --git a/sc/source/ui/inc/csvtablebox.hxx b/sc/source/ui/inc/csvtablebox.hxx index e7bfd347b653..ff30afe5e40e 100644 --- a/sc/source/ui/inc/csvtablebox.hxx +++ b/sc/source/ui/inc/csvtablebox.hxx @@ -124,8 +124,8 @@ protected: private: DECL_DLLPRIVATE_LINK( CsvCmdHdl, ScCsvControl* ); - DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar* ); - DECL_DLLPRIVATE_LINK( ScrollEndHdl, ScrollBar* ); + DECL_DLLPRIVATE_LINK_TYPED( ScrollHdl, ScrollBar*, void ); + DECL_DLLPRIVATE_LINK_TYPED( ScrollEndHdl, ScrollBar*, void ); // accessibility ---------------------------------------------------------- public: diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx index 7bd344a63334..17a95aa251a7 100644 --- a/sc/source/ui/inc/datafdlg.hxx +++ b/sc/source/ui/inc/datafdlg.hxx @@ -71,7 +71,7 @@ private: DECL_LINK_TYPED(Impl_DeleteHdl, Button*, void); DECL_LINK_TYPED(Impl_CloseHdl, Button*, void); - DECL_LINK(Impl_ScrollHdl, void *); + DECL_LINK_TYPED(Impl_ScrollHdl, ScrollBar*, void); DECL_LINK( Impl_DataModifyHdl, Edit* ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_DATAFDLG_HXX diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index af30de6f8803..92ed9bba988e 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -150,7 +150,7 @@ private: DECL_LINK( ValModifyHdl, ComboBox* ); DECL_LINK_TYPED( CheckBoxHdl, Button*, void ); DECL_LINK_TYPED( EndDlgHdl, Button*, void ); - DECL_LINK( ScrollHdl, void* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); DECL_LINK( MoreExpandedHdl, void* ); // Hack: RefInput control diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index 05ce58b5794e..7ae780633005 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -227,7 +227,7 @@ private: VclPtr<ScrollBar> aScrollBar; long nVertOffset; DECL_LINK_TYPED( ClickHdl, Button*, void ); - DECL_LINK( Impl_ScrollHdl, void* ); + DECL_LINK_TYPED( Impl_ScrollHdl, ScrollBar*, void ); }; diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index 8f452cd650b7..44bf485d2a31 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -193,7 +193,7 @@ private: DECL_LINK_TYPED( DelBtnHdl, Button*, void ); DECL_LINK( GetFocusHdl, Control* ); DECL_LINK( LoseFocusHdl, void* ); - DECL_LINK( ScrollHdl, void *); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void); DECL_LINK( CursorUpHdl, ScCursorRefEdit* ); DECL_LINK( CursorDownHdl, ScCursorRefEdit* ); DECL_LINK( CondModifyHdl, void* ); diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx index e8a1e1745adc..ff52c67421a5 100644 --- a/sc/source/ui/inc/prevwsh.hxx +++ b/sc/source/ui/inc/prevwsh.hxx @@ -55,10 +55,10 @@ class ScPreviewShell: public SfxViewShell bool GetPageSize( Size& aPageSize ); private: void Construct( vcl::Window* pParent ); - DECL_LINK(ScrollHandler, ScrollBar* ); + DECL_LINK_TYPED( ScrollHandler, ScrollBar*, void ); DECL_LINK(CloseHdl, SystemWindow*); void DoScroll( sal_uInt16 nMode ); - void ExitPreview(); + void ExitPreview(); protected: virtual void Activate(bool bMDI) SAL_OVERRIDE; @@ -102,17 +102,17 @@ public: TriState GetSourceDesignMode() const { return nSourceDesignMode; } - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; virtual SfxPrinter* GetPrinter( bool bCreate = false ) SAL_OVERRIDE; virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE; virtual bool HasPrintOptionsPage() const SAL_OVERRIDE; virtual VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE; - void AddAccessibilityObject( SfxListener& rObject ); - void RemoveAccessibilityObject( SfxListener& rObject ); - void BroadcastAccessibility( const SfxHint &rHint ); - bool HasAccessibilityObjects(); + void AddAccessibilityObject( SfxListener& rObject ); + void RemoveAccessibilityObject( SfxListener& rObject ); + void BroadcastAccessibility( const SfxHint &rHint ); + bool HasAccessibilityObjects(); const ScPreviewLocationData& GetLocationData(); ScDocument& GetDocument(); diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx index 6fb376f016e7..1f5b26ff8917 100644 --- a/sc/source/ui/inc/sortkeydlg.hxx +++ b/sc/source/ui/inc/sortkeydlg.hxx @@ -66,7 +66,7 @@ private: VclScrolledWindow& m_rScrolledWindow; ScrollBar& m_rVertScroll; - DECL_LINK(ScrollHdl, ScrollBar*); + DECL_LINK_TYPED(ScrollHdl, ScrollBar*, void); void checkAutoVScroll(); diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 6ad122d147dc..216fdf85ed82 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -170,8 +170,8 @@ private: void DoAddWin( ScGridWindow* pWin ); void InitScrollBar( ScrollBar& rScrollBar, long nMaxVal ); - DECL_LINK( ScrollHdl, ScrollBar* ); - DECL_LINK( EndScrollHdl, void* ); + DECL_LINK_TYPED(ScrollHdl, ScrollBar*, void ); + DECL_LINK_TYPED(EndScrollHdl, ScrollBar*, void ); DECL_LINK_TYPED(SplitHdl, Splitter*, void); void DoHSplit(long nSplitPos); diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx index 69d602daf9f3..8c095bcfa434 100644 --- a/sc/source/ui/miscdlgs/datafdlg.cxx +++ b/sc/source/ui/miscdlgs/datafdlg.cxx @@ -347,13 +347,12 @@ IMPL_LINK_NOARG_TYPED(ScDataFormDlg, Impl_CloseHdl, Button*, void) EndDialog( ); } -IMPL_LINK_NOARG(ScDataFormDlg, Impl_ScrollHdl) +IMPL_LINK_NOARG_TYPED(ScDataFormDlg, Impl_ScrollHdl, ScrollBar*, void) { long nOffset = m_pSlider->GetThumbPos(); nCurrentRow = nStartRow + nOffset + 1; SetButtonState(); FillCtrls(nCurrentRow); - return 0; } void ScDataFormDlg::SetButtonState() diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 60cdf3df92cb..94f2389f5f54 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -727,14 +727,13 @@ IMPL_LINK_NOARG(ScOptSolverDlg, SelectHdl) return 0; } -IMPL_LINK_NOARG(ScOptSolverDlg, ScrollHdl) +IMPL_LINK_NOARG_TYPED(ScOptSolverDlg, ScrollHdl, ScrollBar*, void) { ReadConditions(); nScrollPos = m_pScrollBar->GetThumbPos(); ShowConditions(); if( mpEdActive ) mpEdActive->SetSelection( Selection( 0, SELECTION_MAX ) ); - return 0; } IMPL_LINK( ScOptSolverDlg, CursorUpHdl, ScCursorRefEdit*, pEdit ) diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index ceb7d578b15c..60a9fb7dbcbd 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -409,7 +409,7 @@ void ScPreviewShell::UpdateScrollBars() } } -IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) +IMPL_LINK_TYPED( ScPreviewShell, ScrollHandler, ScrollBar*, pScroll, void ) { long nPos = pScroll->GetThumbPos(); long nDelta = pScroll->GetDelta(); @@ -478,8 +478,6 @@ IMPL_LINK (ScPreviewShell,ScrollHandler, ScrollBar* ,pScroll ) Help::ShowQuickHelp( pScroll->GetParent(), aRect, aHelpStr, nAlign ); } } - - return 0; } IMPL_LINK (ScPreviewShell, CloseHdl, SystemWindow*,) diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 1aa3e4d0220b..b0b020ee5853 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -1020,17 +1020,16 @@ bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos ) return bDone; } -IMPL_LINK_NOARG(ScTabView, EndScrollHdl) +IMPL_LINK_NOARG_TYPED(ScTabView, EndScrollHdl, ScrollBar*, void) { if ( bDragging ) { UpdateScrollBars(); bDragging = false; } - return 0; } -IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) +IMPL_LINK_TYPED( ScTabView, ScrollHdl, ScrollBar*, pScroll, void ) { bool bHoriz = ( pScroll == aHScrollLeft.get() || pScroll == aHScrollRight.get() ); long nViewPos; @@ -1173,8 +1172,6 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) else ScrollY( nDelta, (pScroll == aVScrollTop.get()) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM, bUpdate ); } - - return 0; } void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars ) 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<ScrollBar*,void>() ); } if (mpHorizontalScrollBar != nullptr) { - mpHorizontalScrollBar->SetScrollHdl (Link<>()); + mpHorizontalScrollBar->SetScrollHdl( Link<ScrollBar*,void>() ); } } @@ -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); } /** diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 0279d9bd1ec3..d679263f5590 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -491,7 +491,7 @@ bool ThumbnailView::ImplHasAccessibleListeners() return( pAcc && pAcc->HasAccessibleListeners() ); } -IMPL_LINK( ThumbnailView,ImplScrollHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( ThumbnailView,ImplScrollHdl, ScrollBar*, pScrollBar, void ) { if ( pScrollBar->GetDelta() ) { @@ -500,7 +500,6 @@ IMPL_LINK( ThumbnailView,ImplScrollHdl, ScrollBar*, pScrollBar ) if ( IsReallyVisible() && IsUpdateMode() ) Invalidate(); } - return 0; } IMPL_LINK (ThumbnailView, OnItemSelected, ThumbnailViewItem*, pItem) diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 43fd167fbe6e..078b9c821191 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2096,7 +2096,7 @@ void CustomPropertiesControl::Init(VclBuilderContainer& rBuilder) m_pVertScroll->SetRangeMax( 0 ); m_pVertScroll->SetVisibleSize( 0xFFFF ); - Link<> aScrollLink = LINK( this, CustomPropertiesControl, ScrollHdl ); + Link<ScrollBar*,void> aScrollLink = LINK( this, CustomPropertiesControl, ScrollHdl ); m_pVertScroll->SetScrollHdl( aScrollLink ); } @@ -2137,13 +2137,12 @@ void CustomPropertiesControl::dispose() vcl::Window::dispose(); } -IMPL_LINK( CustomPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( CustomPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar, void ) { sal_Int32 nOffset = m_pPropertiesWin->GetLineHeight(); nOffset *= ( m_nThumbPos - pScrollBar->GetThumbPos() ); m_nThumbPos = pScrollBar->GetThumbPos(); m_pPropertiesWin->DoScroll( nOffset ); - return 0; } IMPL_LINK_NOARG_TYPED(CustomPropertiesControl, RemovedHdl, void*, void) @@ -2601,7 +2600,7 @@ CmisPropertiesControl::CmisPropertiesControl(SfxTabPage* pParent) m_rVertScroll.SetRangeMin(0); m_rVertScroll.SetVisibleSize( 0xFFFF ); - Link<> aScrollLink = LINK( this, CmisPropertiesControl, ScrollHdl ); + Link<ScrollBar*,void> aScrollLink = LINK( this, CmisPropertiesControl, ScrollHdl ); m_rVertScroll.SetScrollHdl( aScrollLink ); } @@ -2610,12 +2609,11 @@ void CmisPropertiesControl::ClearAllLines() m_pPropertiesWin.ClearAllLines(); } -IMPL_LINK( CmisPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( CmisPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar, void ) { sal_Int32 nOffset = m_pPropertiesWin.GetItemHeight(); nOffset *= ( pScrollBar->GetThumbPos() ); m_pPropertiesWin.DoScroll( -nOffset ); - return 0; } void CmisPropertiesControl::checkAutoVScroll() diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 9866f4d4252d..5982b9f2f8f9 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -296,12 +296,11 @@ void Deck::PrintWindowSubTree(vcl::Window* pRoot, int nIndentation) PrintWindowSubTree(pRoot->GetChild(nIndex), nIndentation + 1); } -IMPL_LINK_NOARG(Deck, HandleVerticalScrollBarChange) +IMPL_LINK_NOARG_TYPED(Deck, HandleVerticalScrollBarChange, ScrollBar*, void) { const sal_Int32 nYOffset (-mpVerticalScrollBar->GetThumbPos()); mpScrollContainer->SetPosPixel(Point(mpScrollContainer->GetPosPixel().X(), nYOffset)); - return sal_IntPtr(true); } //----- Deck::ScrollContainerWindow ------------------------------------------- diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx index 7cf8abb353da..c8ad31788839 100644 --- a/starmath/inc/ElementsDockingWindow.hxx +++ b/starmath/inc/ElementsDockingWindow.hxx @@ -121,7 +121,7 @@ public: Size GetOptimalSize() const SAL_OVERRIDE; - DECL_LINK( ScrollHdl, void* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); void DoScroll(long nDelta); boost::signals2::signal< void ( SmElement* ) > selectedSignal; diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index ec94f62ce7a5..70b627368501 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -287,7 +287,7 @@ class SmShowSymbolSetWindow : public Control virtual void Resize() SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; - DECL_LINK( ScrollHdl, ScrollBar* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); public: SmShowSymbolSetWindow(vcl::Window *pParent, WinBits nStyle); virtual ~SmShowSymbolSetWindow(); diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index 75d1d34826d8..b69d90af9d83 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -73,7 +73,7 @@ class SmEditWindow : public vcl::Window, public DropTargetHelper virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE; DECL_LINK(EditStatusHdl ,EditStatus *); - DECL_LINK(ScrollHdl, ScrollBar *); + DECL_LINK_TYPED(ScrollHdl, ScrollBar*, void); void CreateEditView(); Rectangle AdjustScrollBars(); diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 3c29f5e7c0c4..fbea9403064e 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -441,10 +441,9 @@ void SmElementsControl::MouseButtonDown(const MouseEvent& rMouseEvent) } } -IMPL_LINK_NOARG( SmElementsControl, ScrollHdl ) +IMPL_LINK_NOARG_TYPED( SmElementsControl, ScrollHdl, ScrollBar*, void ) { DoScroll(mxScroll->GetDelta()); - return 0; } void SmElementsControl::DoScroll(long nDelta) diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 7fe760c9bb6d..d47bd1229b2d 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1354,10 +1354,9 @@ void SmShowSymbolSetWindow::Resize() calccols(); } -IMPL_LINK( SmShowSymbolSetWindow, ScrollHdl, ScrollBar*, /*pScrollBar*/) +IMPL_LINK_TYPED( SmShowSymbolSetWindow, ScrollHdl, ScrollBar*, /*pScrollBar*/, void) { Invalidate(); - return 0; } VCL_BUILDER_DECL_FACTORY(SmShowSymbol) diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 53a2b87a99de..983ab9a3d70d 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -581,7 +581,7 @@ IMPL_LINK( SmEditWindow, EditStatusHdl, EditStatus *, /*pStat*/ ) } } -IMPL_LINK( SmEditWindow, ScrollHdl, ScrollBar *, /*pScrollBar*/ ) +IMPL_LINK_TYPED( SmEditWindow, ScrollHdl, ScrollBar *, /*pScrollBar*/, void ) { OSL_ENSURE(pEditView, "EditView missing"); if (pEditView) @@ -591,7 +591,6 @@ IMPL_LINK( SmEditWindow, ScrollHdl, ScrollBar *, /*pScrollBar*/ ) pEditView->GetVisArea().GetSize())); pEditView->Invalidate(); } - return 0; } Rectangle SmEditWindow::AdjustScrollBars() diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index d891e8d0d7c2..5d3b0254e93e 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -1331,38 +1331,34 @@ sal_uInt16 BrowseBox::FrozenColCount() const -IMPL_LINK(BrowseBox,ScrollHdl,ScrollBar*,pBar) +IMPL_LINK_TYPED(BrowseBox, ScrollHdl, ScrollBar*, pBar, void) { if ( pBar->GetDelta() == 0 ) - return 0; + return; if ( pBar->GetDelta() < 0 && getDataWindow()->bNoScrollBack ) { UpdateScrollbars(); - return 0; + return; } if ( pBar == aHScroll.get() ) ScrollColumns( aHScroll->GetDelta() ); if ( pBar == pVScroll ) ScrollRows( pVScroll->GetDelta() ); - - return 0; } -IMPL_LINK_NOARG(BrowseBox, EndScrollHdl) +IMPL_LINK_NOARG_TYPED(BrowseBox, EndScrollHdl, ScrollBar*, void) { if ( getDataWindow()->bNoScrollBack ) { EndScroll(); - return 0; + return; } - - return 0; } diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index cc777f3e112c..183376908b0d 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -224,8 +224,8 @@ class SvxIconChoiceCtrl_Impl void ResetVirtSize(); void CheckScrollBars(); - DECL_LINK( ScrollUpDownHdl, ScrollBar * ); - DECL_LINK( ScrollLeftRightHdl, ScrollBar * ); + DECL_LINK_TYPED( ScrollUpDownHdl, ScrollBar*, void ); + DECL_LINK_TYPED( ScrollLeftRightHdl, ScrollBar*, void ); DECL_LINK_TYPED( EditTimeoutHdl, Idle *, void); DECL_LINK_TYPED( UserEventHdl, void*, void ); DECL_LINK_TYPED( AutoArrangeHdl, Idle*, void ); diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index dedeaf88c630..81fb69675e3b 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -232,22 +232,20 @@ void SvxIconChoiceCtrl_Impl::SetStyle( WinBits nWinStyle ) } } -IMPL_LINK( SvxIconChoiceCtrl_Impl, ScrollUpDownHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( SvxIconChoiceCtrl_Impl, ScrollUpDownHdl, ScrollBar*, pScrollBar, void ) { StopEntryEditing( true ); // arrow up: delta=-1; arrow down: delta=+1 Scroll( 0, pScrollBar->GetDelta(), true ); bEndScrollInvalidate = true; - return 0; } -IMPL_LINK( SvxIconChoiceCtrl_Impl, ScrollLeftRightHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( SvxIconChoiceCtrl_Impl, ScrollLeftRightHdl, ScrollBar*, pScrollBar, void ) { StopEntryEditing( true ); // arrow left: delta=-1; arrow right: delta=+1 Scroll( pScrollBar->GetDelta(), 0, true ); bEndScrollInvalidate = true; - return 0; } void SvxIconChoiceCtrl_Impl::FontModified() diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 5206c1bdb70d..35eae008cb7c 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -300,7 +300,7 @@ void SvImpLBox::Clear() // Paint, navigate, scroll // ********************************************************************* -IMPL_LINK_NOARG(SvImpLBox, EndScrollHdl) +IMPL_LINK_NOARG_TYPED(SvImpLBox, EndScrollHdl, ScrollBar*, void) { if( nFlags & F_ENDSCROLL_SET_VIS_SIZE ) { @@ -308,17 +308,16 @@ IMPL_LINK_NOARG(SvImpLBox, EndScrollHdl) nFlags &= ~F_ENDSCROLL_SET_VIS_SIZE; } EndScroll(); - return 0; } // handler for vertical scrollbar -IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar ) +IMPL_LINK_TYPED( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar, void ) { DBG_ASSERT(!bInVScrollHdl,"Scroll handler out-paces itself!"); long nDelta = pScrollBar->GetDelta(); if( !nDelta ) - return 0; + return; nFlags &= (~F_FILLING); @@ -347,7 +346,6 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar ) PageUp( (sal_uInt16) nDelta ); } bInVScrollHdl = false; - return 0; } @@ -722,7 +720,7 @@ void SvImpLBox::UpdateAll( pView->Invalidate( GetVisibleArea() ); } -IMPL_LINK( SvImpLBox, ScrollLeftRightHdl, ScrollBar *, pScrollBar ) +IMPL_LINK_TYPED( SvImpLBox, ScrollLeftRightHdl, ScrollBar *, pScrollBar, void ) { long nDelta = pScrollBar->GetDelta(); if( nDelta ) @@ -735,7 +733,6 @@ IMPL_LINK( SvImpLBox, ScrollLeftRightHdl, ScrollBar *, pScrollBar ) pView->nFocusWidth = -1; KeyLeftRight( nDelta ); } - return 0; } void SvImpLBox::KeyLeftRight( long nDelta ) diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index f91234f7c4c7..c7fe5c767c06 100644 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -118,7 +118,7 @@ Size ScrollableWindow::GetOutputSizePixel() const -IMPL_LINK( ScrollableWindow, EndScrollHdl, ScrollBar *, pScroll ) +IMPL_LINK_TYPED( ScrollableWindow, EndScrollHdl, ScrollBar *, pScroll, void ) { // notify the start of scrolling, if not already scrolling if ( !bScrolling ) @@ -138,12 +138,11 @@ IMPL_LINK( ScrollableWindow, EndScrollHdl, ScrollBar *, pScroll ) // notify the end of scrolling bScrolling = false; - return 0; } -IMPL_LINK( ScrollableWindow, ScrollHdl, ScrollBar *, pScroll ) +IMPL_LINK_TYPED( ScrollableWindow, ScrollHdl, ScrollBar *, pScroll, void ) { // notify the start of scrolling, if not already scrolling if ( !bScrolling ) @@ -159,7 +158,6 @@ IMPL_LINK( ScrollableWindow, ScrollHdl, ScrollBar *, pScroll ) else Scroll( 0, aDelta.Height() ); } - return 0; } diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index c43a7c5bd398..f05e6be9a073 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1115,7 +1115,7 @@ bool ValueSet::ImplHasAccessibleListeners() return( pAcc && pAcc->HasAccessibleListeners() ); } -IMPL_LINK( ValueSet,ImplScrollHdl, ScrollBar*, pScrollBar ) +IMPL_LINK_TYPED( ValueSet,ImplScrollHdl, ScrollBar*, pScrollBar, void ) { sal_uInt16 nNewFirstLine = (sal_uInt16)pScrollBar->GetThumbPos(); if ( nNewFirstLine != mnFirstLine ) @@ -1124,7 +1124,6 @@ IMPL_LINK( ValueSet,ImplScrollHdl, ScrollBar*, pScrollBar ) mbFormat = true; Invalidate(); } - return 0; } IMPL_LINK_NOARG_TYPED(ValueSet, ImplTimerHdl, Timer *, void) diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 539d33703eef..b39546f6cce5 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -786,10 +786,9 @@ void AssignmentPersistentData::ImplCommit() } - IMPL_LINK(AddressBookSourceDialog, OnFieldScroll, ScrollBar*, _pScrollBar) + IMPL_LINK_TYPED(AddressBookSourceDialog, OnFieldScroll, ScrollBar*, _pScrollBar, void) { implScrollFields( _pScrollBar->GetThumbPos(), true, true ); - return 0L; } diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index 5f5f85e8659f..35998633b37b 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -1120,11 +1120,10 @@ IMPL_LINK_NOARG(ExportDialog, UpdateHdlNfResolution) return 0; } -IMPL_LINK_NOARG(ExportDialog, SbCompressionUpdateHdl) +IMPL_LINK_NOARG_TYPED(ExportDialog, SbCompressionUpdateHdl, ScrollBar*, void) { mpNfCompression->SetValue( mpSbCompression->GetThumbPos() ); updateControls(); - return 0; } IMPL_LINK_NOARG_TYPED(ExportDialog, OK, Button*, void) diff --git a/svtools/source/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx index 898e6aaf6f16..0dc3dd05c054 100644 --- a/svtools/source/filter/exportdialog.hxx +++ b/svtools/source/filter/exportdialog.hxx @@ -147,7 +147,7 @@ private: DECL_LINK( UpdateHdlMtfSizeX, void* ); DECL_LINK( UpdateHdlMtfSizeY, void* ); DECL_LINK( UpdateHdlNfResolution, void* ); - DECL_LINK( SbCompressionUpdateHdl, void* ); + DECL_LINK_TYPED( SbCompressionUpdateHdl, ScrollBar*, void ); DECL_LINK_TYPED( OK, Button*, void ); diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 72a75379d7fc..6b9a375083c1 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -186,9 +186,9 @@ private: void DrawNet(vcl::RenderContext& rRenderContext); // ScrollBar-Handler - DECL_LINK( ScrollUpDownHdl, ScrollBar * ); - DECL_LINK( ScrollLeftRightHdl, ScrollBar * ); - DECL_LINK( EndScrollHdl, void * ); + DECL_LINK_TYPED( ScrollUpDownHdl, ScrollBar*, void ); + DECL_LINK_TYPED( ScrollLeftRightHdl, ScrollBar*, void ); + DECL_LINK_TYPED( EndScrollHdl, ScrollBar*, void ); void SetNodeBmpYOffset( const Image& ); void SetNodeBmpTabDistance(); diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index a6491b64613e..94215e202a7b 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -629,7 +629,7 @@ namespace svt { namespace table bool lcl_updateScrollbar( vcl::Window& _rParent, VclPtr<ScrollBar>& _rpBar, bool const i_needBar, long _nVisibleUnits, long _nPosition, long _nLineSize, long _nRange, - bool _bHorizontal, const Link<>& _rScrollHandler ) + bool _bHorizontal, const Link<ScrollBar*,void>& _rScrollHandler ) { // do we currently have the scrollbar? bool bHaveBar = _rpBar != nullptr; @@ -2394,7 +2394,7 @@ namespace svt { namespace table } - IMPL_LINK( TableControl_Impl, OnScroll, ScrollBar*, _pScrollbar ) + IMPL_LINK_TYPED( TableControl_Impl, OnScroll, ScrollBar*, _pScrollbar, void ) { DBG_ASSERT( ( _pScrollbar == m_pVScroll ) || ( _pScrollbar == m_pHScroll ), "TableControl_Impl::OnScroll: where did this come from?" ); @@ -2403,8 +2403,6 @@ namespace svt { namespace table impl_ni_ScrollRows( _pScrollbar->GetDelta() ); else impl_ni_ScrollColumns( _pScrollbar->GetDelta() ); - - return 0L; } diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 574042a8ca87..59f329999aed 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -458,7 +458,7 @@ namespace svt { namespace table /// invalidates the window area occupied by the given column void impl_invalidateColumn( ColPos const i_column ); - DECL_LINK( OnScroll, ScrollBar* ); + DECL_LINK_TYPED( OnScroll, ScrollBar*, void ); DECL_LINK_TYPED( OnUpdateScrollbars, void*, void ); }; diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 730d120402b8..9413edc82755 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -692,7 +692,7 @@ void SvxShowCharSet::SelectCharacter( sal_UCS4 cNew, bool bFocus ) -IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl) +IMPL_LINK_NOARG_TYPED(SvxShowCharSet, VscrollHdl, ScrollBar*, void) { if( nSelectedIndex < FirstInView() ) { @@ -714,7 +714,6 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl) } Invalidate(); - return 0; } diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index ea9bc0f8a405..c0be0e8fe1d5 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -1224,7 +1224,7 @@ void SvxLightCtl3D::LoseFocus() maLightControl->HideFocus(); } -IMPL_LINK_NOARG(SvxLightCtl3D, ScrollBarMove) +IMPL_LINK_NOARG_TYPED(SvxLightCtl3D, ScrollBarMove, ScrollBar*, void) { const sal_Int32 nHor(maHorScroller->GetThumbPos()); const sal_Int32 nVer(maVerScroller->GetThumbPos()); @@ -1237,8 +1237,6 @@ IMPL_LINK_NOARG(SvxLightCtl3D, ScrollBarMove) { maUserInteractiveChangeCallback.Call(this); } - - return 0; } IMPL_LINK_NOARG_TYPED(SvxLightCtl3D, ButtonPress, Button*, void) diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index d6dc088dfd54..6c416d83c614 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -244,7 +244,7 @@ SvxRubyDialog::SvxRubyDialog(SfxBindings* pBind, SfxChildWindow* pCW, vcl::Windo m_pPositionLB->SetSelectHdl(LINK(this, SvxRubyDialog, PositionHdl_Impl)); m_pCharStyleLB->SetSelectHdl(LINK(this, SvxRubyDialog, CharStyleHdl_Impl)); - Link<> aScrLk(LINK(this, SvxRubyDialog, ScrollHdl_Impl)); + Link<ScrollBar*,void> aScrLk(LINK(this, SvxRubyDialog, ScrollHdl_Impl)); m_pScrollSB->SetScrollHdl(aScrLk); m_pScrollSB->SetEndScrollHdl(aScrLk); @@ -548,7 +548,7 @@ void SvxRubyDialog::GetCurrentText(OUString& rBase, OUString& rRuby) rRuby = aEditArr[nCurrentEdit * 2 + 1]->GetText(); } -IMPL_LINK(SvxRubyDialog, ScrollHdl_Impl, ScrollBar*, pScroll) +IMPL_LINK_TYPED(SvxRubyDialog, ScrollHdl_Impl, ScrollBar*, pScroll, void) { long nPos = pScroll->GetThumbPos(); if (GetLastPos() != nPos) @@ -561,7 +561,6 @@ IMPL_LINK(SvxRubyDialog, ScrollHdl_Impl, ScrollBar*, pScroll) SetRubyText(nPos, *m_pLeft4ED, *m_pRight4ED); SetLastPos(nPos - 3); m_pPreviewWin->Invalidate(); - return 0; } IMPL_LINK_NOARG_TYPED(SvxRubyDialog, ApplyHdl_Impl, Button*, void) diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx index b3a62474f4cd..8208d2a330e5 100644 --- a/sw/inc/SidebarWin.hxx +++ b/sw/inc/SidebarWin.hxx @@ -189,7 +189,7 @@ class SwSidebarWin : public vcl::Window SfxItemSet DefaultItem(); DECL_LINK(ModifyHdl, void*); - DECL_LINK(ScrollHdl, ScrollBar*); + DECL_LINK_TYPED(ScrollHdl, ScrollBar*, void); DECL_LINK_TYPED(DeleteHdl, void*, void); inline SwView& DocView() { return mrView;} diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 62f3748d6a01..3892e4086246 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -290,9 +290,9 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SAL_DLLPRIVATE long PhyPageUp(); SAL_DLLPRIVATE long PhyPageDown(); - SAL_DLLPRIVATE int _CreateScrollbar( bool bHori ); - DECL_DLLPRIVATE_LINK( ScrollHdl, SwScrollbar * ); - DECL_DLLPRIVATE_LINK( EndScrollHdl, SwScrollbar * ); + SAL_DLLPRIVATE int _CreateScrollbar( bool bHori ); + DECL_DLLPRIVATE_LINK_TYPED( ScrollHdl, ScrollBar*, void ); + DECL_DLLPRIVATE_LINK_TYPED( EndScrollHdl, ScrollBar*, void ); SAL_DLLPRIVATE bool UpdateScrollbars(); DECL_DLLPRIVATE_LINK( WindowChildEventListener, VclSimpleEvent* ); SAL_DLLPRIVATE void CalcVisArea( const Size &rPixelSz ); diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index 598694fb3d89..ee30e49e9e7d 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -60,7 +60,7 @@ class SwAddressControl_Impl : public Control bool m_bNoDataSet; - DECL_LINK(ScrollHdl_Impl, ScrollBar*); + DECL_LINK_TYPED(ScrollHdl_Impl, ScrollBar*, void); DECL_LINK(GotFocusHdl_Impl, Edit*); DECL_LINK(EditModifyHdl_Impl, Edit*); @@ -102,7 +102,7 @@ SwAddressControl_Impl::SwAddressControl_Impl(vcl::Window* pParent, WinBits nBits m_pWindow->Show(); m_pScrollBar->Show(); - Link<> aScrollLink = LINK(this, SwAddressControl_Impl, ScrollHdl_Impl); + Link<ScrollBar*,void> aScrollLink = LINK(this, SwAddressControl_Impl, ScrollHdl_Impl); m_pScrollBar->SetScrollHdl(aScrollLink); m_pScrollBar->SetEndScrollHdl(aScrollLink); m_pScrollBar->EnableDrag(); @@ -262,12 +262,10 @@ void SwAddressControl_Impl::SetCurrentDataSet(sal_uInt32 nSet) } } -IMPL_LINK(SwAddressControl_Impl, ScrollHdl_Impl, ScrollBar*, pScroll) +IMPL_LINK_TYPED(SwAddressControl_Impl, ScrollHdl_Impl, ScrollBar*, pScroll, void) { long nThumb = pScroll->GetThumbPos(); m_pWindow->SetPosPixel(Point(0, - (m_nLineHeight * nThumb))); - - return 0; } IMPL_LINK(SwAddressControl_Impl, GotFocusHdl_Impl, Edit*, pEdit) diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index ed3096b74a04..c4219fc243cf 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -812,7 +812,7 @@ class SwAssignFieldsControl : public Control long m_nYOffset; long m_nFirstYPos; - DECL_LINK(ScrollHdl_Impl, ScrollBar*); + DECL_LINK_TYPED(ScrollHdl_Impl, ScrollBar*, void); DECL_LINK(MatchHdl_Impl, ListBox*); DECL_LINK(GotFocusHdl_Impl, ListBox*); @@ -1082,7 +1082,7 @@ void SwAssignFieldsControl::MakeVisible( sal_Int32 nIndex ) ScrollHdl_Impl( m_aVScroll.get() ); } -IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll) +IMPL_LINK_TYPED(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll, void) { long nThumb = pScroll->GetThumbPos(); // the scrollbar moves on a per line basis @@ -1099,8 +1099,6 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll) for(auto aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter) lcl_Move(*aFIIter, nMove); SetUpdateMode(true); - - return 0; } IMPL_LINK(SwAssignFieldsControl, MatchHdl_Impl, ListBox*, pBox) diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 1021428b903c..3901058e6232 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -231,10 +231,9 @@ void SwAddressPreview::Resize() positionScrollBar(); } -IMPL_LINK_NOARG(SwAddressPreview, ScrollHdl) +IMPL_LINK_NOARG_TYPED(SwAddressPreview, ScrollHdl, ScrollBar*, void) { Invalidate(); - return 0; } void SwAddressPreview::AddAddress(const OUString& rAddress) diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index 7023c79dca78..18098655fc26 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -1176,11 +1176,10 @@ void SwSidebarWin::Delete() } } -IMPL_LINK(SwSidebarWin, ScrollHdl, ScrollBar*, pScroll) +IMPL_LINK_TYPED(SwSidebarWin, ScrollHdl, ScrollBar*, pScroll, void) { long nDiff = GetOutlinerView()->GetEditView().GetVisArea().Top() - pScroll->GetThumbPos(); GetOutlinerView()->Scroll( 0, nDiff ); - return 0; } IMPL_LINK_NOARG(SwSidebarWin, ModifyHdl) diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 1b585cd15a34..a5db5cb80a82 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -574,7 +574,7 @@ void SwSrcEditWindow::InitScrollBars() } -IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll) +IMPL_LINK_TYPED(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll, void) { if(pScroll == pVScrollbar) { @@ -591,7 +591,6 @@ IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll) pScroll->SetThumbPos( pTextView->GetStartDocPos().X() ); } GetSrcView()->GetViewFrame()->GetBindings().Invalidate( SID_TABLE_CELL ); - return 0; } IMPL_LINK_TYPED( SwSrcEditWindow, SyntaxTimerHdl, Idle *, pIdle, void ) diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx index 49edd57f5164..eb0eed5ee5db 100644 --- a/sw/source/uibase/inc/mailmergehelper.hxx +++ b/sw/source/uibase/inc/mailmergehelper.hxx @@ -73,7 +73,7 @@ class SW_DLLPUBLIC SwAddressPreview : public vcl::Window virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE; void UpdateScrollBar(); - DECL_LINK(ScrollHdl, void*); + DECL_LINK_TYPED(ScrollHdl, ScrollBar*,void); public: SwAddressPreview(vcl::Window* pParent, WinBits nStyle=WB_BORDER); diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index 0e63261101f9..851e08862d5d 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -196,8 +196,8 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const; SAL_DLLPRIVATE int _CreateScrollbar( bool bHori); - DECL_DLLPRIVATE_LINK(ScrollHdl, SwScrollbar*); - DECL_DLLPRIVATE_LINK(EndScrollHdl, SwScrollbar*); + DECL_DLLPRIVATE_LINK_TYPED(ScrollHdl, ScrollBar*, void); + DECL_DLLPRIVATE_LINK_TYPED(EndScrollHdl, ScrollBar*, void); SAL_DLLPRIVATE bool ChgPage( int eMvMode, bool bUpdateScrollbar = true ); SAL_DLLPRIVATE virtual SfxPrinter* GetPrinter( bool bCreate = false ) SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx index e6c2ab5c73be..1fdd395228e0 100644 --- a/sw/source/uibase/inc/srcedtw.hxx +++ b/sw/source/uibase/inc/srcedtw.hxx @@ -112,7 +112,7 @@ protected: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; - DECL_LINK(ScrollHdl, ScrollBar*); + DECL_LINK_TYPED(ScrollHdl, ScrollBar*, void); public: SwSrcEditWindow( vcl::Window* pParent, SwSrcView* pParentView ); diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 6f16f8bcdbcd..06e059c24392 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1403,10 +1403,11 @@ void SwPagePreview::SetVisArea( const Rectangle &rRect, bool bUpdateScrollbar ) pViewWin->Invalidate(); } -IMPL_LINK( SwPagePreview, ScrollHdl, SwScrollbar *, pScrollbar ) +IMPL_LINK_TYPED( SwPagePreview, ScrollHdl, ScrollBar *, p, void ) { + SwScrollbar* pScrollbar = static_cast<SwScrollbar*>(p); if(!GetViewShell()) - return 0; + return; if( !pScrollbar->IsHoriScroll() && pScrollbar->GetType() == SCROLL_DRAG && Help::IsQuickHelpEnabled() && @@ -1433,13 +1434,13 @@ IMPL_LINK( SwPagePreview, ScrollHdl, SwScrollbar *, pScrollbar ) } else EndScrollHdl( pScrollbar ); - return 0; } -IMPL_LINK( SwPagePreview, EndScrollHdl, SwScrollbar *, pScrollbar ) +IMPL_LINK_TYPED( SwPagePreview, EndScrollHdl, ScrollBar *, p, void ) { + SwScrollbar* pScrollbar = static_cast<SwScrollbar*>(p); if(!GetViewShell()) - return 0; + return; // boolean to avoid unnecessary invalidation of the window. bool bInvalidateWin = true; @@ -1524,7 +1525,6 @@ IMPL_LINK( SwPagePreview, EndScrollHdl, SwScrollbar *, pScrollbar ) { pViewWin->Invalidate(); } - return 0; } Point SwPagePreview::AlignToPixel(const Point &rPt) const diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 231ef09ae9ba..d86aac3e90e3 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -661,10 +661,11 @@ bool SwView::PageDownCrsr(bool bSelect) // Handler of the scrollbars -IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar ) +IMPL_LINK_TYPED( SwView, ScrollHdl, ScrollBar *, p, void ) { + SwScrollbar* pScrollbar = static_cast<SwScrollbar*>(p); if ( GetWrtShell().ActionPend() ) - return 0; + return; if ( pScrollbar->GetType() == SCROLL_DRAG ) m_pWrtShell->EnableSmooth( false ); @@ -728,14 +729,13 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar ) if ( pScrollbar->GetType() == SCROLL_DRAG ) m_pWrtShell->EnableSmooth( true ); - - return 0; } // Handler of the scrollbars -IMPL_LINK( SwView, EndScrollHdl, SwScrollbar *, pScrollbar ) +IMPL_LINK_TYPED( SwView, EndScrollHdl, ScrollBar *, p, void ) { + SwScrollbar* pScrollbar = static_cast<SwScrollbar*>(p); if ( !GetWrtShell().ActionPend() ) { if(nPgNum) @@ -753,7 +753,6 @@ IMPL_LINK( SwView, EndScrollHdl, SwScrollbar *, pScrollbar ) GetViewFrame()->GetBindings().Update(FN_STAT_PAGE); } - return 0; } // Calculates the size of the m_aVisArea in dependency of the size of diff --git a/toolkit/source/awt/scrollabledialog.cxx b/toolkit/source/awt/scrollabledialog.cxx index b1d898d573a9..4d6fc4df55c6 100644 --- a/toolkit/source/awt/scrollabledialog.cxx +++ b/toolkit/source/awt/scrollabledialog.cxx @@ -39,7 +39,7 @@ ScrollableWrapper<T>::ScrollableWrapper( vcl::Window* pParent, WinBits nStyle, D mbHasVertBar( false ), maScrollVis( None ) { - Link<> aLink( LINK( this, ScrollableWrapper, ScrollBarHdl ) ); + Link<ScrollBar*,void> aLink( LINK( this, ScrollableWrapper, ScrollBarHdl ) ); maVScrollBar->SetScrollHdl( aLink ); maHScrollBar->SetScrollHdl( aLink ); @@ -119,20 +119,19 @@ void ScrollableWrapper<T>::lcl_Scroll( long nX, long nY ) //IMPL_LINK( ScrollableWrapper, ScrollBarHdl, ScrollBar*, pSB ) template< class T> -sal_IntPtr ScrollableWrapper<T>::LinkStubScrollBarHdl( void* pThis, void* pCaller) +void ScrollableWrapper<T>::LinkStubScrollBarHdl( void* pThis, ScrollBar* pCaller) { - return static_cast<ScrollableWrapper<T>*>(pThis)->ScrollBarHdl( static_cast<ScrollBar*>(pCaller) ); + static_cast<ScrollableWrapper<T>*>(pThis)->ScrollBarHdl( static_cast<ScrollBar*>(pCaller) ); } template< class T> -sal_IntPtr ScrollableWrapper<T>::ScrollBarHdl( ScrollBar* pSB ) +void ScrollableWrapper<T>::ScrollBarHdl( ScrollBar* pSB ) { sal_uInt16 nPos = (sal_uInt16) pSB->GetThumbPos(); if( pSB == maVScrollBar.get() ) lcl_Scroll(mnScrollPos.X(), nPos ); else if( pSB == maHScrollBar.get() ) lcl_Scroll(nPos, mnScrollPos.Y() ); - return 1; } template< class T> diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx index 5a010e957748..5f79f70b6c90 100644 --- a/vcl/inc/ilstbox.hxx +++ b/vcl/inc/ilstbox.hxx @@ -403,7 +403,7 @@ protected: void ImplCheckScrollBars(); void ImplInitScrollBars(); - DECL_LINK( ScrollBarHdl, ScrollBar* ); + DECL_LINK_TYPED( ScrollBarHdl, ScrollBar*, void ); DECL_LINK( LBWindowScrolled, void* ); DECL_LINK( MRUChanged, void* ); diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 328510cdd958..a52d34ad95cf 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -2139,7 +2139,7 @@ ImplListBox::ImplListBox( vcl::Window* pParent, WinBits nWinStyle ) : mpHScrollBar = VclPtr<ScrollBar>::Create( this, WB_HSCROLL | WB_DRAG ); mpScrollBarBox = VclPtr<ScrollBarBox>::Create( this ); - Link<> aLink( LINK( this, ImplListBox, ScrollBarHdl ) ); + Link<ScrollBar*,void> aLink( LINK( this, ImplListBox, ScrollBarHdl ) ); mpVScrollBar->SetScrollHdl( aLink ); mpHScrollBar->SetScrollHdl( aLink ); @@ -2268,15 +2268,13 @@ IMPL_LINK_NOARG(ImplListBox, LBWindowScrolled) return 1; } -IMPL_LINK( ImplListBox, ScrollBarHdl, ScrollBar*, pSB ) +IMPL_LINK_TYPED( ImplListBox, ScrollBarHdl, ScrollBar*, pSB, void ) { sal_uInt16 nPos = (sal_uInt16) pSB->GetThumbPos(); if( pSB == mpVScrollBar ) SetTopEntry( nPos ); else if( pSB == mpHScrollBar ) SetLeftIndent( nPos ); - - return 1; } void ImplListBox::ImplCheckScrollBars() diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index de1c67525316..127ce91a0d79 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -93,7 +93,7 @@ protected: void ImpInitScrollBars(); void ImpSetScrollBarRanges(); void ImpSetHScrollBarThumbPos(); - DECL_LINK( ScrollHdl, ScrollBar* ); + DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); public: ImpVclMEdit( VclMultiLineEdit* pVclMultiLineEdit, WinBits nWinStyle ); @@ -319,7 +319,7 @@ void ImpVclMEdit::ImpSetHScrollBarThumbPos() } -IMPL_LINK( ImpVclMEdit, ScrollHdl, ScrollBar*, pCurScrollBar ) +IMPL_LINK_TYPED( ImpVclMEdit, ScrollHdl, ScrollBar*, pCurScrollBar, void ) { long nDiffX = 0, nDiffY = 0; @@ -330,8 +330,6 @@ IMPL_LINK( ImpVclMEdit, ScrollHdl, ScrollBar*, pCurScrollBar ) mpTextWindow->GetTextView()->Scroll( nDiffX, nDiffY ); // mpTextWindow->GetTextView()->ShowCursor( false, true ); - - return 0; } void ImpVclMEdit::SetAlign( WinBits nWinStyle ) diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index ddc3a7a5c73b..3b2f042745de 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1633,7 +1633,7 @@ VclScrolledWindow::VclScrolledWindow(vcl::Window *pParent, WinBits nStyle) { SetType(WINDOW_SCROLLWINDOW); - Link<> aLink( LINK( this, VclScrolledWindow, ScrollBarHdl ) ); + Link<ScrollBar*,void> aLink( LINK( this, VclScrolledWindow, ScrollBarHdl ) ); m_pVScroll->SetScrollHdl(aLink); m_pHScroll->SetScrollHdl(aLink); } @@ -1646,18 +1646,18 @@ void VclScrolledWindow::dispose() VclBin::dispose(); } -IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl) +IMPL_LINK_NOARG_TYPED(VclScrolledWindow, ScrollBarHdl, ScrollBar*, void) { vcl::Window *pChild = get_child(); if (!pChild) - return 1; + return; assert(dynamic_cast<VclViewport*>(pChild) && "scrolledwindow child should be a Viewport"); pChild = pChild->GetWindow(GetWindowType::FirstChild); if (!pChild) - return 1; + return; Point aWinPos; @@ -1672,8 +1672,6 @@ IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl) } pChild->SetPosPixel(aWinPos); - - return 1; } const vcl::Window *VclScrolledWindow::get_child() const |