diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-23 09:39:17 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-23 13:07:09 +0000 |
commit | 473a8e2ccad0f58430c469ac3366153db033ac25 (patch) | |
tree | ec94dc696d3099014839bc6a2523024f3ea7581d /sw | |
parent | b2cd2e79b6fc152072d0f1e46b5c4ed2d489c09c (diff) |
convert Link<> to typed
Change-Id: Ie31b7f6ed89d684b6ec0ac8e6a144ef6024ba1d2
Reviewed-on: https://gerrit.libreoffice.org/18801
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/dbui/mmmergepage.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmmergepage.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldfunc.cxx | 13 | ||||
-rw-r--r-- | sw/source/ui/fldui/fldfunc.hxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/cctrl/actctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/actctrl.hxx | 4 |
6 files changed, 16 insertions, 13 deletions
diff --git a/sw/source/ui/dbui/mmmergepage.cxx b/sw/source/ui/dbui/mmmergepage.cxx index ea355771cea6..17cdfc792eb9 100644 --- a/sw/source/ui/dbui/mmmergepage.cxx +++ b/sw/source/ui/dbui/mmmergepage.cxx @@ -95,10 +95,9 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeMergePage, FindHdl_Impl, Button*, void) } } -IMPL_LINK_NOARG(SwMailMergeMergePage, EnteredFindStringHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwMailMergeMergePage, EnteredFindStringHdl_Impl, ReturnActionEdit&, void) { m_pFindPB->GetClickHdl().Call(m_pFindPB); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/mmmergepage.hxx b/sw/source/ui/dbui/mmmergepage.hxx index 30d8d992ba02..6f3800cf6cad 100644 --- a/sw/source/ui/dbui/mmmergepage.hxx +++ b/sw/source/ui/dbui/mmmergepage.hxx @@ -43,7 +43,7 @@ class SwMailMergeMergePage : public svt::OWizardPage DECL_LINK_TYPED(EditDocumentHdl_Impl, Button*, void); DECL_LINK_TYPED(FindHdl_Impl, Button*, void); - DECL_LINK(EnteredFindStringHdl_Impl, void*); + DECL_LINK_TYPED(EnteredFindStringHdl_Impl, ReturnActionEdit&, void); public: SwMailMergeMergePage( SwMailMergeWizard* _pParent); diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index ad3e4f935041..8836017ad010 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -168,7 +168,7 @@ void SwFieldFuncPage::Reset(const SfxItemSet* ) m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, InsertMacroHdl)); m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, ListBoxInsertHdl)); m_pMacroBT->SetClickHdl (LINK(this, SwFieldFuncPage, MacroHdl)); - Link<Button*,void> aListModifyLk( LINK(this, SwFieldFuncPage, ListModifyHdl)); + Link<Button*,void> aListModifyLk( LINK(this, SwFieldFuncPage, ListModifyButtonHdl)); m_pListAddPB->SetClickHdl(aListModifyLk); m_pListRemovePB->SetClickHdl(aListModifyLk); m_pListUpPB->SetClickHdl(aListModifyLk); @@ -421,11 +421,15 @@ IMPL_LINK_NOARG_TYPED(SwFieldFuncPage, InsertMacroHdl, ListBox&, void) InsertHdl(nullptr); } -IMPL_LINK_TYPED( SwFieldFuncPage, ListModifyHdl, Button*, pControl, void) +IMPL_LINK_TYPED( SwFieldFuncPage, ListModifyButtonHdl, Button*, pControl, void) { - ListModifyReturnActionHdl(pControl); + ListModifyHdl(pControl); } -IMPL_LINK( SwFieldFuncPage, ListModifyReturnActionHdl, Control*, pControl) +IMPL_LINK_TYPED( SwFieldFuncPage, ListModifyReturnActionHdl, ReturnActionEdit&, rControl, void) +{ + ListModifyHdl(&rControl); +} +void SwFieldFuncPage::ListModifyHdl(Control* pControl) { m_pListItemsLB->SetUpdateMode(false); if(pControl == m_pListAddPB || @@ -469,7 +473,6 @@ IMPL_LINK( SwFieldFuncPage, ListModifyReturnActionHdl, Control*, pControl) bDropDownLBChanged = true; m_pListItemsLB->SetUpdateMode(true); ListEnableHdl(0); - return 0; } IMPL_LINK_NOARG(SwFieldFuncPage, ListEnableHdl) diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx index 071ff6474671..238bf9b659e1 100644 --- a/sw/source/ui/fldui/fldfunc.hxx +++ b/sw/source/ui/fldui/fldfunc.hxx @@ -70,9 +70,10 @@ class SwFieldFuncPage : public SwFieldPage DECL_LINK(SelectHdl, void *); DECL_LINK_TYPED(InsertMacroHdl, ListBox&, void); DECL_LINK(ModifyHdl, void *); - DECL_LINK(ListModifyReturnActionHdl, Control *); - DECL_LINK_TYPED( ListModifyHdl, Button*, void); + DECL_LINK_TYPED(ListModifyReturnActionHdl, ReturnActionEdit&, void); + DECL_LINK_TYPED(ListModifyButtonHdl, Button*, void); DECL_LINK( ListEnableHdl, void*); + void ListModifyHdl(Control*); // select Macro DECL_LINK_TYPED( MacroHdl, Button *, void ); diff --git a/sw/source/uibase/cctrl/actctrl.cxx b/sw/source/uibase/cctrl/actctrl.cxx index af79651aee20..95674b0d4f02 100644 --- a/sw/source/uibase/cctrl/actctrl.cxx +++ b/sw/source/uibase/cctrl/actctrl.cxx @@ -56,7 +56,7 @@ void ReturnActionEdit::KeyInput( const KeyEvent& rEvt) !nModifier) { if(aReturnActionLink.IsSet()) - aReturnActionLink.Call(this); + aReturnActionLink.Call(*this); } else Edit::KeyInput(rEvt); diff --git a/sw/source/uibase/inc/actctrl.hxx b/sw/source/uibase/inc/actctrl.hxx index dee1cc853da9..aab03f4b5ba4 100644 --- a/sw/source/uibase/inc/actctrl.hxx +++ b/sw/source/uibase/inc/actctrl.hxx @@ -40,7 +40,7 @@ public: // call a link when KEY_RETURN is pressed class SW_DLLPUBLIC ReturnActionEdit : public Edit { - Link<> aReturnActionLink; + Link<ReturnActionEdit&,void> aReturnActionLink; public: ReturnActionEdit(vcl::Window* pParent, WinBits nStyle) : Edit(pParent, nStyle) @@ -48,7 +48,7 @@ public: } virtual void KeyInput( const KeyEvent& ) SAL_OVERRIDE; - void SetReturnActionLink(const Link<>& rLink) + void SetReturnActionLink(const Link<ReturnActionEdit&,void>& rLink) { aReturnActionLink = rLink;} }; |