diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-13 13:17:30 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-15 09:58:34 +0200 |
commit | 99b21cc9f3f32284061be255f437b2954a7aada0 (patch) | |
tree | f26509e7b905d147bc14fcda9fd30e2861ed00e3 /sw | |
parent | c837bfda8c646fe2f7ff789032dd9a6ee6fd396f (diff) |
convert Link<> to typed
Change-Id: I6c55c74d47b13149c2fa210bb9de4e8c430c57cc
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/config/optload.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.hxx | 1 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmgreetingspage.cxx | 9 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmgreetingspage.hxx | 1 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/cption.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/inc/cption.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/optload.hxx | 2 |
9 files changed, 21 insertions, 16 deletions
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index f9ee4c19c368..e6574716be33 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -841,10 +841,9 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl) return 0; } -IMPL_LINK_NOARG(SwCaptionOptPage, SelectHdl) +IMPL_LINK_NOARG_TYPED(SwCaptionOptPage, SelectHdl, ComboBox&, void) { InvalidatePreview(); - return 0; } IMPL_LINK_NOARG_TYPED(SwCaptionOptPage, SelectListBoxHdl, ListBox&, void) diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index e521f223a6d6..4382ec17ff17 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -551,7 +551,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog( m_pDragED->SetSelectionChangedHdl( LINK( this, SwCustomizeAddressBlockDialog, SelectionChangedHdl_Impl)); Link<> aFieldsLink = LINK(this, SwCustomizeAddressBlockDialog, FieldChangeHdl_Impl); m_pFieldCB->SetModifyHdl(aFieldsLink); - m_pFieldCB->SetSelectHdl(aFieldsLink); + m_pFieldCB->SetSelectHdl(LINK(this, SwCustomizeAddressBlockDialog, FieldChangeComboBoxHdl_Impl)); Link<Button*,void> aImgButtonHdl = LINK(this, SwCustomizeAddressBlockDialog, ImageButtonHdl_Impl); m_pInsertFieldIB->SetClickHdl(aImgButtonHdl); m_pRemoveFieldIB->SetClickHdl(aImgButtonHdl); @@ -720,6 +720,10 @@ IMPL_LINK_TYPED(SwCustomizeAddressBlockDialog, SelectionChangedHdl_Impl, Address bOnEntry = false; } +IMPL_LINK_NOARG_TYPED(SwCustomizeAddressBlockDialog, FieldChangeComboBoxHdl_Impl, ComboBox&, void) +{ + FieldChangeHdl_Impl(nullptr); +} IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, FieldChangeHdl_Impl) { //changing the field content changes the related members, too diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index 88e653055281..b4abb2befb2e 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -226,6 +226,7 @@ private: DECL_LINK_TYPED(ImageButtonHdl_Impl, Button*, void); DECL_LINK_TYPED(SelectionChangedHdl_Impl, AddressMultiLineEdit&, void); DECL_LINK(FieldChangeHdl_Impl, void *); + DECL_LINK_TYPED(FieldChangeComboBoxHdl_Impl, ComboBox&, void); bool HasItem_Impl(sal_Int32 nUserData); sal_Int32 GetSelectedItem_Impl(); diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 5192a7399b9d..7cd8d128175a 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -144,11 +144,14 @@ IMPL_LINK_NOARG(SwMailMergeGreetingsPage, GreetingSelectHdl_Impl) UpdatePreview(); return 0; } - IMPL_LINK_NOARG_TYPED(SwMailMergeGreetingsPage, GreetingSelectListBoxHdl_Impl, ListBox&, void) { UpdatePreview(); } +IMPL_LINK_NOARG_TYPED(SwMailMergeGreetingsPage, GreetingSelectComboBoxHdl_Impl, ComboBox&, void) +{ + UpdatePreview(); +} void SwMailMergeGreetingsPage::UpdatePreview() { @@ -269,9 +272,9 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent) m_pFemaleLB->SetSelectHdl(aLBoxLink2); m_pMaleLB->SetSelectHdl(aLBoxLink2); m_pFemaleColumnLB->SetSelectHdl(aLBoxLink2); - m_pFemaleFieldCB->SetSelectHdl(aLBoxLink); + m_pFemaleFieldCB->SetSelectHdl(LINK(this, SwMailMergeGreetingsPage, GreetingSelectComboBoxHdl_Impl)); m_pFemaleFieldCB->SetModifyHdl(aLBoxLink); - m_pNeutralCB->SetSelectHdl(aLBoxLink); + m_pNeutralCB->SetSelectHdl(LINK(this, SwMailMergeGreetingsPage, GreetingSelectComboBoxHdl_Impl)); m_pNeutralCB->SetModifyHdl(aLBoxLink); Link<Button*,void> aDataLink = LINK(this, SwMailMergeGreetingsPage, InsertDataHdl_Impl); diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx index 75472678333b..f0edeaaa6d43 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hxx +++ b/sw/source/ui/dbui/mmgreetingspage.hxx @@ -82,6 +82,7 @@ class SwMailMergeGreetingsPage : public svt::OWizardPage, DECL_LINK_TYPED(ContainsHdl_Impl, Button*, void); DECL_LINK_TYPED(InsertDataHdl_Impl, Button*, void); DECL_LINK(GreetingSelectHdl_Impl, void *); + DECL_LINK_TYPED(GreetingSelectComboBoxHdl_Impl, ComboBox&, void); DECL_LINK_TYPED(GreetingSelectListBoxHdl_Impl, ListBox&, void); DECL_LINK_TYPED(AssignHdl_Impl, Button*, void); diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index f20bbbb70b39..d0435d892927 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -136,8 +136,7 @@ SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) : m_pNumberingSeparatorED->SetModifyHdl ( aLk ); m_pSepEdit->SetModifyHdl( aLk ); - aLk = LINK(this, SwCaptionDialog, SelectHdl); - m_pCategoryBox->SetSelectHdl( aLk ); + m_pCategoryBox->SetSelectHdl( LINK(this, SwCaptionDialog, SelectHdl) ); m_pFormatBox->SetSelectHdl( LINK(this, SwCaptionDialog, SelectListBoxHdl) ); m_pOptionButton->SetClickHdl( LINK( this, SwCaptionDialog, OptionHdl ) ); m_pAutoCaptionButton->SetClickHdl(LINK(this, SwCaptionDialog, CaptionHdl)); @@ -306,10 +305,9 @@ IMPL_LINK_NOARG_TYPED(SwCaptionDialog, SelectListBoxHdl, ListBox&, void) { DrawSample(); } -IMPL_LINK_NOARG(SwCaptionDialog, SelectHdl) +IMPL_LINK_NOARG_TYPED(SwCaptionDialog, SelectHdl, ComboBox&, void) { DrawSample(); - return 0; } IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl) diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index c537d83a7ab0..331bb63ba67d 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -992,7 +992,7 @@ class SwCreateAuthEntryDlg_Impl : public ModalDialog bool m_bNewEntryMode; bool m_bNameAllowed; - DECL_LINK(IdentifierHdl, ComboBox*); + DECL_LINK_TYPED(IdentifierHdl, ComboBox&, void); DECL_LINK(ShortNameHdl, Edit*); DECL_LINK_TYPED(EnableHdl, ListBox&, void); @@ -1553,14 +1553,14 @@ OUString SwCreateAuthEntryDlg_Impl::GetEntryText(ToxAuthorityField eField) cons return OUString(); } -IMPL_LINK(SwCreateAuthEntryDlg_Impl, IdentifierHdl, ComboBox*, pBox) +IMPL_LINK_TYPED(SwCreateAuthEntryDlg_Impl, IdentifierHdl, ComboBox&, rBox, void) { const SwAuthorityFieldType* pFType = static_cast<const SwAuthorityFieldType*>( rWrtSh.GetFieldType(RES_AUTHORITY, OUString())); if(pFType) { const SwAuthEntry* pEntry = pFType->GetEntryByIdentifier( - pBox->GetText()); + rBox.GetText()); if(pEntry) { for(int i = 0; i < AUTH_FIELD_END; i++) @@ -1577,7 +1577,6 @@ IMPL_LINK(SwCreateAuthEntryDlg_Impl, IdentifierHdl, ComboBox*, pBox) } } } - return 0; } IMPL_LINK(SwCreateAuthEntryDlg_Impl, ShortNameHdl, Edit*, pEdit) diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx index 371faa4defe2..de5e9b4d0164 100644 --- a/sw/source/uibase/inc/cption.hxx +++ b/sw/source/uibase/inc/cption.hxx @@ -94,7 +94,7 @@ class SwCaptionDialog : public SvxStandardDialog ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xNameAccess; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > xNamed; - DECL_LINK(SelectHdl, void *); + DECL_LINK_TYPED(SelectHdl, ComboBox&, void); DECL_LINK_TYPED(SelectListBoxHdl, ListBox&, void); DECL_LINK(ModifyHdl, void *); DECL_LINK_TYPED(OptionHdl, Button *, void); diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index 96d6bf678776..0843e6d6aec9 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -153,7 +153,7 @@ private: SwFieldMgr* pMgr; bool bHTMLMode; - DECL_LINK(SelectHdl, void *); + DECL_LINK_TYPED(SelectHdl, ComboBox&, void); DECL_LINK_TYPED(SelectListBoxHdl, ListBox&, void); DECL_LINK(ModifyHdl, void * = 0); DECL_LINK_TYPED( OrderHdl, ListBox&, void ); |