diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-09 07:23:12 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-09 08:10:11 +0000 |
commit | be73c1602dbe4d0f09d0e9c4853ec89df3eb37ad (patch) | |
tree | 90fea0177273fd5a9499fa66e84f3316de3fe6d7 | |
parent | 61afb4bebafe6e615611e74b17ce0fc43648813f (diff) |
convert Link<> to typed
Change-Id: I3127752785b77672d37f99bc9eaa881377dabe7c
Reviewed-on: https://gerrit.libreoffice.org/18431
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
24 files changed, 28 insertions, 48 deletions
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 2a9005a3e9ef..b1c205ef4827 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -1303,9 +1303,8 @@ namespace pcr } - IMPL_LINK( DropDownEditControl, ReturnHdl, OMultilineFloatingEdit*, /*pMEd*/) + IMPL_LINK_NOARG_TYPED( DropDownEditControl, ReturnHdl, FloatingWindow*, void) { - OUString aStr = m_pFloatingEdit->getEdit().GetText(); OUString aStr2 = GetText(); ShowDropDown(false); @@ -1315,8 +1314,6 @@ namespace pcr if ( m_pHelper ) m_pHelper->notifyModifiedValue(); } - - return 0; } diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx index e88111c453f7..7345543ffd5e 100644 --- a/extensions/source/propctrlr/standardcontrol.hxx +++ b/extensions/source/propctrlr/standardcontrol.hxx @@ -406,7 +406,7 @@ namespace pcr long FindPos(long nSinglePos); private: - DECL_LINK( ReturnHdl, OMultilineFloatingEdit* ); + DECL_LINK_TYPED( ReturnHdl, FloatingWindow*, void ); DECL_LINK_TYPED( DropDownHdl, Button*, void ); bool ShowDropDown( bool bShow ); diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx index 2ceb70485e21..2fbbcbfc20ad 100644 --- a/include/sfx2/tbxctrl.hxx +++ b/include/sfx2/tbxctrl.hxx @@ -173,7 +173,7 @@ friend struct SfxTbxCtrlFactory; SfxToolBoxControl_Impl* pImpl; protected: - DECL_LINK( PopupModeEndHdl, void * ); + DECL_LINK_TYPED( PopupModeEndHdl, FloatingWindow*, void ); DECL_LINK_TYPED( ClosePopupWindow, SfxPopupWindow *, void ); // old SfxToolBoxControl methods diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx index a9546b529a3b..6bb8bf365123 100644 --- a/include/svtools/calendar.hxx +++ b/include/svtools/calendar.hxx @@ -360,7 +360,7 @@ private: DECL_DLLPRIVATE_LINK_TYPED( ImplSelectHdl, Calendar*, void ); DECL_DLLPRIVATE_LINK_TYPED( ImplClickHdl, Button*, void ); - DECL_DLLPRIVATE_LINK( ImplPopupModeEndHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplPopupModeEndHdl, FloatingWindow*, void ); public: CalendarField( vcl::Window* pParent, WinBits nWinStyle ); diff --git a/include/svx/lboxctrl.hxx b/include/svx/lboxctrl.hxx index a782530c7a84..a6ab60dd5d05 100644 --- a/include/svx/lboxctrl.hxx +++ b/include/svx/lboxctrl.hxx @@ -38,7 +38,7 @@ protected: void Impl_SetInfo( sal_uInt16 nCount ); - DECL_LINK( PopupModeEndHdl, void * ); + DECL_LINK_TYPED( PopupModeEndHdl, FloatingWindow*, void ); DECL_LINK( SelectHdl, void * ); public: diff --git a/include/svx/sidebar/Popup.hxx b/include/svx/sidebar/Popup.hxx index 7b44492e0c63..6b0c7879905a 100644 --- a/include/svx/sidebar/Popup.hxx +++ b/include/svx/sidebar/Popup.hxx @@ -97,7 +97,7 @@ private: const ::rtl::OUString msAccessibleName; VclPtr<PopupContainer> mxContainer; - DECL_LINK(PopupModeEndHandler, void*); + DECL_LINK_TYPED(PopupModeEndHandler, FloatingWindow*, void); }; } } // end of namespace svx::sidebar diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index 07905fdc469c..49021e4fd605 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -118,7 +118,7 @@ private: mbStartDockingEnabled:1, mbLocked:1; - DECL_LINK( PopupModeEnd, void* ); + DECL_LINK_TYPED( PopupModeEnd, FloatingWindow*, void ); void ImplEnableStartDocking( bool bEnable = true ) { mbStartDockingEnabled = bEnable; } bool ImplStartDockingEnabled() { return mbStartDockingEnabled; } diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx index 9c64ada7c50c..68c43dde59c9 100644 --- a/include/vcl/floatwin.hxx +++ b/include/vcl/floatwin.hxx @@ -109,7 +109,7 @@ private: bool mbOldSaveBackMode; bool mbGrabFocus; // act as key input window, although focus is not set bool mbInCleanUp; - Link<> maPopupModeEndHdl; + Link<FloatingWindow*,void> maPopupModeEndHdl; SAL_DLLPRIVATE void ImplCallPopupModeEnd(); DECL_DLLPRIVATE_LINK_TYPED( ImplEndPopupModeHdl, void*, void ); @@ -166,7 +166,7 @@ public: bool IsPopupModeCanceled() const { return mbPopupModeCanceled; } bool IsPopupModeTearOff() const { return mbPopupModeTearOff; } - void SetPopupModeEndHdl( const Link<>& rLink ) { maPopupModeEndHdl = rLink; } + void SetPopupModeEndHdl( const Link<FloatingWindow*,void>& rLink ) { maPopupModeEndHdl = rLink; } bool GrabsFocus() const { return mbGrabFocus; } diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index 92072a0d0188..78a3b889788e 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -59,7 +59,7 @@ private: DECL_DLLPRIVATE_LINK( ImplScrollHdl, void* ); DECL_DLLPRIVATE_LINK( ImplCancelHdl, void* ); DECL_DLLPRIVATE_LINK( ImplDoubleClickHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplPopupModeEndHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplPopupModeEndHdl, FloatingWindow*, void ); DECL_DLLPRIVATE_LINK( ImplSelectionChangedHdl, void* ); DECL_DLLPRIVATE_LINK( ImplFocusHdl, void* ); DECL_DLLPRIVATE_LINK( ImplListItemSelectHdl, void* ); diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 281ae8cc96bb..5bcbac5d941f 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -200,7 +200,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou bool bAutoMarkVisible:1; bool bListValButton:1; - DECL_LINK( PopupModeEndHdl, void* ); + DECL_LINK_TYPED( PopupModeEndHdl, FloatingWindow*, void ); DECL_LINK( PopupSpellingHdl, SpellCallbackInfo* ); bool TestMouse( const MouseEvent& rMEvt, bool bAction ); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 995b174e5ea1..1dbe3062e3d2 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -577,12 +577,11 @@ void ScGridWindow::ClickExtern() } } -IMPL_LINK_NOARG(ScGridWindow, PopupModeEndHdl) +IMPL_LINK_NOARG_TYPED(ScGridWindow, PopupModeEndHdl, FloatingWindow*, void) { if (mpFilterBox) mpFilterBox->SetCancelled(); // cancel select GrabFocus(); - return 0; } IMPL_LINK( ScGridWindow, PopupSpellingHdl, SpellCallbackInfo*, pInfo ) diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 0a58943b2c30..3ca799d8fb2d 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -629,7 +629,7 @@ void SfxToolBoxControl::SetPopupWindow( SfxPopupWindow* pWindow ) -IMPL_LINK_NOARG(SfxToolBoxControl, PopupModeEndHdl) +IMPL_LINK_NOARG_TYPED(SfxToolBoxControl, PopupModeEndHdl, FloatingWindow*, void) { if ( pImpl->mpPopupWindow->IsVisible() ) { @@ -648,8 +648,6 @@ IMPL_LINK_NOARG(SfxToolBoxControl, PopupModeEndHdl) // will destroy itself. pImpl->mpPopupWindow.clear(); } - - return 1; } diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index a403848ebfe7..414ed855750f 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -2280,12 +2280,11 @@ IMPL_LINK_TYPED( CalendarField, ImplClickHdl, Button*, pButton, void ) } } -IMPL_LINK_NOARG(CalendarField, ImplPopupModeEndHdl) +IMPL_LINK_NOARG_TYPED(CalendarField, ImplPopupModeEndHdl, FloatingWindow*, void) { EndDropDown(); GrabFocus(); mpCalendar->EndSelection(); - return 0; } bool CalendarField::ShowDropDown( bool bShow ) diff --git a/svx/source/sidebar/tools/Popup.cxx b/svx/source/sidebar/tools/Popup.cxx index 8c0e855f5133..98064ee328d9 100644 --- a/svx/source/sidebar/tools/Popup.cxx +++ b/svx/source/sidebar/tools/Popup.cxx @@ -120,7 +120,7 @@ void Popup::CreateContainerAndControl() mxControl.set(maControlCreator(mxContainer.get())); } -IMPL_LINK_NOARG(Popup, PopupModeEndHandler) +IMPL_LINK_NOARG_TYPED(Popup, PopupModeEndHandler, FloatingWindow*, void) { if (maPopupModeEndCallback) maPopupModeEndCallback(); @@ -128,8 +128,6 @@ IMPL_LINK_NOARG(Popup, PopupModeEndHandler) // Popup control is no longer needed and can be destroyed. mxControl.disposeAndClear(); mxContainer.disposeAndClear(); - - return 0; } diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index 9c275caf9e34..91be05d287f4 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -162,7 +162,7 @@ void SvxListBoxControl::StateChanged( } -IMPL_LINK_NOARG(SvxListBoxControl, PopupModeEndHdl) +IMPL_LINK_NOARG_TYPED(SvxListBoxControl, PopupModeEndHdl, FloatingWindow*, void) { if( pPopupWin && FloatWinPopupFlags::NONE == pPopupWin->GetPopupModeFlags() && pPopupWin->IsUserSelected() ) @@ -176,7 +176,6 @@ IMPL_LINK_NOARG(SvxListBoxControl, PopupModeEndHdl) aArgs[0].Value = makeAny( sal_Int16( nCount )); SfxToolBoxControl::Dispatch( m_aCommandURL, aArgs ); } - return 0; } @@ -279,8 +278,7 @@ VclPtr<SfxPopupWindow> SvxUndoRedoControl::CreatePopupWindow() ToolBox& rBox = GetToolBox(); pPopupWin = VclPtr<SvxPopupWindowListBox>::Create( GetSlotId(), m_aCommandURL, GetId(), rBox ); - pPopupWin->SetPopupModeEndHdl( LINK( this, SvxUndoRedoControl, - PopupModeEndHdl ) ); + pPopupWin->SetPopupModeEndHdl( LINK( this, SvxUndoRedoControl, PopupModeEndHdl ) ); ListBox &rListBox = pPopupWin->GetListBox(); rListBox.SetSelectHdl( LINK( this, SvxUndoRedoControl, SelectHdl ) ); diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 3892e4086246..30084850c702 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -270,7 +270,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell DECL_DLLPRIVATE_LINK_TYPED( TimeoutHdl, Timer*, void ); - DECL_DLLPRIVATE_LINK( FieldPopupModeEndHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( FieldPopupModeEndHdl, FloatingWindow*, void ); inline long GetXScroll() const; inline long GetYScroll() const; diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 6d39178bca87..09548599edbf 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -110,7 +110,7 @@ class SwNavigationPI : public vcl::Window, DECL_LINK_TYPED( MenuSelectHdl, Menu *, bool ); DECL_LINK_TYPED( ChangePageHdl, Idle*, void ); DECL_LINK( PageEditModifyHdl, void* ); - DECL_LINK( PopupModeEndHdl, void * ); + DECL_LINK_TYPED( PopupModeEndHdl, FloatingWindow*, void ); DECL_LINK_TYPED( ClosePopupWindow, SfxPopupWindow *, void ); void UsePage(SwWrtShell *); diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 896d240acbe9..e48622ce3292 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -907,10 +907,9 @@ IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox ) return res; } -IMPL_LINK_NOARG(SwView, FieldPopupModeEndHdl) +IMPL_LINK_NOARG_TYPED(SwView, FieldPopupModeEndHdl, FloatingWindow*, void) { m_pFieldPopup.disposeAndClear(); - return 0; } void SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM ) diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 68b81fbb0c6f..97b1b9c44dce 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -888,7 +888,7 @@ void SwNavigationPI::SetPopupWindow( SfxPopupWindow* pWindow ) pPopupWindow->SetDeleteLink_Impl( LINK( this, SwNavigationPI, ClosePopupWindow )); } -IMPL_LINK_NOARG(SwNavigationPI, PopupModeEndHdl) +IMPL_LINK_NOARG_TYPED(SwNavigationPI, PopupModeEndHdl, FloatingWindow*, void) { if ( pPopupWindow->IsVisible() ) { @@ -904,8 +904,6 @@ IMPL_LINK_NOARG(SwNavigationPI, PopupModeEndHdl) // will destroy itself. pPopupWindow = 0; } - - return 1; } IMPL_LINK_TYPED( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow, void ) diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 9473edc1ccb8..4de4ec97ffda 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -82,7 +82,7 @@ struct ComboBox::Impl DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* ); DECL_DLLPRIVATE_LINK( ImplCancelHdl, void* ); DECL_DLLPRIVATE_LINK( ImplDoubleClickHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplPopupModeEndHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplPopupModeEndHdl, FloatingWindow*, void ); DECL_DLLPRIVATE_LINK( ImplSelectionChangedHdl, void* ); DECL_DLLPRIVATE_LINK( ImplListItemSelectHdl , void* ); @@ -327,7 +327,7 @@ void ComboBox::Impl::ImplClickButtonHandler( ImplBtn* ) m_pImplLB->GetMainWindow()->ImplClearLayoutData(); } -IMPL_LINK_NOARG(ComboBox::Impl, ImplPopupModeEndHdl) +IMPL_LINK_NOARG_TYPED(ComboBox::Impl, ImplPopupModeEndHdl, FloatingWindow*, void) { if (m_pFloatWin->IsPopupModeCanceled()) { @@ -348,7 +348,6 @@ IMPL_LINK_NOARG(ComboBox::Impl, ImplPopupModeEndHdl) m_pBtn->SetPressed( false ); m_rThis.CallEventListeners( VCLEVENT_DROPDOWN_CLOSE ); - return 0; } void ComboBox::Impl::ImplAutocompleteHandler( Edit* pEdit ) diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index b89f7f3a524d..a108a537b578 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -318,7 +318,7 @@ void ListBox::ImplClickButtonHandler( Control* ) } } -IMPL_LINK_NOARG(ListBox, ImplPopupModeEndHdl) +IMPL_LINK_NOARG_TYPED(ListBox, ImplPopupModeEndHdl, FloatingWindow*, void) { if( mpFloatWin->IsPopupModeCanceled() ) { @@ -333,7 +333,7 @@ IMPL_LINK_NOARG(ListBox, ImplPopupModeEndHdl) ImplAddDel( &aCheckDelete ); Select(); if ( aCheckDelete.IsDead() ) - return 0; + return; ImplRemoveDel( &aCheckDelete ); mpImplLB->SetTravelSelect( bTravelSelect ); @@ -348,7 +348,6 @@ IMPL_LINK_NOARG(ListBox, ImplPopupModeEndHdl) mpBtn->SetPressed( false ); CallEventListeners( VCLEVENT_DROPDOWN_CLOSE ); - return 0; } void ListBox::ToggleDropDown() diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index e8006c48c209..0de1c433e3bd 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -1158,7 +1158,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin } } -IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd) +IMPL_LINK_NOARG_TYPED(ImplDockingWindowWrapper, PopupModeEnd, FloatingWindow*, void) { GetWindow()->Show( false, ShowFlags::NoFocusChange ); @@ -1185,8 +1185,6 @@ IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd) // call handler - which will destroy the window and thus the wrapper as well ! GetWindow()->CallEventListeners( VCLEVENT_WINDOW_ENDPOPUPMODE, &aData ); - - return 0; } bool ImplDockingWindowWrapper::IsInPopupMode() const diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index a9fc9b4814e8..33d33e0ad324 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -260,7 +260,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDow } } -IMPL_LINK_NOARG(MenuFloatingWindow, PopupEnd) +IMPL_LINK_NOARG_TYPED(MenuFloatingWindow, PopupEnd, FloatingWindow*, void) { // "this" will be deleted before the end of this method! Menu* pM = pMenu; @@ -285,8 +285,6 @@ IMPL_LINK_NOARG(MenuFloatingWindow, PopupEnd) if ( pM ) pM->pStartedFrom = 0; - - return 0; } IMPL_LINK_NOARG_TYPED(MenuFloatingWindow, AutoScroll, Timer *, void) diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx index 00c797d6942e..60a688bad775 100644 --- a/vcl/source/window/menufloatingwindow.hxx +++ b/vcl/source/window/menufloatingwindow.hxx @@ -57,7 +57,7 @@ private: bool bIgnoreFirstMove : 1; bool bKeyInput : 1; - DECL_LINK(PopupEnd, void *); + DECL_LINK_TYPED(PopupEnd, FloatingWindow*, void); DECL_LINK_TYPED( HighlightChanged, Timer*, void ); DECL_LINK_TYPED(SubmenuClose, Timer *, void); DECL_LINK_TYPED(AutoScroll, Timer *, void); |