diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-31 08:59:43 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-31 09:50:11 +0200 |
commit | 42ee163bc0a1b1b58a4481f9da7fb294dea9d6df (patch) | |
tree | 87f79c902ee93857b3c8a4827763592a43c12222 | |
parent | b6e95a8c9997e03099492079ebc34c4a47b8b502 (diff) |
convert Link<> to typed
Change-Id: I22f995b905e7abf1451a0636083bf19b3f2d9bc4
-rw-r--r-- | cui/source/options/webconninfo.cxx | 3 | ||||
-rw-r--r-- | cui/source/options/webconninfo.hxx | 12 | ||||
-rw-r--r-- | include/svtools/simptabl.hxx | 11 | ||||
-rw-r--r-- | sc/source/ui/inc/acredlin.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/acredlin.cxx | 3 | ||||
-rw-r--r-- | svtools/source/contnr/simptabl.cxx | 14 | ||||
-rw-r--r-- | sw/source/uibase/inc/redlndlg.hxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/misc/redlndlg.cxx | 4 |
8 files changed, 17 insertions, 38 deletions
diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index b58a7cbf2ee6..1d7301fb128b 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -154,10 +154,9 @@ void WebConnectionInfoDialog::dispose() ModalDialog::dispose(); } -IMPL_LINK( WebConnectionInfoDialog, HeaderBarClickedHdl, SvSimpleTable*, pTable ) +IMPL_LINK_TYPED( WebConnectionInfoDialog, HeaderBarClickedHdl, SvSimpleTable*, pTable, void ) { m_pPasswordsLB->Resort( NULL == pTable ); - return 0; } diff --git a/cui/source/options/webconninfo.hxx b/cui/source/options/webconninfo.hxx index 02bf741eff6e..a9b8de1834ec 100644 --- a/cui/source/options/webconninfo.hxx +++ b/cui/source/options/webconninfo.hxx @@ -50,13 +50,13 @@ namespace svx VclPtr<PushButton> m_pChangeBtn; sal_Int32 m_nPos; - DECL_LINK( HeaderBarClickedHdl, SvSimpleTable* ); - DECL_LINK_TYPED(RemovePasswordHdl, Button*, void); - DECL_LINK_TYPED(RemoveAllPasswordsHdl, Button*, void); - DECL_LINK_TYPED(ChangePasswordHdl, Button*, void); - DECL_LINK( EntrySelectedHdl, void* ); + DECL_LINK_TYPED( HeaderBarClickedHdl, SvSimpleTable*, void ); + DECL_LINK_TYPED( RemovePasswordHdl, Button*, void ); + DECL_LINK_TYPED( RemoveAllPasswordsHdl, Button*, void ); + DECL_LINK_TYPED( ChangePasswordHdl, Button*, void ); + DECL_LINK( EntrySelectedHdl, void* ); - void FillPasswordList(); + void FillPasswordList(); public: explicit WebConnectionInfoDialog( vcl::Window* pParent ); diff --git a/include/svtools/simptabl.hxx b/include/svtools/simptabl.hxx index d62ee3991457..4e1c64a6ec13 100644 --- a/include/svtools/simptabl.hxx +++ b/include/svtools/simptabl.hxx @@ -51,9 +51,8 @@ class SVT_DLLPUBLIC SvSimpleTable : public SvHeaderTabListBox private: SvSimpleTableContainer& m_rParentTableContainer; - Link<> aHeaderBarClickLink; - Link<> aHeaderBarDblClickLink; - Link<> aCommandLink; + Link<SvSimpleTable*, void> aHeaderBarClickLink; + Link<SvSimpleTable*, void> aCommandLink; CommandEvent aCEvt; VclPtr<HeaderBar> aHeaderBar; long nOldPos; @@ -68,7 +67,6 @@ private: DECL_LINK_TYPED( DragHdl, HeaderBar*, void ); DECL_LINK_TYPED( EndDragHdl, HeaderBar*, void ); DECL_LINK_TYPED( HeaderBarClick, HeaderBar*, void ); - DECL_LINK_TYPED( HeaderBarDblClick, HeaderBar*, void ); DECL_LINK( CompareHdl, SvSortData* ); protected: @@ -79,7 +77,6 @@ protected: virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE; virtual void HBarClick(); - void HBarDblClick(); void HBarStartDrag(); void HBarDrag(); void HBarEndDrag(); @@ -119,9 +116,9 @@ public: CommandEvent GetCommandEvent()const { return aCEvt;} inline bool IsFocusOnCellEnabled() const { return IsCellFocusEnabled(); } - void SetCommandHdl( const Link<>& rLink ) { aCommandLink = rLink; } + void SetCommandHdl( const Link<SvSimpleTable*,void>& rLink ) { aCommandLink = rLink; } - void SetHeaderBarClickHdl( const Link<>& rLink ) { aHeaderBarClickLink = rLink; } + void SetHeaderBarClickHdl( const Link<SvSimpleTable*,void>& rLink ) { aHeaderBarClickLink = rLink; } HeaderBar& GetTheHeaderBar() { return *aHeaderBar.get(); } }; diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx index 860c402536a6..c0ea474dfb47 100644 --- a/sc/source/ui/inc/acredlin.hxx +++ b/sc/source/ui/inc/acredlin.hxx @@ -109,7 +109,7 @@ private: DECL_LINK_TYPED( UpdateSelectionHdl, Idle*, void ); DECL_LINK( ChgTrackModHdl, ScChangeTrack*); - DECL_LINK( CommandHdl, void*); + DECL_LINK_TYPED( CommandHdl, SvSimpleTable*, void); DECL_LINK_TYPED( ReOpenTimerHdl, Idle*, void ); DECL_LINK( ColCompareHdl, SvSortData*); diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index b763e6fddf7e..44088710cca3 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -1691,7 +1691,7 @@ IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, UpdateSelectionHdl, Idle *, void) pTPView->EnableReject( bRejectFlag && bEnable ); } -IMPL_LINK_NOARG(ScAcceptChgDlg, CommandHdl) +IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, CommandHdl, SvSimpleTable*, void) { const CommandEvent aCEvt(pTheView->GetCommandEvent()); @@ -1775,7 +1775,6 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, CommandHdl) } } } - return 0; } void ScAcceptChgDlg::Initialize(SfxChildWinInfo *pInfo) diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx index b2515d1fe8d6..16a16bbfeaa9 100644 --- a/svtools/source/contnr/simptabl.cxx +++ b/svtools/source/contnr/simptabl.cxx @@ -104,7 +104,6 @@ SvSimpleTable::SvSimpleTable(SvSimpleTableContainer& rParent, WinBits nBits): aHeaderBar->SetDragHdl(LINK( this, SvSimpleTable, DragHdl)); aHeaderBar->SetEndDragHdl(LINK( this, SvSimpleTable, EndDragHdl)); aHeaderBar->SetSelectHdl(LINK( this, SvSimpleTable, HeaderBarClick)); - aHeaderBar->SetDoubleClickHdl(LINK( this, SvSimpleTable, HeaderBarDblClick)); EnableCellFocus(); @@ -334,11 +333,6 @@ void SvSimpleTable::HBarClick() } } -void SvSimpleTable::HBarDblClick() -{ - aHeaderBarDblClickLink.Call(this); -} - void SvSimpleTable::HBarStartDrag() { if(!aHeaderBar->IsItemMode()) @@ -426,14 +420,6 @@ IMPL_LINK_TYPED( SvSimpleTable, HeaderBarClick, HeaderBar*, pCtr, void) } } -IMPL_LINK_TYPED( SvSimpleTable, HeaderBarDblClick, HeaderBar*, pCtr, void) -{ - if(pCtr==aHeaderBar.get()) - { - HBarDblClick(); - } -} - SvLBoxItem* SvSimpleTable::GetEntryAtPos( SvTreeListEntry* pEntry, sal_uInt16 nPos ) const { DBG_ASSERT(pEntry,"GetEntryText:Invalid Entry"); diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx index 7d41528f1809..e644d92d1d1a 100644 --- a/sw/source/uibase/inc/redlndlg.hxx +++ b/sw/source/uibase/inc/redlndlg.hxx @@ -97,9 +97,9 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg DECL_DLLPRIVATE_LINK( SelectHdl, void* ); DECL_DLLPRIVATE_LINK_TYPED( SelectTimerHdl, Timer*, void ); DECL_DLLPRIVATE_LINK_TYPED( GotoHdl, Timer*, void ); - DECL_DLLPRIVATE_LINK( CommandHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( CommandHdl, SvSimpleTable*, void ); - SAL_DLLPRIVATE sal_uInt16 CalcDiff(sal_uInt16 nStart, bool bChild); + SAL_DLLPRIVATE sal_uInt16 CalcDiff(sal_uInt16 nStart, bool bChild); SAL_DLLPRIVATE void InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, const sal_uInt16 nAutoFormat); SAL_DLLPRIVATE void InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd = USHRT_MAX); SAL_DLLPRIVATE void RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd); @@ -125,7 +125,7 @@ public: void Initialize(const OUString &rExtraData); void FillInfo(OUString &rExtraData) const; - void Activate(); + void Activate(); }; class SwModelessRedlineAcceptDlg : public SfxModelessDialog diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index 9e9728878017..ce3591947f8d 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -1020,7 +1020,7 @@ IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, GotoHdl, Timer *, void) pTPView->EnableRejectAll( bEnable && !bOnlyFormatedRedlines && !bHasReadonlySel ); } -IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl) +IMPL_LINK_NOARG_TYPED(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void) { const CommandEvent aCEvt(pTable->GetCommandEvent()); @@ -1185,8 +1185,6 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl) break; default: break; } - - return 0; } void SwRedlineAcceptDlg::Initialize(const OUString& rExtraData) |