diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-28 16:20:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-31 09:50:10 +0200 |
commit | 410c06bec452b09cd15ddfcb82b8b2b0508f3c55 (patch) | |
tree | a7841b14e58bf02a3f45d5a0547dc711b3dc7cba | |
parent | 32673845809df70efe2651c3ca82f574245279c2 (diff) |
convert Link<> to typed
and remove some dead code
Change-Id: I608ed684fafb33390d869f7ebd4000c53d7fb28d
-rw-r--r-- | cui/source/dialogs/iconcdlg.cxx | 4 | ||||
-rw-r--r-- | cui/source/inc/iconcdlg.hxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppSwapWindow.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppSwapWindow.hxx | 2 | ||||
-rw-r--r-- | include/svtools/ivctrl.hxx | 16 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/ivctrl.cxx | 10 |
7 files changed, 14 insertions, 34 deletions
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index b24807bea094..e40135cbf06e 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -356,7 +356,7 @@ void IconChoiceDialog::ShowPage(sal_uInt16 nId) | select a page | \**********************************************************************/ -IMPL_LINK_NOARG(IconChoiceDialog , ChosePageHdl_Impl) +IMPL_LINK_NOARG_TYPED(IconChoiceDialog , ChosePageHdl_Impl, SvtIconChoiceCtrl*, void) { SvxIconChoiceCtrlEntry *pEntry = m_pIconCtrl->GetSelectedEntry(); if ( !pEntry ) @@ -368,8 +368,6 @@ IMPL_LINK_NOARG(IconChoiceDialog , ChosePageHdl_Impl) { ShowPage(*pId); } - - return 0L; } /********************************************************************** diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx index b34f4e396bde..d95edc8b50f1 100644 --- a/cui/source/inc/iconcdlg.hxx +++ b/cui/source/inc/iconcdlg.hxx @@ -141,11 +141,11 @@ private: bool bInOK; bool bItemsReset; - DECL_LINK ( ChosePageHdl_Impl, void * ); - DECL_LINK_TYPED(OkHdl, Button*, void); - DECL_LINK_TYPED(ApplyHdl, Button*, void); - DECL_LINK_TYPED(ResetHdl, Button*, void); - DECL_LINK_TYPED(CancelHdl, Button*, void); + DECL_LINK_TYPED( ChosePageHdl_Impl, SvtIconChoiceCtrl*, void ); + DECL_LINK_TYPED( OkHdl, Button*, void ); + DECL_LINK_TYPED( ApplyHdl, Button*, void) ; + DECL_LINK_TYPED( ResetHdl, Button*, void) ; + DECL_LINK_TYPED( CancelHdl, Button*, void ); IconChoicePageData* GetPageData ( sal_uInt16 nId ); void Start_Impl(); diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index f8c57cef4695..6544c40c869f 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -157,7 +157,7 @@ bool OApplicationSwapWindow::onContainerSelected( ElementType _eType ) return false; } -IMPL_LINK(OApplicationSwapWindow, OnContainerSelectHdl, SvtIconChoiceCtrl*, _pControl) +IMPL_LINK_TYPED(OApplicationSwapWindow, OnContainerSelectHdl, SvtIconChoiceCtrl*, _pControl, void) { SvxIconChoiceCtrlEntry* pEntry = _pControl->GetSelectedEntry(); ElementType eType = E_NONE; @@ -166,8 +166,6 @@ IMPL_LINK(OApplicationSwapWindow, OnContainerSelectHdl, SvtIconChoiceCtrl*, _pCo eType = *static_cast<ElementType*>(pEntry->GetUserData()); onContainerSelected( eType ); // i87582 } - - return 1L; } IMPL_LINK_NOARG_TYPED(OApplicationSwapWindow, ChangeToLastSelected, void*, void) diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx index dba8d5f9db5b..479271214365 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.hxx +++ b/dbaccess/source/ui/app/AppSwapWindow.hxx @@ -37,7 +37,7 @@ namespace dbaui void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); - DECL_LINK( OnContainerSelectHdl, SvtIconChoiceCtrl* ); + DECL_LINK_TYPED( OnContainerSelectHdl, SvtIconChoiceCtrl*, void ); DECL_LINK_TYPED( ChangeToLastSelected, void*, void ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE; diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx index 136be9427ddb..11f9ac5c8a4b 100644 --- a/include/svtools/ivctrl.hxx +++ b/include/svtools/ivctrl.hxx @@ -206,18 +206,14 @@ class SVT_DLLPUBLIC SvtIconChoiceCtrl : public Control { friend class SvxIconChoiceCtrl_Impl; - Link<> _aClickIconHdl; - Link<> _aDocRectChangedHdl; - Link<> _aVisRectChangedHdl; - KeyEvent* _pCurKeyEvent; - SvxIconChoiceCtrl_Impl* _pImp; - bool _bAutoFontColor; + Link<SvtIconChoiceCtrl*,void> _aClickIconHdl; + KeyEvent* _pCurKeyEvent; + SvxIconChoiceCtrl_Impl* _pImp; + bool _bAutoFontColor; protected: virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; - void DocumentRectChanged(); - void VisibleRectChanged(); virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE; virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -257,8 +253,8 @@ public: void SetFont( const vcl::Font& rFont ); void SetPointFont( const vcl::Font& rFont ); - void SetClickHdl( const Link<>& rLink ) { _aClickIconHdl = rLink; } - const Link<>& GetClickHdl() const { return _aClickIconHdl; } + void SetClickHdl( const Link<SvtIconChoiceCtrl*,void>& rLink ) { _aClickIconHdl = rLink; } + const Link<SvtIconChoiceCtrl*,void>& GetClickHdl() const { return _aClickIconHdl; } using OutputDevice::SetBackground; void SetBackground( const Wallpaper& rWallpaper ); diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 0a115d96c5e1..dedeaf88c630 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -2751,13 +2751,11 @@ IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, AutoArrangeHdl, Idle *, void) IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, VisRectChangedHdl, Idle *, void) { aVisRectChangedIdle.Stop(); - pView->VisibleRectChanged(); } IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, DocRectChangedHdl, Idle *, void) { aDocRectChangedIdle.Stop(); - pView->DocumentRectChanged(); } bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ) diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 01b76a4eb9b9..de4293cf88d7 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -194,16 +194,6 @@ Point SvtIconChoiceCtrl::GetPixelPos( const Point& rPosLogic ) const return aPos; } -void SvtIconChoiceCtrl::DocumentRectChanged() -{ - _aDocRectChangedHdl.Call( this ); -} - -void SvtIconChoiceCtrl::VisibleRectChanged() -{ - _aVisRectChangedHdl.Call( this ); -} - void SvtIconChoiceCtrl::GetFocus() { _pImp->GetFocus(); |