diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-19 09:11:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-26 11:15:35 +0200 |
commit | 167bc621ef825ed5b961502fe9324a675ee34e42 (patch) | |
tree | 523838d8adc14a62f846529ee6eab3343b2fe87b /sw/source | |
parent | 46a27805fb707544a844a961a3743b8b992282f0 (diff) |
Convert vcl Button Link<> click handler to typed Link<Button*,void>
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
Diffstat (limited to 'sw/source')
140 files changed, 708 insertions, 963 deletions
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index 25419f142fcc..df536dbefd2d 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -59,20 +59,24 @@ void SwBreakDlg::Apply() } } -IMPL_LINK_NOARG(SwBreakDlg, ClickHdl) +IMPL_LINK_NOARG_TYPED(SwBreakDlg, ClickHdl, Button*, void) +{ + CheckEnable(); +} + +IMPL_LINK_NOARG(SwBreakDlg, SelectHdl) { CheckEnable(); return 0; } // Handler for Change Page Number -IMPL_LINK( SwBreakDlg, PageNumHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( SwBreakDlg, PageNumHdl, Button*, pBox, void ) { - if(pBox->IsChecked()) + if(static_cast<CheckBox*>(pBox)->IsChecked()) m_pPageNumEdit->SetValue(1); else m_pPageNumEdit->SetText(OUString()); - return 0; } // By changing the Page number the checkbox is checked. @@ -87,7 +91,7 @@ IMPL_LINK_NOARG(SwBreakDlg, PageNumModifyHdl) * checks whether pagenumber nPage is a legal pagenumber (left pages with even * numbers etc. for a page template with alternating pages) */ -IMPL_LINK_NOARG(SwBreakDlg, OkHdl) +IMPL_LINK_NOARG_TYPED(SwBreakDlg, OkHdl, Button*, void) { if(m_pPageNumBox->IsChecked()) { // In case of differing page descriptions, test validity @@ -114,11 +118,10 @@ IMPL_LINK_NOARG(SwBreakDlg, OkHdl) if(!bOk) { ScopedVclPtrInstance<MessageDialog>::Create(this, SW_RES(STR_ILLEGAL_PAGENUM), VCL_MESSAGE_INFO)->Execute(); m_pPageNumEdit->GrabFocus(); - return 0; + return; } } EndDialog(RET_OK); - return 0; } SwBreakDlg::SwBreakDlg( vcl::Window *pParent, SwWrtShell &rS ) @@ -137,11 +140,11 @@ SwBreakDlg::SwBreakDlg( vcl::Window *pParent, SwWrtShell &rS ) m_pPageNumEdit->SetAccessibleName(m_pPageNumBox->GetText()); - Link<> aLk = LINK(this,SwBreakDlg,ClickHdl); + Link<Button*,void> aLk = LINK(this,SwBreakDlg,ClickHdl); m_pPageBtn->SetClickHdl( aLk ); m_pLineBtn->SetClickHdl( aLk ); m_pColumnBtn->SetClickHdl( aLk ); - m_pPageCollBox->SetSelectHdl( aLk ); + m_pPageCollBox->SetSelectHdl( LINK(this,SwBreakDlg,SelectHdl) ); get<OKButton>("ok")->SetClickHdl(LINK(this,SwBreakDlg,OkHdl));; m_pPageNumBox->SetClickHdl(LINK(this,SwBreakDlg,PageNumHdl)); diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 364bb2b64f03..64cd58edfdae 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -300,7 +300,7 @@ VclPtr<SfxTabPage> SwCharURLPage::Create( vcl::Window* pParent, return VclPtr<SwCharURLPage>::Create( pParent, *rAttrSet ); } -IMPL_LINK_NOARG(SwCharURLPage, InsertFileHdl) +IMPL_LINK_NOARG_TYPED(SwCharURLPage, InsertFileHdl, Button*, void) { FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 ); if( aDlgHelper.Execute() == ERRCODE_NONE ) @@ -308,14 +308,12 @@ IMPL_LINK_NOARG(SwCharURLPage, InsertFileHdl) Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker(); m_pURLED->SetText(xFP->getFiles().getConstArray()[0]); } - return 0; } -IMPL_LINK_NOARG(SwCharURLPage, EventHdl) +IMPL_LINK_NOARG_TYPED(SwCharURLPage, EventHdl, Button*, void) { bModified |= SwMacroAssignDlg::INetFormatDlg( this, ::GetActiveView()->GetWrtShell(), pINetItem ); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index d57fc8169dd7..b4f0596c8417 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -679,7 +679,7 @@ void SwDropCapsPage::Reset(const SfxItemSet *rSet) bModified = false; } -IMPL_LINK_NOARG(SwDropCapsPage, ClickHdl) +IMPL_LINK_NOARG_TYPED(SwDropCapsPage, ClickHdl, Button*, void) { bool bChecked = m_pDropCapsBox->IsChecked(); @@ -705,11 +705,9 @@ IMPL_LINK_NOARG(SwDropCapsPage, ClickHdl) m_pPict->SetText(""); bModified = true; - - return 0; } -IMPL_LINK_NOARG(SwDropCapsPage, WholeWordHdl) +IMPL_LINK_NOARG_TYPED(SwDropCapsPage, WholeWordHdl, Button*, void) { m_pDropCapsField->Enable( !m_pWholeWordCB->IsChecked() ); m_pSwitchText->Enable(!m_pWholeWordCB->IsChecked()); @@ -717,8 +715,6 @@ IMPL_LINK_NOARG(SwDropCapsPage, WholeWordHdl) ModifyHdl(m_pDropCapsField); bModified = true; - - return 0; } IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit ) diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 39230e98f7a7..41c68a41f63b 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -300,24 +300,21 @@ void SwParagraphNumTabPage::EnableNewStart() m_pNewStartBX->Show(); } -IMPL_LINK_NOARG(SwParagraphNumTabPage, NewStartHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwParagraphNumTabPage, NewStartHdl_Impl, Button*, void) { bool bEnable = m_pNewStartCB->IsChecked(); m_pNewStartNumberCB->Enable(bEnable); m_pNewStartNF->Enable(bEnable && m_pNewStartNumberCB->IsChecked()); - return 0; } -IMPL_LINK_NOARG(SwParagraphNumTabPage, LineCountHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwParagraphNumTabPage, LineCountHdl_Impl, Button*, void) { m_pRestartParaCountCB->Enable(m_pCountParaCB->IsChecked()); bool bEnableRestartValue = m_pRestartParaCountCB->IsEnabled() && m_pRestartParaCountCB->IsChecked(); m_pRestartBX->Enable(bEnableRestartValue); - - return 0; } IMPL_LINK_NOARG( SwParagraphNumTabPage, EditNumStyleSelectHdl_Impl ) @@ -331,11 +328,10 @@ IMPL_LINK_NOARG( SwParagraphNumTabPage, EditNumStyleSelectHdl_Impl ) return 0; } -IMPL_LINK_NOARG(SwParagraphNumTabPage, EditNumStyleHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwParagraphNumTabPage, EditNumStyleHdl_Impl, Button*, void) { OUString aTemplName(m_pNumberStyleLB->GetSelectEntry()); ExecuteEditNumStyle_Impl( SID_STYLE_EDIT, aTemplName, OUString(),SFX_STYLE_FAMILY_PSEUDO, 0 ); - return 0; } // Internal: Perform functions through the Dispatcher diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx index 0dc4faacd151..6625503a4baf 100644 --- a/sw/source/ui/chrdlg/swuiccoll.cxx +++ b/sw/source/ui/chrdlg/swuiccoll.cxx @@ -84,8 +84,8 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet) m_pConditionCB->SetClickHdl( LINK(this, SwCondCollPage, OnOffHdl)); m_pTbLinks->SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl )); m_pStyleLB->SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl )); - m_pRemovePB->SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl )); - m_pAssignPB->SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl )); + m_pRemovePB->SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveClickHdl )); + m_pAssignPB->SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveClickHdl )); m_pTbLinks->SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); m_pStyleLB->SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); m_pFilterLB->SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl)); @@ -213,9 +213,9 @@ void SwCondCollPage::Reset(const SfxItemSet *) } -IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED( SwCondCollPage, OnOffHdl, Button*, pBox, void ) { - const bool bEnable = pBox->IsChecked(); + const bool bEnable = static_cast<CheckBox*>(pBox)->IsChecked(); m_pContextFT->Enable( bEnable ); m_pUsedFT->Enable( bEnable ); m_pTbLinks->EnableList( bEnable ); @@ -226,9 +226,12 @@ IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox ) m_pAssignPB->Enable( bEnable ); if( bEnable ) SelectHdl(0); - return 0; } +IMPL_LINK_TYPED( SwCondCollPage, AssignRemoveClickHdl, Button*, pBtn, void) +{ + AssignRemoveHdl(static_cast<PushButton*>(pBtn)); +} IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn) { SvTreeListEntry* pE = m_pTbLinks->FirstSelected(); diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx index ad03fa047c51..b21c252bc1e6 100644 --- a/sw/source/ui/config/mailconfigpage.cxx +++ b/sw/source/ui/config/mailconfigpage.cxx @@ -67,7 +67,7 @@ class SwTestAccountSettingsDialog : public SfxModalDialog bool m_bStop; void Test(); - DECL_LINK(StopHdl, void *); + DECL_LINK_TYPED(StopHdl, Button*, void); DECL_LINK(TestHdl, void*); public: explicit SwTestAccountSettingsDialog(SwMailConfigPage* pParent); @@ -105,9 +105,9 @@ class SwAuthenticationSettingsDialog : public SfxModalDialog SwMailMergeConfigItem& rConfigItem; - DECL_LINK(OKHdl_Impl, void *); - DECL_LINK( CheckBoxHdl_Impl, CheckBox*); - DECL_LINK(RadioButtonHdl_Impl, void *); + DECL_LINK_TYPED(OKHdl_Impl, Button*, void); + DECL_LINK_TYPED( CheckBoxHdl_Impl, Button*, void); + DECL_LINK_TYPED(RadioButtonHdl_Impl, Button*, void); public: SwAuthenticationSettingsDialog(SwMailConfigPage* pParent, SwMailMergeConfigItem& rItem); @@ -207,25 +207,22 @@ void SwMailConfigPage::Reset( const SfxItemSet* /*rSet*/ ) m_pSecureCB ->SaveValue(); } -IMPL_LINK(SwMailConfigPage, ReplyToHdl, CheckBox*, pBox) +IMPL_LINK_TYPED(SwMailConfigPage, ReplyToHdl, Button*, pBox, void) { - bool bEnable = pBox->IsChecked(); + bool bEnable = static_cast<CheckBox*>(pBox)->IsChecked(); m_pReplyToFT->Enable(bEnable); m_pReplyToED->Enable(bEnable); - return 0; } -IMPL_LINK_NOARG(SwMailConfigPage, AuthenticationHdl) +IMPL_LINK_NOARG_TYPED(SwMailConfigPage, AuthenticationHdl, Button*, void) { ScopedVclPtrInstance< SwAuthenticationSettingsDialog > aDlg(this, *m_pConfigItem); aDlg->Execute(); - return 0; } -IMPL_LINK_NOARG(SwMailConfigPage, TestHdl) +IMPL_LINK_NOARG_TYPED(SwMailConfigPage, TestHdl, Button*, void) { ScopedVclPtrInstance<SwTestAccountSettingsDialog>::Create(this)->Execute(); - return 0; } SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pParent) @@ -276,10 +273,9 @@ void SwTestAccountSettingsDialog::dispose() SfxModalDialog::dispose(); } -IMPL_LINK_NOARG(SwTestAccountSettingsDialog, StopHdl) +IMPL_LINK_NOARG_TYPED(SwTestAccountSettingsDialog, StopHdl, Button*, void) { m_bStop = true; - return 0; } IMPL_LINK_NOARG(SwTestAccountSettingsDialog, TestHdl) @@ -425,7 +421,7 @@ SwAuthenticationSettingsDialog::SwAuthenticationSettingsDialog( get(m_pOKPB,"ok"); m_pAuthenticationCB->SetClickHdl( LINK( this, SwAuthenticationSettingsDialog, CheckBoxHdl_Impl)); - Link<> aRBLink = LINK( this, SwAuthenticationSettingsDialog, RadioButtonHdl_Impl ); + Link<Button*,void> aRBLink = LINK( this, SwAuthenticationSettingsDialog, RadioButtonHdl_Impl ); m_pSeparateAuthenticationRB->SetClickHdl( aRBLink ); m_pSMTPAfterPOPRB->SetClickHdl( aRBLink ); m_pOKPB->SetClickHdl( LINK( this, SwAuthenticationSettingsDialog, OKHdl_Impl)); @@ -481,7 +477,7 @@ void SwAuthenticationSettingsDialog::dispose() SfxModalDialog::dispose(); } -IMPL_LINK_NOARG(SwAuthenticationSettingsDialog, OKHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwAuthenticationSettingsDialog, OKHdl_Impl, Button*, void) { rConfigItem.SetAuthentication( m_pAuthenticationCB->IsChecked() ); rConfigItem.SetSMTPAfterPOP(m_pSMTPAfterPOPRB->IsChecked()); @@ -494,20 +490,17 @@ IMPL_LINK_NOARG(SwAuthenticationSettingsDialog, OKHdl_Impl) rConfigItem.SetInServerPassword(m_pInPasswordED->GetText()); EndDialog(RET_OK); - return 0; } -IMPL_LINK( SwAuthenticationSettingsDialog, CheckBoxHdl_Impl, CheckBox*, pBox) +IMPL_LINK_TYPED( SwAuthenticationSettingsDialog, CheckBoxHdl_Impl, Button*, pBox, void) { - bool bChecked = pBox->IsChecked(); + bool bChecked = static_cast<CheckBox*>(pBox)->IsChecked(); m_pSeparateAuthenticationRB->Enable(bChecked); m_pSMTPAfterPOPRB->Enable(bChecked); RadioButtonHdl_Impl( 0 ); - - return 0; } -IMPL_LINK_NOARG(SwAuthenticationSettingsDialog, RadioButtonHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwAuthenticationSettingsDialog, RadioButtonHdl_Impl, Button*, void) { bool bSeparate = m_pSeparateAuthenticationRB->IsChecked(); bool bIsEnabled = m_pSeparateAuthenticationRB->IsEnabled(); @@ -532,8 +525,6 @@ IMPL_LINK_NOARG(SwAuthenticationSettingsDialog, RadioButtonHdl_Impl) m_pIMAPRB->Enable(bNotSeparate); m_pInPasswordFT->Enable(bNotSeparate); m_pInPasswordED->Enable(bNotSeparate); - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index a43554d65fb0..cc674d8f57ed 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -317,7 +317,7 @@ IMPL_LINK_NOARG(SwCompatibilityOptPage, SelectHdl) return 0; } -IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl) +IMPL_LINK_NOARG_TYPED(SwCompatibilityOptPage, UseAsDefaultHdl, Button*, void) { ScopedVclPtrInstance<MessageDialog> aQuery(this, "QueryDefaultCompatDialog", "modules/swriter/ui/querydefaultcompatdialog.ui"); @@ -358,8 +358,6 @@ IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl) WriteOptions(); } - - return 0; } void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong nOptions ) diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index fecd2a010823..df64fbd2a2d3 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -120,7 +120,7 @@ SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet) m_pUseCharUnit->Hide(); } - Link<> aLink = LINK(this, SwLoadOptPage, StandardizedPageCountCheckHdl); + Link<Button*,void> aLink = LINK(this, SwLoadOptPage, StandardizedPageCountCheckHdl); m_pShowStandardizedPageCount->SetClickHdl(aLink); } @@ -154,10 +154,9 @@ VclPtr<SfxTabPage> SwLoadOptPage::Create( vcl::Window* pParent, return VclPtr<SwLoadOptPage>::Create(pParent, *rAttrSet ); } -IMPL_LINK_NOARG(SwLoadOptPage, StandardizedPageCountCheckHdl) +IMPL_LINK_NOARG_TYPED(SwLoadOptPage, StandardizedPageCountCheckHdl, Button*, void) { m_pStandardizedPageSizeNF->Enable(m_pShowStandardizedPageCount->IsChecked()); - return 0; } bool SwLoadOptPage::FillItemSet( SfxItemSet* rSet ) diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 2fccfb5baadc..a87396de73a6 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -286,10 +286,9 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet) return bRet; } -IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox) +IMPL_LINK_TYPED(SwContentOptPage, VertRulerHdl, Button*, pBox, void) { - m_pVRulerRightCBox->Enable(pBox->IsEnabled() && pBox->IsChecked()); - return 0; + m_pVRulerRightCBox->Enable(pBox->IsEnabled() && static_cast<CheckBox*>(pBox)->IsChecked()); } // TabPage Printer additional settings @@ -324,7 +323,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(vcl::Window* pParent, get(m_pPaperFromSetupCB, "papertray"); get(m_pFaxLB, "fax"); - Link<> aLk = LINK( this, SwAddPrinterTabPage, AutoClickHdl); + Link<Button*,void> aLk = LINK( this, SwAddPrinterTabPage, AutoClickHdl); m_pGrfCB->SetClickHdl( aLk ); m_pRightPageCB->SetClickHdl( aLk ); m_pLeftPageCB->SetClickHdl( aLk ); @@ -485,7 +484,7 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet* ) m_pProspectCB_RTL->Enable( false ); } -IMPL_LINK_NOARG(SwAddPrinterTabPage, AutoClickHdl) +IMPL_LINK_NOARG_TYPED(SwAddPrinterTabPage, AutoClickHdl, Button*, void) { bAttrModified = true; bool bIsProspect = m_pProspectCB->IsChecked(); @@ -497,7 +496,6 @@ IMPL_LINK_NOARG(SwAddPrinterTabPage, AutoClickHdl) m_pEndRB->Enable( !bIsProspect ); m_pEndPageRB->Enable( !bIsProspect ); m_pInMarginsRB->Enable( !bIsProspect ); - return 0; } void SwAddPrinterTabPage::SetFax( const std::vector<OUString>& rFaxLst ) @@ -943,7 +941,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet) pIndexHeightLB->SaveValue(); } -IMPL_LINK_NOARG(SwStdFontTabPage, StandardHdl) +IMPL_LINK_NOARG_TYPED(SwStdFontTabPage, StandardHdl, Button*, void) { sal_uInt8 nFontOffset = nFontGroup * FONT_PER_GROUP; pStandardBox->SetText(SwStdFontConfig::GetDefaultFor(FONT_STANDARD + nFontOffset, eLanguage)); @@ -973,7 +971,6 @@ IMPL_LINK_NOARG(SwStdFontTabPage, StandardHdl) pIndexHeightLB ->SetValue(CalcToPoint( SwStdFontConfig::GetDefaultHeightFor(FONT_INDEX + nFontOffset, eLanguage), SFX_MAPUNIT_TWIP, 10 )); - return 0; } IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox ) @@ -1086,7 +1083,7 @@ SwTableOptionsTabPage::SwTableOptionsTabPage( vcl::Window* pParent, const SfxIte get(pFixPropRB,"fixprop"); get(pVarRB,"var"); - Link<> aLnk(LINK(this, SwTableOptionsTabPage, CheckBoxHdl)); + Link<Button*,void> aLnk(LINK(this, SwTableOptionsTabPage, CheckBoxHdl)); pNumFormattingCB->SetClickHdl(aLnk); pNumFormatFormattingCB->SetClickHdl(aLnk); pHeaderCB->SetClickHdl(aLnk); @@ -1269,12 +1266,11 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet) CheckBoxHdl(0); } -IMPL_LINK_NOARG(SwTableOptionsTabPage, CheckBoxHdl) +IMPL_LINK_NOARG_TYPED(SwTableOptionsTabPage, CheckBoxHdl, Button*, void) { pNumFormatFormattingCB->Enable(pNumFormattingCB->IsChecked()); pNumAlignmentCB->Enable(pNumFormattingCB->IsChecked()); pRepeatHeaderCB->Enable(pHeaderCB->IsChecked()); - return 0; } void SwTableOptionsTabPage::PageCreated( const SfxAllItemSet& aSet) @@ -2287,7 +2283,7 @@ SwCompareOptionsTabPage::SwCompareOptionsTabPage( vcl::Window* pParent, const S get(m_pLenNF, "ignorelen"); get(m_pStoreRsidCB, "storeRSID"); - Link<> aLnk( LINK( this, SwCompareOptionsTabPage, ComparisonHdl ) ); + Link<Button*,void> aLnk( LINK( this, SwCompareOptionsTabPage, ComparisonHdl ) ); m_pAutoRB->SetClickHdl( aLnk ); m_pWordRB->SetClickHdl( aLnk ); m_pCharRB->SetClickHdl( aLnk ); @@ -2408,20 +2404,17 @@ void SwCompareOptionsTabPage::Reset( const SfxItemSet* ) m_pStoreRsidCB->SaveValue(); } -IMPL_LINK_NOARG(SwCompareOptionsTabPage, ComparisonHdl) +IMPL_LINK_NOARG_TYPED(SwCompareOptionsTabPage, ComparisonHdl, Button*, void) { bool bChecked = !m_pAutoRB->IsChecked(); m_pRsidCB->Enable( bChecked ); m_pIgnoreCB->Enable( bChecked ); m_pLenNF->Enable( bChecked && m_pIgnoreCB->IsChecked() ); - - return 0; } -IMPL_LINK_NOARG(SwCompareOptionsTabPage, IgnoreHdl) +IMPL_LINK_NOARG_TYPED(SwCompareOptionsTabPage, IgnoreHdl, Button*, void) { m_pLenNF->Enable( m_pIgnoreCB->IsChecked() ); - return 0; } #ifdef DBG_UTIL @@ -2516,7 +2509,7 @@ void SwTestTabPage::Reset( const SfxItemSet* ) void SwTestTabPage::Init() { // handler - Link<> aLk = LINK( this, SwTestTabPage, AutoClickHdl ); + Link<Button*,void> aLk = LINK( this, SwTestTabPage, AutoClickHdl ); m_pTest1CBox->SetClickHdl( aLk ); m_pTest2CBox->SetClickHdl( aLk ); m_pTest3CBox->SetClickHdl( aLk ); @@ -2529,10 +2522,9 @@ void SwTestTabPage::Init() m_pTest10CBox->SetClickHdl( aLk ); } -IMPL_LINK_NOARG(SwTestTabPage, AutoClickHdl) +IMPL_LINK_NOARG_TYPED(SwTestTabPage, AutoClickHdl, Button*, void) { bAttrModified = true; - return 0; } #endif diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index e348c107fb4e..c7b708837dac 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -290,7 +290,7 @@ void SwAddressListDialog::dispose() SfxModalDialog::dispose(); } -IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwAddressListDialog, FilterHdl_Impl, Button*, void) { SvTreeListEntry* pSelect = m_pListLB->FirstSelected(); uno::Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); @@ -298,7 +298,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl) { const OUString sCommand = SvTabListBox::GetEntryText(pSelect, ITEMID_TABLE - 1); if (sCommand.isEmpty()) - return 0; + return; AddressUserData_Impl* pUserData = static_cast<AddressUserData_Impl*>(pSelect->GetUserData()); if(pUserData->xConnection.is() ) @@ -341,10 +341,9 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl) } } } - return 0; } -IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwAddressListDialog, LoadHdl_Impl, Button*, void) { SwView* pView = m_pAddressPage->GetWizard()->GetSwView(); @@ -355,15 +354,13 @@ IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl) pNewSource->SetUserData(new AddressUserData_Impl()); m_pListLB->Select(pNewSource); } - return 0; } -IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwAddressListDialog, CreateHdl_Impl, Button*, pButton, void) { OUString sInputURL; VclPtr<SwCreateAddressListDialog> pDlg( VclPtr<SwCreateAddressListDialog>::Create( - pButton, sInputURL, m_pAddressPage->GetWizard()->GetConfigItem())); @@ -439,10 +436,9 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton) { } } - return 0; } -IMPL_LINK(SwAddressListDialog, EditHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwAddressListDialog, EditHdl_Impl, Button*, pButton, void) { SvTreeListEntry* pEntry = m_pListLB->FirstSelected(); AddressUserData_Impl* pUserData = pEntry ? static_cast<AddressUserData_Impl*>(pEntry->GetUserData()) : 0; @@ -471,7 +467,6 @@ IMPL_LINK(SwAddressListDialog, EditHdl_Impl, PushButton*, pButton) { } } - return 0; }; IMPL_LINK_NOARG(SwAddressListDialog, ListBoxSelectHdl_Impl) @@ -635,7 +630,7 @@ void SwAddressListDialog::DetectTablesAndQueries( } } -IMPL_LINK(SwAddressListDialog, TableSelectHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwAddressListDialog, TableSelectHdl_Impl, Button*, pButton, void) { EnterWait(); SvTreeListEntry* pSelect = m_pListLB->FirstSelected(); @@ -652,13 +647,11 @@ IMPL_LINK(SwAddressListDialog, TableSelectHdl_Impl, PushButton*, pButton) } LeaveWait(); - return 0; } -IMPL_LINK_NOARG(SwAddressListDialog, OKHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwAddressListDialog, OKHdl_Impl, Button*, void) { EndDialog(RET_OK); - return 0; } uno::Reference< XDataSource> SwAddressListDialog::GetSource() diff --git a/sw/source/ui/dbui/addresslistdialog.hxx b/sw/source/ui/dbui/addresslistdialog.hxx index 2b7f2cb70eae..cb542429007f 100644 --- a/sw/source/ui/dbui/addresslistdialog.hxx +++ b/sw/source/ui/dbui/addresslistdialog.hxx @@ -74,13 +74,13 @@ class SwAddressListDialog : public SfxModalDialog void DetectTablesAndQueries(SvTreeListEntry* pSelect, bool bWidthDialog); - DECL_LINK(FilterHdl_Impl, void *); - DECL_LINK(LoadHdl_Impl, void *); - DECL_LINK(CreateHdl_Impl, PushButton*); + DECL_LINK_TYPED(FilterHdl_Impl, Button*, void); + DECL_LINK_TYPED(LoadHdl_Impl, Button*, void); + DECL_LINK_TYPED(CreateHdl_Impl, Button*, void); DECL_LINK(ListBoxSelectHdl_Impl, void *); - DECL_LINK(EditHdl_Impl, PushButton*); - DECL_LINK(TableSelectHdl_Impl, PushButton*); - DECL_LINK(OKHdl_Impl, void *); + DECL_LINK_TYPED(EditHdl_Impl, Button*, void); + DECL_LINK_TYPED(TableSelectHdl_Impl, Button*, void); + DECL_LINK_TYPED(OKHdl_Impl, Button*, void); DECL_LINK(StaticListBoxSelectHdl_Impl, SvTreeListEntry*); diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index 4486925cd87b..598694fb3d89 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -421,7 +421,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog( m_pCustomizePB->SetClickHdl(LINK(this, SwCreateAddressListDialog, CustomizeHdl_Impl)); m_pOK->SetClickHdl(LINK(this, SwCreateAddressListDialog, OkHdl_Impl)); - Link<> aLk = LINK(this, SwCreateAddressListDialog, DBCursorHdl_Impl); + Link<Button*,void> aLk = LINK(this, SwCreateAddressListDialog, DBCursorHdl_Impl); m_pStartPB->SetClickHdl(aLk); m_pPrevPB->SetClickHdl(aLk); m_pSetNoNF->SetModifyHdl(LINK(this, SwCreateAddressListDialog, DBNumCursorHdl_Impl)); @@ -520,7 +520,7 @@ void SwCreateAddressListDialog::dispose() SfxModalDialog::dispose(); } -IMPL_LINK_NOARG(SwCreateAddressListDialog, NewHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwCreateAddressListDialog, NewHdl_Impl, Button*, void) { sal_uInt32 nCurrent = m_pAddressControl->GetCurrentDataSet(); ::std::vector<OUString> aNewData; @@ -533,10 +533,9 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, NewHdl_Impl) //the address control starts at 0 m_pAddressControl->SetCurrentDataSet(nCurrent); UpdateButtons(); - return 0; } -IMPL_LINK_NOARG(SwCreateAddressListDialog, DeleteHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwCreateAddressListDialog, DeleteHdl_Impl, Button*, void) { sal_uInt32 nCurrent = m_pAddressControl->GetCurrentDataSet(); if(m_pCSVData->aDBData.size() > 1) @@ -555,10 +554,9 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, DeleteHdl_Impl) m_pAddressControl->SetCurrentDataSet(nCurrent); m_pSetNoNF->SetMax(m_pCSVData->aDBData.size()); UpdateButtons(); - return 0; } -IMPL_LINK_NOARG(SwCreateAddressListDialog, FindHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwCreateAddressListDialog, FindHdl_Impl, Button*, void) { if(!m_pFindDlg) { @@ -574,10 +572,9 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, FindHdl_Impl) } else m_pFindDlg->Show(!m_pFindDlg->IsVisible()); - return 0; } -IMPL_LINK(SwCreateAddressListDialog, CustomizeHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwCreateAddressListDialog, CustomizeHdl_Impl, Button*, pButton, void) { VclPtrInstance< SwCustomizeAddressListDialog > pDlg(pButton, *m_pCSVData); if(RET_OK == pDlg->Execute()) @@ -600,7 +597,6 @@ IMPL_LINK(SwCreateAddressListDialog, CustomizeHdl_Impl, PushButton*, pButton) ++aHeaderIter) rColumnBox.InsertEntry(*aHeaderIter); } - return 0; } namespace @@ -627,7 +623,7 @@ void lcl_WriteValues(const ::std::vector<OUString> *pFields, SvStream* pStream) } -IMPL_LINK_NOARG(SwCreateAddressListDialog, OkHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwCreateAddressListDialog, OkHdl_Impl, Button*, void) { if(m_sURL.isEmpty()) { @@ -665,11 +661,9 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, OkHdl_Impl) aMedium.Commit(); EndDialog(RET_OK); } - - return 0; } -IMPL_LINK(SwCreateAddressListDialog, DBCursorHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwCreateAddressListDialog, DBCursorHdl_Impl, Button*, pButton, void) { sal_uInt32 nValue = static_cast< sal_uInt32 >(m_pSetNoNF->GetValue()); @@ -692,7 +686,6 @@ IMPL_LINK(SwCreateAddressListDialog, DBCursorHdl_Impl, PushButton*, pButton) m_pSetNoNF->SetValue(nValue); DBNumCursorHdl_Impl(m_pSetNoNF); } - return 0; } IMPL_LINK_NOARG(SwCreateAddressListDialog, DBNumCursorHdl_Impl) @@ -789,14 +782,13 @@ void SwFindEntryDialog::dispose() } -IMPL_LINK_NOARG(SwFindEntryDialog, FindHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwFindEntryDialog, FindHdl_Impl, Button*, void) { sal_Int32 nColumn = -1; if(m_pFindOnlyCB->IsChecked()) nColumn = m_pFindOnlyLB->GetSelectEntryPos(); if(nColumn != LISTBOX_ENTRY_NOTFOUND) m_pParent->Find(m_pFindED->GetText(), nColumn); - return 0; } IMPL_LINK_NOARG(SwFindEntryDialog, FindEnableHdl_Impl) @@ -805,10 +797,9 @@ IMPL_LINK_NOARG(SwFindEntryDialog, FindEnableHdl_Impl) return 0; } -IMPL_LINK_NOARG(SwFindEntryDialog, CloseHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwFindEntryDialog, CloseHdl_Impl, Button*, void) { Show(false); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx index 26b7a3ecbe95..d8500aa5c47a 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.hxx +++ b/sw/source/ui/dbui/createaddresslistdialog.hxx @@ -62,12 +62,12 @@ class SwCreateAddressListDialog : public SfxModalDialog SwCSVData* m_pCSVData; VclPtr<SwFindEntryDialog> m_pFindDlg; - DECL_LINK(NewHdl_Impl, void *); - DECL_LINK(DeleteHdl_Impl, void *); - DECL_LINK(FindHdl_Impl, void *); - DECL_LINK(CustomizeHdl_Impl, PushButton*); - DECL_LINK(OkHdl_Impl, void *); - DECL_LINK(DBCursorHdl_Impl, PushButton*); + DECL_LINK_TYPED(NewHdl_Impl, Button*, void); + DECL_LINK_TYPED(DeleteHdl_Impl, Button*, void); + DECL_LINK_TYPED(FindHdl_Impl, Button*, void); + DECL_LINK_TYPED(CustomizeHdl_Impl, Button*, void); + DECL_LINK_TYPED(OkHdl_Impl, Button*, void); + DECL_LINK_TYPED(DBCursorHdl_Impl, Button*, void); DECL_LINK(DBNumCursorHdl_Impl, void *); void UpdateButtons(); @@ -93,9 +93,9 @@ class SwFindEntryDialog : public ModelessDialog VclPtr<SwCreateAddressListDialog> m_pParent; - DECL_LINK(FindHdl_Impl, void *); + DECL_LINK_TYPED(FindHdl_Impl, Button*, void); DECL_LINK(FindEnableHdl_Impl, void *); - DECL_LINK(CloseHdl_Impl, void *); + DECL_LINK_TYPED(CloseHdl_Impl, Button*, void); public: SwFindEntryDialog(SwCreateAddressListDialog* pParent); diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx index 1eb60f31b841..f1b5db0636e2 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx @@ -40,11 +40,11 @@ SwCustomizeAddressListDialog::SwCustomizeAddressListDialog( get(m_pDownPB, "down"); m_pFieldsLB->SetSelectHdl(LINK(this, SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl)); - Link<> aAddRenameLk = LINK(this, SwCustomizeAddressListDialog, AddRenameHdl_Impl ); + Link<Button*,void> aAddRenameLk = LINK(this, SwCustomizeAddressListDialog, AddRenameHdl_Impl ); m_pAddPB->SetClickHdl(aAddRenameLk); m_pRenamePB->SetClickHdl(aAddRenameLk); m_pDeletePB->SetClickHdl(LINK(this, SwCustomizeAddressListDialog, DeleteHdl_Impl )); - Link<> aUpDownLk = LINK(this, SwCustomizeAddressListDialog, UpDownHdl_Impl); + Link<Button*,void> aUpDownLk = LINK(this, SwCustomizeAddressListDialog, UpDownHdl_Impl); m_pUpPB->SetClickHdl(aUpDownLk); m_pDownPB->SetClickHdl(aUpDownLk); @@ -81,7 +81,7 @@ IMPL_LINK_NOARG(SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl) return 0; } -IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwCustomizeAddressListDialog, AddRenameHdl_Impl, Button*, pButton, void) { bool bRename = pButton == m_pRenamePB; sal_Int32 nPos = m_pFieldsLB->GetSelectEntryPos(); @@ -124,10 +124,9 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton) m_pFieldsLB->SelectEntryPos(nPos); } UpdateButtons(); - return 0; } -IMPL_LINK_NOARG(SwCustomizeAddressListDialog, DeleteHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwCustomizeAddressListDialog, DeleteHdl_Impl, Button*, void) { sal_Int32 nPos = m_pFieldsLB->GetSelectEntryPos(); m_pFieldsLB->RemoveEntry(m_pFieldsLB->GetSelectEntryPos()); @@ -141,10 +140,9 @@ IMPL_LINK_NOARG(SwCustomizeAddressListDialog, DeleteHdl_Impl) aDataIter->erase(aDataIter->begin() + nPos); UpdateButtons(); - return 0; } -IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwCustomizeAddressListDialog, UpDownHdl_Impl, Button*, pButton, void) { sal_Int32 nPos; sal_Int32 nOldPos = nPos = m_pFieldsLB->GetSelectEntryPos(); @@ -169,7 +167,6 @@ IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton) } UpdateButtons(); - return 0; } void SwCustomizeAddressListDialog::UpdateButtons() diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.hxx b/sw/source/ui/dbui/customizeaddresslistdialog.hxx index e943f657b3f3..5466f1f997dd 100644 --- a/sw/source/ui/dbui/customizeaddresslistdialog.hxx +++ b/sw/source/ui/dbui/customizeaddresslistdialog.hxx @@ -40,9 +40,9 @@ class SwCustomizeAddressListDialog : public SfxModalDialog SwCSVData* m_pNewData; - DECL_LINK(AddRenameHdl_Impl, PushButton*); - DECL_LINK(DeleteHdl_Impl, void *); - DECL_LINK(UpDownHdl_Impl, PushButton*); + DECL_LINK_TYPED(AddRenameHdl_Impl, Button*, void); + DECL_LINK_TYPED(DeleteHdl_Impl, Button*, void); + DECL_LINK_TYPED(UpDownHdl_Impl, Button*, void); DECL_LINK(ListBoxSelectHdl_Impl, void *); void UpdateButtons(); diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index a7c8aa2fbde3..c65e56d26edf 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -450,7 +450,7 @@ void SwInsertDBColAutoPilot::dispose() SfxModalDialog::dispose(); } -IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton ) +IMPL_LINK_TYPED( SwInsertDBColAutoPilot, PageHdl, Button*, pButton, void ) { bool bShowTable = pButton == m_pRbAsTable; @@ -479,11 +479,9 @@ IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton ) m_pPbTableFormat->Enable( 0 != m_pLbTableCol->GetEntryCount() ); SelectHdl( bShowTable ? m_pLbTableDbColumn : m_pLbTextDbColumn ); - - return 0; } -IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) +IMPL_LINK_TYPED( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton, void ) { ListBox& rBox = m_pRbAsTable->IsChecked() ? ( 0 == m_pLbTableCol->GetEntryData( 0 ) @@ -497,11 +495,9 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) bool bFromDB = m_pRbDbFormatFromDb == pButton; (*it)->bIsDBFormat = bFromDB; m_pLbDbFormatFromUsr->Enable( !bFromDB ); - - return 0; } -IMPL_LINK( SwInsertDBColAutoPilot, TableToFromHdl, Button*, pButton ) +IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableToFromHdl, Button*, pButton, void ) { bool bChgEnable = true, bEnableTo = true, bEnableFrom = true; m_pLbTableDbColumn->SetUpdateMode( false ); @@ -642,8 +638,6 @@ IMPL_LINK( SwInsertDBColAutoPilot, TableToFromHdl, Button*, pButton ) } m_pLbTableDbColumn->SetUpdateMode( true ); m_pLbTableCol->SetUpdateMode( true ); - - return 0; } IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox ) @@ -662,7 +656,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox ) return 0; } -IMPL_LINK( SwInsertDBColAutoPilot, TableFormatHdl, PushButton*, pButton ) +IMPL_LINK_TYPED( SwInsertDBColAutoPilot, TableFormatHdl, Button*, pButton, void ) { SwWrtShell& rSh = pView->GetWrtShell(); bool bNewSet = false; @@ -777,11 +771,9 @@ IMPL_LINK( SwInsertDBColAutoPilot, TableFormatHdl, PushButton*, pButton ) delete pTableSet, pTableSet = 0; delete pRep, pRep = 0; } - - return 0; } -IMPL_LINK( SwInsertDBColAutoPilot, AutoFormatHdl, PushButton*, pButton ) +IMPL_LINK_TYPED( SwInsertDBColAutoPilot, AutoFormatHdl, Button*, pButton, void ) { SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); @@ -790,7 +782,6 @@ IMPL_LINK( SwInsertDBColAutoPilot, AutoFormatHdl, PushButton*, pButton ) OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFormatOfIndex( pTAutoFormat ); - return 0; } IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) @@ -854,7 +845,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) return 0; } -IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton ) +IMPL_LINK_TYPED( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton, void ) { if( pButton == m_pCbTableHeadon ) { @@ -863,7 +854,6 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton ) m_pRbHeadlColnms->Enable( bEnable ); m_pRbHeadlEmpty->Enable( bEnable ); } - return 0; } static void lcl_InsTextInArr( const OUString& rText, _DB_Columns& rColArr ) diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 30aec2447f77..ed3096b74a04 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -89,7 +89,7 @@ SwMailMergeAddressBlockPage::SwMailMergeAddressBlockPage( SwMailMergeWizard* _pP m_pSettingsWIN->SetSelectHdl(LINK(this, SwMailMergeAddressBlockPage, AddressBlockSelectHdl_Impl)); m_pHideEmptyParagraphsCB->SetClickHdl(LINK(this, SwMailMergeAddressBlockPage, HideParagraphsHdl_Impl)); - Link<> aLink = LINK(this, SwMailMergeAddressBlockPage, InsertDataHdl_Impl); + Link<Button*,void> aLink = LINK(this, SwMailMergeAddressBlockPage, InsertDataHdl_Impl); m_pPrevSetIB->SetClickHdl(aLink); m_pNextSetIB->SetClickHdl(aLink); } @@ -160,7 +160,7 @@ bool SwMailMergeAddressBlockPage::commitPage( ::svt::WizardTypes::CommitPageReas return true; } -IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwMailMergeAddressBlockPage, AddressListHdl_Impl, Button*, void) { try { @@ -185,10 +185,9 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl) OSL_FAIL(OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr()); ScopedVclPtrInstance<MessageDialog>::Create(this, e.Message)->Execute(); } - return 0; } -IMPL_LINK(SwMailMergeAddressBlockPage, SettingsHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeAddressBlockPage, SettingsHdl_Impl, Button*, pButton, void) { VclPtr<SwSelectAddressBlockDialog> pDlg( VclPtr<SwSelectAddressBlockDialog>::Create(pButton, m_pWizard->GetConfigItem())); @@ -212,10 +211,9 @@ IMPL_LINK(SwMailMergeAddressBlockPage, SettingsHdl_Impl, PushButton*, pButton) pDlg.reset(); GetWizard()->UpdateRoadmap(); GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); - return 0; } -IMPL_LINK(SwMailMergeAddressBlockPage, AssignHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeAddressBlockPage, AssignHdl_Impl, Button*, pButton, void) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); const sal_uInt16 nSel = m_pSettingsWIN->GetSelectedAddress(); @@ -229,7 +227,6 @@ IMPL_LINK(SwMailMergeAddressBlockPage, AssignHdl_Impl, PushButton*, pButton) GetWizard()->UpdateRoadmap(); GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); } - return 0; } void SwMailMergeAddressBlockPage::EnableAddressBlock(bool bAll, bool bSelective) @@ -244,13 +241,12 @@ void SwMailMergeAddressBlockPage::EnableAddressBlock(bool bAll, bool bSelective) m_pStep4->Enable(bSelective); } -IMPL_LINK(SwMailMergeAddressBlockPage, AddressBlockHdl_Impl, CheckBox*, pBox) +IMPL_LINK_TYPED(SwMailMergeAddressBlockPage, AddressBlockHdl_Impl, Button*, pBox, void) { - EnableAddressBlock(pBox->IsEnabled(), pBox->IsChecked()); + EnableAddressBlock(pBox->IsEnabled(), static_cast<CheckBox*>(pBox)->IsChecked()); SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); rConfigItem.SetAddressBlock(m_pAddressCB->IsChecked()); m_pWizard->UpdateRoadmap(); - return 0; } IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressBlockSelectHdl_Impl) @@ -266,14 +262,13 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressBlockSelectHdl_Impl) return 0; } -IMPL_LINK(SwMailMergeAddressBlockPage, HideParagraphsHdl_Impl, CheckBox*, pBox) +IMPL_LINK_TYPED(SwMailMergeAddressBlockPage, HideParagraphsHdl_Impl, Button*, pBox, void) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - rConfigItem.SetHideEmptyParagraphs( pBox->IsChecked() ); - return 0; + rConfigItem.SetHideEmptyParagraphs( static_cast<CheckBox*>(pBox)->IsChecked() ); } -IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, Button*, pButton, void) { //if no pButton is given, the first set has to be pre-set SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); @@ -320,7 +315,6 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton m_pAddressListPB->SetText(m_sChangeAddress); } EnableAddressBlock(bHasResultSet, m_pAddressCB->IsChecked()); - return 0; } SwSelectAddressBlockDialog::SwSelectAddressBlockDialog( @@ -341,13 +335,13 @@ SwSelectAddressBlockDialog::SwSelectAddressBlockDialog( get(m_pDependentRB, "dependent"); get(m_pCountryED, "country"); - Link<> aCustomizeHdl = LINK(this, SwSelectAddressBlockDialog, NewCustomizeHdl_Impl); + Link<Button*,void> aCustomizeHdl = LINK(this, SwSelectAddressBlockDialog, NewCustomizeHdl_Impl); m_pNewPB->SetClickHdl(aCustomizeHdl); m_pCustomizePB->SetClickHdl(aCustomizeHdl); m_pDeletePB->SetClickHdl(LINK(this, SwSelectAddressBlockDialog, DeleteHdl_Impl)); - Link<> aLk = LINK(this, SwSelectAddressBlockDialog, IncludeHdl_Impl); + Link<Button*,void> aLk = LINK(this, SwSelectAddressBlockDialog, IncludeHdl_Impl); m_pNeverRB->SetClickHdl(aLk); m_pAlwaysRB->SetClickHdl(aLk); m_pDependentRB->SetClickHdl(aLk); @@ -427,7 +421,7 @@ OUString SwSelectAddressBlockDialog::GetCountry() const return OUString(); } -IMPL_LINK(SwSelectAddressBlockDialog, DeleteHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwSelectAddressBlockDialog, DeleteHdl_Impl, Button*, pButton, void) { if(m_aAddressBlocks.getLength()) { @@ -445,10 +439,9 @@ IMPL_LINK(SwSelectAddressBlockDialog, DeleteHdl_Impl, PushButton*, pButton) pButton->Enable(false); m_pPreview->RemoveSelectedAddress(); } - return 0; } -IMPL_LINK(SwSelectAddressBlockDialog, NewCustomizeHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwSelectAddressBlockDialog, NewCustomizeHdl_Impl, Button*, pButton, void) { bool bCustomize = pButton == m_pCustomizePB; SwCustomizeAddressBlockDialog::DialogType nType = bCustomize ? @@ -478,13 +471,11 @@ IMPL_LINK(SwSelectAddressBlockDialog, NewCustomizeHdl_Impl, PushButton*, pButton } m_pDeletePB->Enable( m_aAddressBlocks.getLength() > 1); } - return 0; } -IMPL_LINK(SwSelectAddressBlockDialog, IncludeHdl_Impl, RadioButton*, pButton) +IMPL_LINK_TYPED(SwSelectAddressBlockDialog, IncludeHdl_Impl, Button*, pButton, void) { m_pCountryED->Enable(m_pDependentRB == pButton); - return 0; } #define USER_DATA_SALUTATION -1 @@ -562,7 +553,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog( Link<> aFieldsLink = LINK(this, SwCustomizeAddressBlockDialog, FieldChangeHdl_Impl); m_pFieldCB->SetModifyHdl(aFieldsLink); m_pFieldCB->SetSelectHdl(aFieldsLink); - Link<> aImgButtonHdl = LINK(this, SwCustomizeAddressBlockDialog, ImageButtonHdl_Impl); + Link<Button*,void> aImgButtonHdl = LINK(this, SwCustomizeAddressBlockDialog, ImageButtonHdl_Impl); m_pInsertFieldIB->SetClickHdl(aImgButtonHdl); m_pRemoveFieldIB->SetClickHdl(aImgButtonHdl); m_pUpIB->SetClickHdl(aImgButtonHdl); @@ -596,10 +587,9 @@ void SwCustomizeAddressBlockDialog::dispose() SfxModalDialog::dispose(); } -IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, OKHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwCustomizeAddressBlockDialog, OKHdl_Impl, Button*, void) { EndDialog(RET_OK); - return 0; } IMPL_LINK(SwCustomizeAddressBlockDialog, ListBoxSelectHdl_Impl, DDListBox*, pBox) @@ -617,7 +607,7 @@ IMPL_LINK_NOARG(SwCustomizeAddressBlockDialog, EditModifyHdl_Impl) return 0; } -IMPL_LINK(SwCustomizeAddressBlockDialog, ImageButtonHdl_Impl, ImageButton*, pButton) +IMPL_LINK_TYPED(SwCustomizeAddressBlockDialog, ImageButtonHdl_Impl, Button*, pButton, void) { if (m_pInsertFieldIB == pButton) { @@ -643,7 +633,6 @@ IMPL_LINK(SwCustomizeAddressBlockDialog, ImageButtonHdl_Impl, ImageButton*, pBut m_pDragED->MoveCurrentItem(nMove); } UpdateImageButtons_Impl(); - return 0; } sal_Int32 SwCustomizeAddressBlockDialog::GetSelectedItem_Impl() @@ -1242,13 +1231,12 @@ uno::Sequence< OUString > SwAssignFieldsDialog::CreateAssignments() return aAssignments; } -IMPL_LINK_NOARG(SwAssignFieldsDialog, OkHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwAssignFieldsDialog, OkHdl_Impl, Button*, void) { m_rConfigItem.SetColumnAssignment( m_rConfigItem.GetCurrentDBData(), CreateAssignments() ); EndDialog(RET_OK); - return 0; } IMPL_LINK_NOARG(SwAssignFieldsDialog, AssignmentModifyHdl_Impl) diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx index 2071361d0d76..2a18a5f7a46b 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.hxx +++ b/sw/source/ui/dbui/mmaddressblockpage.hxx @@ -63,13 +63,13 @@ class SwMailMergeAddressBlockPage : public svt::OWizardPage VclPtr<SwMailMergeWizard> m_pWizard; - DECL_LINK(AddressListHdl_Impl, void *); - DECL_LINK(SettingsHdl_Impl, PushButton*); - DECL_LINK(AssignHdl_Impl, PushButton*); - DECL_LINK(AddressBlockHdl_Impl, CheckBox*); - DECL_LINK(InsertDataHdl_Impl, ImageButton*); + DECL_LINK_TYPED(AddressListHdl_Impl, Button *, void); + DECL_LINK_TYPED(SettingsHdl_Impl, Button*, void); + DECL_LINK_TYPED(AssignHdl_Impl, Button*, void); + DECL_LINK_TYPED(AddressBlockHdl_Impl, Button*, void); + DECL_LINK_TYPED(InsertDataHdl_Impl, Button*, void); DECL_LINK(AddressBlockSelectHdl_Impl, void *); - DECL_LINK(HideParagraphsHdl_Impl, CheckBox*); + DECL_LINK_TYPED(HideParagraphsHdl_Impl, Button*, void); void EnableAddressBlock(bool bAll, bool bSelective); @@ -99,9 +99,9 @@ class SwSelectAddressBlockDialog : public SfxModalDialog com::sun::star::uno::Sequence< OUString> m_aAddressBlocks; SwMailMergeConfigItem& m_rConfig; - DECL_LINK(NewCustomizeHdl_Impl, PushButton*); - DECL_LINK(DeleteHdl_Impl, PushButton*); - DECL_LINK(IncludeHdl_Impl, RadioButton*); + DECL_LINK_TYPED(NewCustomizeHdl_Impl, Button*, void); + DECL_LINK_TYPED(DeleteHdl_Impl, Button*, void); + DECL_LINK_TYPED(IncludeHdl_Impl, Button*, void); using Window::SetSettings; @@ -220,10 +220,10 @@ private: SwMailMergeConfigItem& m_rConfigItem; DialogType m_eType; - DECL_LINK(OKHdl_Impl, void *); + DECL_LINK_TYPED(OKHdl_Impl, Button*, void); DECL_LINK(ListBoxSelectHdl_Impl, DDListBox*); DECL_LINK(EditModifyHdl_Impl, void *); - DECL_LINK(ImageButtonHdl_Impl, ImageButton*); + DECL_LINK_TYPED(ImageButtonHdl_Impl, Button*, void); DECL_LINK(SelectionChangedHdl_Impl, AddressMultiLineEdit*); DECL_LINK(FieldChangeHdl_Impl, void *); @@ -257,7 +257,7 @@ class SwAssignFieldsDialog : public SfxModalDialog SwMailMergeConfigItem& m_rConfigItem; ::com::sun::star::uno::Sequence< OUString > CreateAssignments(); - DECL_LINK(OkHdl_Impl, void *); + DECL_LINK_TYPED(OkHdl_Impl, Button*, void); DECL_LINK(AssignmentModifyHdl_Impl, void*); public: diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index 15c91b1e365e..02188173c99b 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -61,14 +61,14 @@ SwMailMergeDocSelectPage::SwMailMergeDocSelectPage(SwMailMergeWizard* pParent) m_pCurrentDocRB->Check(); DocSelectHdl(m_pNewDocRB); - Link<> aDocSelectLink = LINK(this, SwMailMergeDocSelectPage, DocSelectHdl); + Link<Button*,void> aDocSelectLink = LINK(this, SwMailMergeDocSelectPage, DocSelectHdl); m_pCurrentDocRB->SetClickHdl(aDocSelectLink); m_pNewDocRB->SetClickHdl(aDocSelectLink); m_pLoadDocRB->SetClickHdl(aDocSelectLink); m_pLoadTemplateRB->SetClickHdl(aDocSelectLink); m_pRecentDocRB->SetClickHdl(aDocSelectLink); - Link<> aFileSelectHdl = LINK(this, SwMailMergeDocSelectPage, FileSelectHdl); + Link<Button*,void> aFileSelectHdl = LINK(this, SwMailMergeDocSelectPage, FileSelectHdl); m_pBrowseDocPB->SetClickHdl(aFileSelectHdl); m_pBrowseTemplatePB->SetClickHdl(aFileSelectHdl); @@ -109,17 +109,15 @@ void SwMailMergeDocSelectPage::dispose() svt::OWizardPage::dispose(); } -IMPL_LINK(SwMailMergeDocSelectPage, DocSelectHdl, RadioButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeDocSelectPage, DocSelectHdl, Button*, pButton, void) { m_pRecentDocLB->Enable(m_pRecentDocRB == pButton); m_pWizard->UpdateRoadmap(); m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); - - return 0; } -IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeDocSelectPage, FileSelectHdl, Button*, pButton, void) { bool bTemplate = m_pBrowseTemplatePB == pButton; @@ -170,8 +168,6 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton) } m_pWizard->UpdateRoadmap(); m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_OUTPUTTYPETPAGE)); - - return 0; } bool SwMailMergeDocSelectPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx index 931fc4dbfce4..410494176489 100644 --- a/sw/source/ui/dbui/mmdocselectpage.hxx +++ b/sw/source/ui/dbui/mmdocselectpage.hxx @@ -44,8 +44,8 @@ class SwMailMergeDocSelectPage : public svt::OWizardPage VclPtr<SwMailMergeWizard> m_pWizard; - DECL_LINK(DocSelectHdl, RadioButton*); - DECL_LINK(FileSelectHdl, PushButton*); + DECL_LINK_TYPED(DocSelectHdl, Button*, void); + DECL_LINK_TYPED(FileSelectHdl, Button*, void); virtual bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE; diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 36fa922db9b4..0193f2de2a1a 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -79,7 +79,7 @@ static void lcl_StoreGreetingsBox(ComboBox& rBox, rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos()); } -IMPL_LINK_NOARG(SwGreetingsHandler, IndividualHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwGreetingsHandler, IndividualHdl_Impl, Button*, void) { bool bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked(); m_pFemaleFT->Enable(bIndividual); @@ -101,10 +101,9 @@ IMPL_LINK_NOARG(SwGreetingsHandler, IndividualHdl_Impl) m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); } UpdatePreview(); - return 0; } -IMPL_LINK(SwGreetingsHandler, GreetingHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwGreetingsHandler, GreetingHdl_Impl, Button*, pButton, void) { VclPtr<SwCustomizeAddressBlockDialog> pDlg( VclPtr<SwCustomizeAddressBlockDialog>::Create(pButton, m_pWizard->GetConfigItem(), @@ -122,7 +121,6 @@ IMPL_LINK(SwGreetingsHandler, GreetingHdl_Impl, PushButton*, pButton) } UpdatePreview(); } - return 0; } void SwGreetingsHandler::UpdatePreview() @@ -130,7 +128,7 @@ void SwGreetingsHandler::UpdatePreview() //the base class does nothing } -IMPL_LINK(SwMailMergeGreetingsPage, AssignHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeGreetingsPage, AssignHdl_Impl, Button*, pButton, void) { const OUString sPreview(m_pFemaleLB->GetSelectEntry() + "\n" + m_pMaleLB->GetSelectEntry()); VclPtr<SwAssignFieldsDialog> pDlg( @@ -141,7 +139,6 @@ IMPL_LINK(SwMailMergeGreetingsPage, AssignHdl_Impl, PushButton*, pButton) m_pWizard->UpdateRoadmap(); m_pWizard->enableButtons(WizardButtonFlags::NEXT, m_pWizard->isStateEnabled(MM_PREPAREMERGEPAGE)); } - return 0; } IMPL_LINK_NOARG(SwMailMergeGreetingsPage, GreetingSelectHdl_Impl) @@ -258,9 +255,9 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent) m_bIsTabPage = true; m_pGreetingLineCB->SetClickHdl(LINK(this, SwMailMergeGreetingsPage, ContainsHdl_Impl)); - Link<> aIndividualLink = LINK(this, SwGreetingsHandler, IndividualHdl_Impl); + Link<Button*,void> aIndividualLink = LINK(this, SwGreetingsHandler, IndividualHdl_Impl); m_pPersonalizedCB->SetClickHdl(aIndividualLink); - Link<> aGreetingLink = LINK(this, SwGreetingsHandler, GreetingHdl_Impl); + Link<Button*,void> aGreetingLink = LINK(this, SwGreetingsHandler, GreetingHdl_Impl); m_pFemalePB->SetClickHdl(aGreetingLink); m_pMalePB->SetClickHdl(aGreetingLink); m_pAssignPB->SetClickHdl(LINK(this, SwMailMergeGreetingsPage, AssignHdl_Impl)); @@ -273,7 +270,7 @@ SwMailMergeGreetingsPage::SwMailMergeGreetingsPage(SwMailMergeWizard* _pParent) m_pNeutralCB->SetSelectHdl(aLBoxLink); m_pNeutralCB->SetModifyHdl(aLBoxLink); - Link<> aDataLink = LINK(this, SwMailMergeGreetingsPage, InsertDataHdl_Impl); + Link<Button*,void> aDataLink = LINK(this, SwMailMergeGreetingsPage, InsertDataHdl_Impl); m_pPrevSetIB->SetClickHdl(aDataLink); m_pNextSetIB->SetClickHdl(aDataLink); @@ -363,9 +360,9 @@ bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason return true; } -IMPL_LINK(SwMailMergeGreetingsPage, ContainsHdl_Impl, CheckBox*, pBox) +IMPL_LINK_TYPED(SwMailMergeGreetingsPage, ContainsHdl_Impl, Button*, pBox, void) { - bool bContainsGreeting = pBox->IsChecked(); + bool bContainsGreeting = static_cast<CheckBox*>(pBox)->IsChecked(); SwGreetingsHandler::Contains(bContainsGreeting); m_pPreviewFI-> Enable(bContainsGreeting); m_pPreviewWIN->Enable(bContainsGreeting); @@ -376,10 +373,9 @@ IMPL_LINK(SwMailMergeGreetingsPage, ContainsHdl_Impl, CheckBox*, pBox) SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); rConfig.SetGreetingLine(m_pGreetingLineCB->IsChecked(), false); m_pWizard->UpdateRoadmap(); - return 0; } -IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeGreetingsPage, InsertDataHdl_Impl, Button*, pButton, void) { //if no pButton is given, the first set has to be pre-set SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); @@ -406,7 +402,6 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton) m_pNextSetIB->Enable(bEnable); m_pDocumentIndexFI->Enable(bEnable); m_pDocumentIndexFI->SetText(m_sDocument.replaceFirst("%1", OUString::number(nPos))); - return 0; } SwMailBodyDialog::SwMailBodyDialog(vcl::Window* pParent, SwMailMergeWizard* _pWizard) : @@ -447,9 +442,9 @@ SwMailBodyDialog::SwMailBodyDialog(vcl::Window* pParent, SwMailMergeWizard* _pWi m_pNeutralCB->SetHelpId( HID_MM_BODY_CB_NEUTRAL ); m_pGreetingLineCB->SetClickHdl(LINK(this, SwMailBodyDialog, ContainsHdl_Impl)); - Link<> aIndividualLink = LINK(this, SwGreetingsHandler, IndividualHdl_Impl); + Link<Button*,void> aIndividualLink = LINK(this, SwGreetingsHandler, IndividualHdl_Impl); m_pPersonalizedCB->SetClickHdl(aIndividualLink); - Link<> aGreetingLink = LINK(this, SwGreetingsHandler, GreetingHdl_Impl); + Link<Button*,void> aGreetingLink = LINK(this, SwGreetingsHandler, GreetingHdl_Impl); m_pFemalePB->SetClickHdl(aGreetingLink); m_pMalePB->SetClickHdl(aGreetingLink); m_pOK->SetClickHdl(LINK(this, SwMailBodyDialog, OKHdl)); @@ -495,14 +490,14 @@ void SwMailBodyDialog::dispose() SfxModalDialog::dispose(); } -IMPL_LINK(SwMailBodyDialog, ContainsHdl_Impl, CheckBox*, pBox) +IMPL_LINK_TYPED(SwMailBodyDialog, ContainsHdl_Impl, Button*, pButton, void) { + CheckBox* pBox = static_cast<CheckBox*>(pButton); SwGreetingsHandler::Contains(pBox->IsChecked()); m_pWizard->GetConfigItem().SetGreetingLine(pBox->IsChecked(), true); - return 0; } -IMPL_LINK_NOARG(SwMailBodyDialog, OKHdl) +IMPL_LINK_NOARG_TYPED(SwMailBodyDialog, OKHdl, Button*, void) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); rConfigItem.SetGreetingLine( @@ -527,7 +522,6 @@ IMPL_LINK_NOARG(SwMailBodyDialog, OKHdl) rConfigItem.SetFemaleGenderValue(m_pFemaleFieldCB->GetText()); EndDialog(RET_OK); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx index d351191b6121..91c6332fe1f0 100644 --- a/sw/source/ui/dbui/mmgreetingspage.hxx +++ b/sw/source/ui/dbui/mmgreetingspage.hxx @@ -60,8 +60,8 @@ protected: ~SwGreetingsHandler() {} - DECL_LINK(IndividualHdl_Impl, void *); - DECL_LINK(GreetingHdl_Impl, PushButton*); + DECL_LINK_TYPED(IndividualHdl_Impl, Button*, void); + DECL_LINK_TYPED(GreetingHdl_Impl, Button*, void); void Contains(bool bContainsGreeting); virtual void UpdatePreview(); @@ -79,10 +79,10 @@ class SwMailMergeGreetingsPage : public svt::OWizardPage, OUString m_sDocument; - DECL_LINK(ContainsHdl_Impl, CheckBox*); - DECL_LINK(InsertDataHdl_Impl, ImageButton*); + DECL_LINK_TYPED(ContainsHdl_Impl, Button*, void); + DECL_LINK_TYPED(InsertDataHdl_Impl, Button*, void); DECL_LINK(GreetingSelectHdl_Impl, void *); - DECL_LINK(AssignHdl_Impl, PushButton*); + DECL_LINK_TYPED(AssignHdl_Impl, Button*, void); virtual void UpdatePreview() SAL_OVERRIDE; virtual void ActivatePage() SAL_OVERRIDE; @@ -101,8 +101,8 @@ class SwMailBodyDialog : public SfxModalDialog, public SwGreetingsHandler VclPtr<OKButton> m_pOK; - DECL_LINK(ContainsHdl_Impl, CheckBox*); - DECL_LINK(OKHdl, void *); + DECL_LINK_TYPED(ContainsHdl_Impl, Button*, void); + DECL_LINK_TYPED(OKHdl, Button*, void); public: SwMailBodyDialog(vcl::Window* pParent, SwMailMergeWizard* pWizard); virtual ~SwMailBodyDialog(); diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index cc8e99ef03bf..0662cde60cf7 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -146,7 +146,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : ::SetFieldUnit( *m_pLeftMF, eFieldUnit ); ::SetFieldUnit( *m_pTopMF, eFieldUnit ); - Link<> aUpDownHdl = LINK(this, SwMailMergeLayoutPage, GreetingsHdl_Impl ); + Link<Button*,void> aUpDownHdl = LINK(this, SwMailMergeLayoutPage, GreetingsHdl_Impl ); m_pUpPB->SetClickHdl(aUpDownHdl); m_pDownPB->SetClickHdl(aUpDownHdl); m_pAlignToBodyCB->SetClickHdl(LINK(this, SwMailMergeLayoutPage, AlignToTextHdl_Impl)); @@ -704,7 +704,7 @@ IMPL_LINK_NOARG(SwMailMergeLayoutPage, ChangeAddressHdl_Impl) return 0; } -IMPL_LINK(SwMailMergeLayoutPage, GreetingsHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeLayoutPage, GreetingsHdl_Impl, Button*, pButton, void) { bool bDown = pButton == m_pDownPB; bool bMoved = m_pExampleWrtShell->MoveParagraph( bDown ? 1 : -1 ); @@ -715,17 +715,14 @@ IMPL_LINK(SwMailMergeLayoutPage, GreetingsHdl_Impl, PushButton*, pButton) //insert a new paragraph before the greeting line m_pExampleWrtShell->SplitNode(); } - - return 0; } -IMPL_LINK(SwMailMergeLayoutPage, AlignToTextHdl_Impl, CheckBox*, pBox) +IMPL_LINK_TYPED(SwMailMergeLayoutPage, AlignToTextHdl_Impl, Button*, pBox, void) { - bool bCheck = pBox->IsChecked() && pBox->IsEnabled(); + bool bCheck = static_cast<CheckBox*>(pBox)->IsChecked() && pBox->IsEnabled(); m_pLeftFT->Enable(!bCheck); m_pLeftMF->Enable(!bCheck); ChangeAddressHdl_Impl( 0 ); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx index a5558103dadb..fcd387e2cd56 100644 --- a/sw/source/ui/dbui/mmlayoutpage.hxx +++ b/sw/source/ui/dbui/mmlayoutpage.hxx @@ -68,8 +68,8 @@ class SwMailMergeLayoutPage : public svt::OWizardPage DECL_LINK(PreviewLoadedHdl_Impl, void*); DECL_LINK(ZoomHdl_Impl, ListBox*); DECL_LINK(ChangeAddressHdl_Impl, void *); - DECL_LINK(GreetingsHdl_Impl, PushButton*); - DECL_LINK(AlignToTextHdl_Impl, CheckBox*); + DECL_LINK_TYPED(GreetingsHdl_Impl, Button*, void); + DECL_LINK_TYPED(AlignToTextHdl_Impl, Button*, void); static SwFrameFormat* InsertAddressFrame( SwWrtShell& rShell, diff --git a/sw/source/ui/dbui/mmmergepage.cxx b/sw/source/ui/dbui/mmmergepage.cxx index 98233636a574..ea355771cea6 100644 --- a/sw/source/ui/dbui/mmmergepage.cxx +++ b/sw/source/ui/dbui/mmmergepage.cxx @@ -69,14 +69,13 @@ void SwMailMergeMergePage::dispose() } -IMPL_LINK_NOARG(SwMailMergeMergePage, EditDocumentHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwMailMergeMergePage, EditDocumentHdl_Impl, Button*, void) { m_pWizard->SetRestartPage(MM_MERGEPAGE); m_pWizard->EndDialog(RET_EDIT_RESULT_DOC); - return 0; } -IMPL_LINK_NOARG(SwMailMergeMergePage, FindHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwMailMergeMergePage, FindHdl_Impl, Button*, void) { SvxSearchItem aSearchItem( SID_SEARCH_ITEM ); @@ -94,8 +93,6 @@ IMPL_LINK_NOARG(SwMailMergeMergePage, FindHdl_Impl) pTargetView->GetViewFrame()->GetDispatcher()->Execute( FID_SEARCH_NOW, SfxCallMode::SYNCHRON, &aSearchItem, &aQuiet, 0L ); } - - return 0; } IMPL_LINK_NOARG(SwMailMergeMergePage, EnteredFindStringHdl_Impl) diff --git a/sw/source/ui/dbui/mmmergepage.hxx b/sw/source/ui/dbui/mmmergepage.hxx index 2ff8187eff10..30d8d992ba02 100644 --- a/sw/source/ui/dbui/mmmergepage.hxx +++ b/sw/source/ui/dbui/mmmergepage.hxx @@ -41,8 +41,8 @@ class SwMailMergeMergePage : public svt::OWizardPage VclPtr<SwMailMergeWizard> m_pWizard; - DECL_LINK(EditDocumentHdl_Impl, void *); - DECL_LINK(FindHdl_Impl, void *); + DECL_LINK_TYPED(EditDocumentHdl_Impl, Button*, void); + DECL_LINK_TYPED(FindHdl_Impl, Button*, void); DECL_LINK(EnteredFindStringHdl_Impl, void*); public: diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index d827c05e2879..b80389cd7774 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -271,7 +271,7 @@ SwMailMergeOutputPage::SwMailMergeOutputPage(SwMailMergeWizard* _pParent) if(!rConfigItem.IsMailAvailable()) m_pSendMailRB->Hide(); - Link<> aLink = LINK(this, SwMailMergeOutputPage, OutputTypeHdl_Impl); + Link<Button*,void> aLink = LINK(this, SwMailMergeOutputPage, OutputTypeHdl_Impl); m_pSaveStartDocRB->SetClickHdl(aLink); m_pSaveMergedDocRB->SetClickHdl(aLink); m_pPrintRB->SetClickHdl(aLink); @@ -392,7 +392,7 @@ bool SwMailMergeOutputPage::canAdvance() const return false; } -IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeOutputPage, OutputTypeHdl_Impl, Button*, pButton, void) { vcl::Window* aControls[] = { @@ -526,19 +526,17 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton) m_pFromRB->GetClickHdl().Call(m_pFromRB->IsChecked() ? m_pFromRB.get() : 0); SetUpdateMode(false); - return 0; } -IMPL_LINK(SwMailMergeOutputPage, DocumentSelectionHdl_Impl, RadioButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeOutputPage, DocumentSelectionHdl_Impl, Button*, pButton, void) { bool bEnableFromTo = pButton == m_pFromRB; m_pFromNF->Enable(bEnableFromTo); m_pToFT->Enable(bEnableFromTo); m_pToNF->Enable(bEnableFromTo); - return 0; } -IMPL_LINK(SwMailMergeOutputPage, CopyToHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeOutputPage, CopyToHdl_Impl, Button*, pButton, void) { ScopedVclPtrInstance< SwCopyToDialog > pDlg(pButton); pDlg->SetCC(m_sCC ); @@ -548,10 +546,9 @@ IMPL_LINK(SwMailMergeOutputPage, CopyToHdl_Impl, PushButton*, pButton) m_sCC = pDlg->GetCC() ; m_sBCC = pDlg->GetBCC(); } - return 0; } -IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeOutputPage, SaveStartHdl_Impl, Button*, pButton, void) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); SwView* pSourceView = rConfigItem.GetSourceView(); @@ -588,13 +585,11 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton) } } - return 0; } -IMPL_LINK_NOARG(SwMailMergeOutputPage, SaveCancelHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwMailMergeOutputPage, SaveCancelHdl_Impl, Button*, void) { m_bCancelSaving = true; - return 0; } int SwMailMergeOutputPage::documentStartPageNumber( int document ) const @@ -641,20 +636,20 @@ int SwMailMergeOutputPage::documentEndPageNumber( int document ) const } } -IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeOutputPage, SaveOutputHdl_Impl, Button*, pButton, void) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); SwView* pTargetView = rConfigItem.GetTargetView(); OSL_ENSURE(pTargetView, "no target view exists"); if(!pTargetView) - return 0; + return; if(m_pSaveAsOneRB->IsChecked()) { OUString sFilter; const OUString sPath = SwMailMergeHelper::CallSaveAsDialog(sFilter); if (sPath.isEmpty()) - return 0; + return; uno::Sequence< beans::PropertyValue > aValues(1); beans::PropertyValue* pValues = aValues.getArray(); pValues[0].Name = "FilterName"; @@ -699,7 +694,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) OUString sFilter; OUString sPath = SwMailMergeHelper::CallSaveAsDialog(sFilter); if (sPath.isEmpty()) - return 0; + return; OUString sTargetTempURL = URIHelper::SmartRel2Abs( INetURLObject(), utl::TempFile::CreateTempName(), URIHelper::GetMaybeFileHdl()); @@ -805,7 +800,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) else { xTempDocShell->DoClose(); - return 0; + return; } } else @@ -819,7 +814,6 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) } m_pWizard->enableButtons(WizardButtonFlags::CANCEL, true); m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); - return 0; } IMPL_LINK(SwMailMergeOutputPage, PrinterChangeHdl_Impl, ListBox*, pBox) @@ -865,12 +859,12 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterChangeHdl_Impl, ListBox*, pBox) return 0; } -IMPL_LINK_NOARG(SwMailMergeOutputPage, PrintHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwMailMergeOutputPage, PrintHdl_Impl, Button*, void) { SwView* pTargetView = m_pWizard->GetConfigItem().GetTargetView(); OSL_ENSURE(pTargetView, "no target view exists"); if(!pTargetView) - return 0; + return; sal_uInt32 nBegin = 0; sal_uInt32 nEnd = 0; @@ -920,16 +914,14 @@ IMPL_LINK_NOARG(SwMailMergeOutputPage, PrintHdl_Impl) pTargetView->SetMailMergeConfigItem(0, 0, false); m_pWizard->enableButtons(WizardButtonFlags::CANCEL, true); m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); - return 0; } -IMPL_LINK(SwMailMergeOutputPage, PrinterSetupHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeOutputPage, PrinterSetupHdl_Impl, Button*, pButton, void) { if( !m_pTempPrinter ) PrinterChangeHdl_Impl(m_pPrinterLB); if(m_pTempPrinter) m_pTempPrinter->Setup(pButton); - return 0; } IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox) @@ -958,7 +950,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox) return 0; } -IMPL_LINK(SwMailMergeOutputPage, SendAsHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeOutputPage, SendAsHdl_Impl, Button*, pButton, void) { VclPtr<SwMailBodyDialog> pDlg = VclPtr<SwMailBodyDialog>::Create(pButton, m_pWizard); pDlg->SetBody(m_sBody); @@ -966,11 +958,10 @@ IMPL_LINK(SwMailMergeOutputPage, SendAsHdl_Impl, PushButton*, pButton) { m_sBody = pDlg->GetBody(); } - return 0; } // Send documents as e-mail -IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) +IMPL_LINK_TYPED(SwMailMergeOutputPage, SendDocumentsHdl_Impl, Button*, pButton, void) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); @@ -978,7 +969,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) SwView* pTargetView = rConfigItem.GetTargetView(); OSL_ENSURE(pTargetView, "no target view exists"); if(!pTargetView) - return 0; + return; if(rConfigItem.GetMailServer().isEmpty() || !SwMailMergeHelper::CheckMailAddress(rConfigItem.GetMailAddress()) ) @@ -993,7 +984,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) } if(nRet != RET_OK && nRet != RET_YES) - return 0; + return; } //add the documents sal_uInt32 nBegin = 0; @@ -1072,7 +1063,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) pSfxFlt = pFilterContainer->GetFilter4Extension(sExtension, SfxFilterFlags::EXPORT); if(!pSfxFlt) - return 0; + return; OUString sMimeType = pSfxFlt->GetMimeType(); if(m_pSubjectED->GetText().isEmpty()) @@ -1087,7 +1078,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) m_pSubjectED->SetText(aQuery->GetValue()); } else - return 0; + return; } if(!bAsBody && m_pAttachmentED->GetText().isEmpty()) { @@ -1108,7 +1099,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) m_pAttachmentED->SetText(sAttach); } else - return 0; + return; } SfxStringItem aFilterName( SID_FILTER_NAME, pSfxFlt->GetFilterName() ); OUString sEMailColumn = m_pMailToLB->GetSelectEntry(); @@ -1116,7 +1107,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) Reference< sdbcx::XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), UNO_QUERY); Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0; if(sEMailColumn.isEmpty() || !xColAccess.is() || !xColAccess->hasByName(sEMailColumn)) - return 0; + return; OUString sFilterOptions; if(MM_DOCTYPE_TEXT == nDocType) @@ -1309,9 +1300,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) ::osl::File::remove( sTargetTempURL ); m_pWizard->enableButtons(WizardButtonFlags::FINISH, true); - //the dialog deletes itself - //delete pDlg; - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx index 7dc3061adc1d..9b564897e4d8 100644 --- a/sw/source/ui/dbui/mmoutputpage.hxx +++ b/sw/source/ui/dbui/mmoutputpage.hxx @@ -104,18 +104,18 @@ class SwMailMergeOutputPage : public svt::OWizardPage OUString m_sCC; OUString m_sBCC; - DECL_LINK(OutputTypeHdl_Impl, RadioButton*); - DECL_LINK(CopyToHdl_Impl, PushButton*); - DECL_LINK(SaveStartHdl_Impl, PushButton* ); - DECL_LINK(SaveOutputHdl_Impl, PushButton* ); + DECL_LINK_TYPED(OutputTypeHdl_Impl, Button*, void); + DECL_LINK_TYPED(CopyToHdl_Impl, Button*, void); + DECL_LINK_TYPED(SaveStartHdl_Impl, Button*, void ); + DECL_LINK_TYPED(SaveOutputHdl_Impl, Button* , void); DECL_LINK(PrinterChangeHdl_Impl, ListBox* ); - DECL_LINK(PrintHdl_Impl, void *); - DECL_LINK(PrinterSetupHdl_Impl, PushButton* ); + DECL_LINK_TYPED(PrintHdl_Impl, Button*, void); + DECL_LINK_TYPED(PrinterSetupHdl_Impl, Button*, void ); DECL_LINK(SendTypeHdl_Impl, ListBox*); - DECL_LINK(SendAsHdl_Impl, PushButton*); - DECL_LINK(SendDocumentsHdl_Impl, PushButton*); - DECL_LINK(DocumentSelectionHdl_Impl, RadioButton*); - DECL_LINK(SaveCancelHdl_Impl, void *); + DECL_LINK_TYPED(SendAsHdl_Impl, Button*, void); + DECL_LINK_TYPED(SendDocumentsHdl_Impl, Button*, void); + DECL_LINK_TYPED(DocumentSelectionHdl_Impl, Button*, void); + DECL_LINK_TYPED(SaveCancelHdl_Impl, Button*, void); int documentStartPageNumber( int document ) const; int documentEndPageNumber( int document ) const; @@ -178,8 +178,8 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog sal_Int32 m_nSendCount; sal_Int32 m_nErrorCount; - DECL_DLLPRIVATE_LINK( StopHdl_Impl, PushButton* ); - DECL_DLLPRIVATE_LINK( CloseHdl_Impl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( StopHdl_Impl, Button*, void ); + DECL_DLLPRIVATE_LINK_TYPED( CloseHdl_Impl, Button* , void); DECL_DLLPRIVATE_STATIC_LINK( SwSendMailDialog, StartSendMails, SwSendMailDialog* ); DECL_DLLPRIVATE_STATIC_LINK( SwSendMailDialog, StopSendMails, SwSendMailDialog* ); DECL_DLLPRIVATE_LINK_TYPED( RemoveThis, Idle*, void ); diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index b1140d1562ce..46e34667986b 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -35,7 +35,7 @@ SwMailMergeOutputTypePage::SwMailMergeOutputTypePage(SwMailMergeWizard* pParent) get(m_pLetterHint, "letterft"); get(m_pMailHint, "emailft"); - Link<> aLink = LINK(this, SwMailMergeOutputTypePage, TypeHdl_Impl); + Link<Button*,void> aLink = LINK(this, SwMailMergeOutputTypePage, TypeHdl_Impl); m_pLetterRB->SetClickHdl(aLink); m_pMailRB->SetClickHdl(aLink); @@ -64,7 +64,7 @@ void SwMailMergeOutputTypePage::dispose() } -IMPL_LINK_NOARG(SwMailMergeOutputTypePage, TypeHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwMailMergeOutputTypePage, TypeHdl_Impl, Button*, void) { bool bLetter = m_pLetterRB->IsChecked(); m_pLetterHint->Show(bLetter); @@ -72,7 +72,6 @@ IMPL_LINK_NOARG(SwMailMergeOutputTypePage, TypeHdl_Impl) m_pWizard->GetConfigItem().SetOutputToLetter(bLetter); m_pWizard->updateRoadmapItemLabel( MM_ADDRESSBLOCKPAGE ); m_pWizard->UpdateRoadmap(); - return 0; } @@ -364,7 +363,7 @@ void SwSendMailDialog::SetDocumentCount( sal_Int32 nAllDocuments ) UpdateTransferStatus(); } -IMPL_LINK( SwSendMailDialog, StopHdl_Impl, PushButton*, pButton ) +IMPL_LINK_TYPED( SwSendMailDialog, StopHdl_Impl, Button*, pButton, void ) { m_bCancel = true; if(m_pImpl->xMailDispatcher.is()) @@ -382,13 +381,11 @@ IMPL_LINK( SwSendMailDialog, StopHdl_Impl, PushButton*, pButton ) m_pPaused->Show(false); } } - return 0; } -IMPL_LINK_NOARG(SwSendMailDialog, CloseHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwSendMailDialog, CloseHdl_Impl, Button*, void) { ModelessDialog::Show( false ); - return 0; } IMPL_STATIC_LINK( SwSendMailDialog, StartSendMails, SwSendMailDialog*, pDialog ) diff --git a/sw/source/ui/dbui/mmoutputtypepage.hxx b/sw/source/ui/dbui/mmoutputtypepage.hxx index 9c967c05f7fb..bc2d29f2ea59 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.hxx +++ b/sw/source/ui/dbui/mmoutputtypepage.hxx @@ -35,7 +35,7 @@ class SwMailMergeOutputTypePage : public svt::OWizardPage VclPtr<SwMailMergeWizard> m_pWizard; - DECL_LINK(TypeHdl_Impl, void *); + DECL_LINK_TYPED(TypeHdl_Impl, Button*, void); public: SwMailMergeOutputTypePage( SwMailMergeWizard* _pParent); diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx index 854922b433f3..cbcf5f8d47f3 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.cxx +++ b/sw/source/ui/dbui/mmpreparemergepage.cxx @@ -50,14 +50,14 @@ SwMailMergePrepareMergePage::SwMailMergePrepareMergePage( SwMailMergeWizard* _pP get(m_pEditPB, "edit"); m_pEditPB->SetClickHdl( LINK( this, SwMailMergePrepareMergePage, EditDocumentHdl_Impl)); - Link<> aMoveLink(LINK( this, SwMailMergePrepareMergePage, MoveHdl_Impl)); + Link<Button*,void> aMoveLink(LINK( this, SwMailMergePrepareMergePage, MoveClickHdl_Impl)); m_pFirstPB->SetClickHdl( aMoveLink ); m_pPrevPB->SetClickHdl( aMoveLink ); m_pNextPB->SetClickHdl( aMoveLink ); m_pLastPB->SetClickHdl( aMoveLink ); - m_pRecordED->SetModifyHdl( aMoveLink ); + m_pRecordED->SetModifyHdl( LINK( this, SwMailMergePrepareMergePage, MoveHdl_Impl) ); m_pExcludeCB->SetClickHdl(LINK(this, SwMailMergePrepareMergePage, ExcludeHdl_Impl)); - aMoveLink.Call(m_pRecordED); + MoveHdl_Impl(m_pRecordED); } SwMailMergePrepareMergePage::~SwMailMergePrepareMergePage() @@ -78,13 +78,16 @@ void SwMailMergePrepareMergePage::dispose() svt::OWizardPage::dispose(); } -IMPL_LINK_NOARG(SwMailMergePrepareMergePage, EditDocumentHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwMailMergePrepareMergePage, EditDocumentHdl_Impl, Button*, void) { m_pWizard->SetRestartPage(MM_PREPAREMERGEPAGE); m_pWizard->EndDialog(RET_EDIT_DOC); - return 0; } +IMPL_LINK_TYPED( SwMailMergePrepareMergePage, MoveClickHdl_Impl, Button*, pCtrl, void) +{ + MoveHdl_Impl(pCtrl); +} IMPL_LINK( SwMailMergePrepareMergePage, MoveHdl_Impl, void*, pCtrl) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); @@ -135,11 +138,10 @@ IMPL_LINK( SwMailMergePrepareMergePage, MoveHdl_Impl, void*, pCtrl) return 0; } -IMPL_LINK( SwMailMergePrepareMergePage, ExcludeHdl_Impl, CheckBox*, pBox) +IMPL_LINK_TYPED( SwMailMergePrepareMergePage, ExcludeHdl_Impl, Button*, pBox, void) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - rConfigItem.ExcludeRecord( rConfigItem.GetResultSetPosition(), pBox->IsChecked()); - return 0; + rConfigItem.ExcludeRecord( rConfigItem.GetResultSetPosition(), static_cast<CheckBox*>(pBox)->IsChecked()); }; void SwMailMergePrepareMergePage::ActivatePage() diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx index 8bfdfbe94158..7b0fb2cbe882 100644 --- a/sw/source/ui/dbui/mmpreparemergepage.hxx +++ b/sw/source/ui/dbui/mmpreparemergepage.hxx @@ -40,9 +40,10 @@ class SwMailMergePrepareMergePage : public svt::OWizardPage VclPtr<SwMailMergeWizard> m_pWizard; - DECL_LINK(EditDocumentHdl_Impl, void *); - DECL_LINK(ExcludeHdl_Impl, CheckBox*); + DECL_LINK_TYPED(EditDocumentHdl_Impl, Button*, void); + DECL_LINK_TYPED(ExcludeHdl_Impl, Button*, void); DECL_LINK(MoveHdl_Impl, void*); + DECL_LINK_TYPED(MoveClickHdl_Impl, Button*, void); virtual void ActivatePage() SAL_OVERRIDE; virtual bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE; diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 24c3df4753c7..6ed6e3d6fae7 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -157,7 +157,7 @@ void SwSelectDBTableDialog::dispose() SfxModalDialog::dispose(); } -IMPL_LINK(SwSelectDBTableDialog, PreviewHdl, PushButton*, pButton) +IMPL_LINK_TYPED(SwSelectDBTableDialog, PreviewHdl, Button*, pButton, void) { SvTreeListEntry* pEntry = m_pTable->FirstSelected(); if(pEntry) @@ -190,8 +190,6 @@ IMPL_LINK(SwSelectDBTableDialog, PreviewHdl, PushButton*, pButton) VclPtrInstance< SwDBTablePreviewDialog > pDlg(pButton, aProperties); pDlg->Execute(); } - - return 0; } OUString SwSelectDBTableDialog::GetSelectedTable(bool& bIsTable) diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx index b02b74b2cb72..98ea8141e004 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.hxx +++ b/sw/source/ui/dbui/selectdbtabledialog.hxx @@ -45,7 +45,7 @@ class SwSelectDBTableDialog : public SfxModalDialog css::uno::Reference<css::sdbc::XConnection> m_xConnection; - DECL_LINK(PreviewHdl, PushButton*); + DECL_LINK_TYPED(PreviewHdl, Button*, void); public: SwSelectDBTableDialog(vcl::Window* pParent, const css::uno::Reference<css::sdbc::XConnection>& xConnection); diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx index 70909751a46e..1744d261c699 100644 --- a/sw/source/ui/dialog/docstdlg.cxx +++ b/sw/source/ui/dialog/docstdlg.cxx @@ -140,7 +140,7 @@ void SwDocStatPage::Update() SetData(aDocStat); } -IMPL_LINK_NOARG(SwDocStatPage, UpdateHdl) +IMPL_LINK_NOARG_TYPED(SwDocStatPage, UpdateHdl, Button*, void) { Update(); SwDocShell* pDocShell = static_cast<SwDocShell*>( SfxObjectShell::Current()); @@ -148,7 +148,6 @@ IMPL_LINK_NOARG(SwDocStatPage, UpdateHdl) if(pFEShell) m_pLineNo->SetText( OUString::number( pFEShell->GetLineCount(false))); //pButton->Disable(); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 6415789f4b9e..ce894f43059a 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -161,11 +161,10 @@ OUString AbstractTabDialog_Impl::GetText() const return pDlg->GetText(); } -IMPL_LINK_NOARG(AbstractApplyTabDialog_Impl, ApplyHdl) +IMPL_LINK_NOARG_TYPED(AbstractApplyTabDialog_Impl, ApplyHdl, Button*, void) { if (pDlg->Apply()) m_aHandler.Call(NULL); - return 0; } void AbstractApplyTabDialog_Impl::SetApplyHdl( const Link<>& rLink ) diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index c0a2a0a4e00d..fa8f1044410c 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -135,7 +135,7 @@ public: : AbstractTabDialog_Impl(p) { } - DECL_LINK(ApplyHdl, void*); + DECL_LINK_TYPED(ApplyHdl, Button*, void); private: Link<> m_aHandler; virtual void SetApplyHdl( const Link<>& rLink ) SAL_OVERRIDE; diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 5925834e27a9..b0785205aad2 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -754,7 +754,7 @@ IMPL_LINK( SwEditRegionDlg, DeselectHdl, SvTreeListBox *, pBox ) } // in OkHdl the modified settings are being applied and reversed regions are deleted -IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl) +IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OkHdl, Button*, void) { // temp. Array because during changing of a region the position // inside of the "Core-Arrays" can be shifted: @@ -828,15 +828,14 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl) rSh.EndUndo(); rSh.EndAllAction(); - - return 0; } // Toggle protect -IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox ) +IMPL_LINK_TYPED( SwEditRegionDlg, ChangeProtectHdl, Button *, pButton, void ) { + TriStateBox* pBox = static_cast<TriStateBox*>(pButton); if(!CheckPasswd(pBox)) - return 0; + return; pBox->EnableTriState(false); SvTreeListEntry* pEntry = m_pTree->FirstSelected(); OSL_ENSURE(pEntry,"no entry found"); @@ -853,14 +852,14 @@ IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox ) } m_pPasswdCB->Enable(bCheck); m_pPasswdPB->Enable(bCheck); - return 0; } // Toggle hide -IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox ) +IMPL_LINK_TYPED( SwEditRegionDlg, ChangeHideHdl, Button *, pButton, void ) { + TriStateBox* pBox = static_cast<TriStateBox*>(pButton); if(!CheckPasswd(pBox)) - return 0; + return; pBox->EnableTriState(false); SvTreeListEntry* pEntry = m_pTree->FirstSelected(); OSL_ENSURE(pEntry,"no entry found"); @@ -880,14 +879,14 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox ) bool bHide = TRISTATE_TRUE == pBox->GetState(); m_pConditionED->Enable(bHide); m_pConditionFT->Enable(bHide); - return 0; } // Toggle edit in readonly -IMPL_LINK( SwEditRegionDlg, ChangeEditInReadonlyHdl, TriStateBox *, pBox ) +IMPL_LINK_TYPED( SwEditRegionDlg, ChangeEditInReadonlyHdl, Button *, pButton, void ) { + TriStateBox* pBox = static_cast<TriStateBox*>(pButton); if(!CheckPasswd(pBox)) - return 0; + return; pBox->EnableTriState(false); SvTreeListEntry* pEntry = m_pTree->FirstSelected(); OSL_ENSURE(pEntry,"no entry found"); @@ -898,15 +897,13 @@ IMPL_LINK( SwEditRegionDlg, ChangeEditInReadonlyHdl, TriStateBox *, pBox ) TRISTATE_TRUE == pBox->GetState()); pEntry = m_pTree->NextSelected(pEntry); } - - return 0; } // clear selected region -IMPL_LINK_NOARG(SwEditRegionDlg, ChangeDismissHdl) +IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, ChangeDismissHdl, Button*, void) { if(!CheckPasswd()) - return 0; + return; SvTreeListEntry* pEntry = m_pTree->FirstSelected(); SvTreeListEntry* pChild; SvTreeListEntry* pParent; @@ -965,14 +962,14 @@ IMPL_LINK_NOARG(SwEditRegionDlg, ChangeDismissHdl) m_pOK->GrabFocus(); UseFileHdl(m_pFileCB); } - return 0; } // link CheckBox to file? -IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( SwEditRegionDlg, UseFileHdl, Button *, pButton, void ) { + CheckBox* pBox = static_cast<CheckBox*>(pButton); if(!CheckPasswd(pBox)) - return 0; + return; SvTreeListEntry* pEntry = m_pTree->FirstSelected(); pBox->EnableTriState(false); bool bMulti = 1 < m_pTree->GetSelectionCount(); @@ -1022,27 +1019,25 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox ) m_pDDECB->Enable(false); m_pDDEFrame->Enable(false); } - return 0; } // call dialog paste file -IMPL_LINK_NOARG(SwEditRegionDlg, FileSearchHdl) +IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, FileSearchHdl, Button*, void) { if(!CheckPasswd(0)) - return 0; + return; m_pOldDefDlgParent = Application::GetDefDialogParent(); Application::SetDefDialogParent( this ); delete m_pDocInserter; m_pDocInserter = new ::sfx2::DocumentInserter( "swriter" ); m_pDocInserter->StartExecuteModal( LINK( this, SwEditRegionDlg, DlgClosedHdl ) ); - return 0; } -IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl) +IMPL_LINK_NOARG_TYPED(SwEditRegionDlg, OptionsHdl, Button*, void) { if(!CheckPasswd()) - return 0; + return; SvTreeListEntry* pEntry = m_pTree->FirstSelected(); if(pEntry) @@ -1135,8 +1130,6 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl) } } } - - return 0; } // Applying of the filename or the linked region @@ -1189,10 +1182,11 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit ) return 0; } -IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED( SwEditRegionDlg, DDEHdl, Button*, pButton, void ) { + CheckBox* pBox = static_cast<CheckBox*>(pButton); if(!CheckPasswd(pBox)) - return 0; + return; SvTreeListEntry* pEntry = m_pTree->FirstSelected(); if(pEntry) { @@ -1235,17 +1229,16 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox ) } m_pFilePB->Enable(bFile && !bDDE); } - return 0; } -IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox ) +IMPL_LINK_TYPED( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox, void ) { bool bChange = pBox == m_pPasswdPB; if(!CheckPasswd(0)) { if(!bChange) m_pPasswdCB->Check(!m_pPasswdCB->IsChecked()); - return 0; + return; } SvTreeListEntry* pEntry = m_pTree->FirstSelected(); bool bSet = bChange ? bChange : m_pPasswdCB->IsChecked(); @@ -1288,7 +1281,6 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox ) } pEntry = m_pTree->NextSelected(pEntry); } - return 0; } // the current region name is being added to the TreeListBox immediately during @@ -1686,23 +1678,21 @@ VclPtr<SfxTabPage> SwInsertSectionTabPage::Create( vcl::Window* pParent, return VclPtr<SwInsertSectionTabPage>::Create(pParent, *rAttrSet); } -IMPL_LINK( SwInsertSectionTabPage, ChangeHideHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( SwInsertSectionTabPage, ChangeHideHdl, Button *, pBox, void ) { - bool bHide = pBox->IsChecked(); + bool bHide = static_cast<CheckBox*>(pBox)->IsChecked(); m_pConditionED->Enable(bHide); m_pConditionFT->Enable(bHide); - return 0; } -IMPL_LINK( SwInsertSectionTabPage, ChangeProtectHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( SwInsertSectionTabPage, ChangeProtectHdl, Button *, pBox, void ) { - bool bCheck = pBox->IsChecked(); + bool bCheck = static_cast<CheckBox*>(pBox)->IsChecked(); m_pPasswdCB->Enable(bCheck); m_pPasswdPB->Enable(bCheck); - return 0; } -IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton ) +IMPL_LINK_TYPED( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton, void ) { bool bChange = pButton == m_pPasswdPB; bool bSet = bChange ? bChange : m_pPasswdCB->IsChecked(); @@ -1730,7 +1720,6 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton ) } else m_aNewPasswd.realloc(0); - return 0; } IMPL_LINK_NOARG(SwInsertSectionTabPage, NameEditHdl) @@ -1741,8 +1730,9 @@ IMPL_LINK_NOARG(SwInsertSectionTabPage, NameEditHdl) return 0; } -IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void ) { + CheckBox* pBox = static_cast<CheckBox*>(pButton); if( pBox->IsChecked() ) { if( m_pWrtSh->HasSelection() && @@ -1768,21 +1758,20 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox ) m_pDDECB->Check(false); DDEHdl(m_pDDECB); } - return 0; } -IMPL_LINK_NOARG(SwInsertSectionTabPage, FileSearchHdl) +IMPL_LINK_NOARG_TYPED(SwInsertSectionTabPage, FileSearchHdl, Button*, void) { m_pOldDefDlgParent = Application::GetDefDialogParent(); Application::SetDefDialogParent( this ); delete m_pDocInserter; m_pDocInserter = new ::sfx2::DocumentInserter( "swriter" ); m_pDocInserter->StartExecuteModal( LINK( this, SwInsertSectionTabPage, DlgClosedHdl ) ); - return 0; } -IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED( SwInsertSectionTabPage, DDEHdl, Button*, pButton, void ) { + CheckBox* pBox = static_cast<CheckBox*>(pButton); bool bDDE = pBox->IsChecked(); bool bFile = m_pFileCB->IsChecked(); m_pFilePB->Enable(!bDDE && bFile); @@ -1805,7 +1794,6 @@ IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox ) m_pSubRegionED->Enable(bFile); m_pFileNameED->SetAccessibleName(m_pFileNameFT->GetText()); } - return 0; } IMPL_LINK_TYPED( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg, void ) @@ -1862,7 +1850,7 @@ SwSectionFootnoteEndTabPage::SwSectionFootnoteEndTabPage( vcl::Window *pParent, get(pEndSuffixFT,"endsuffix_label"); get(pEndSuffixED,"endsuffix"); - Link<> aLk( LINK( this, SwSectionFootnoteEndTabPage, FootEndHdl)); + Link<Button*,void> aLk( LINK( this, SwSectionFootnoteEndTabPage, FootEndHdl)); pFootnoteNtAtTextEndCB->SetClickHdl( aLk ); pFootnoteNtNumCB->SetClickHdl( aLk ); pEndNtAtTextEndCB->SetClickHdl( aLk ); @@ -2045,7 +2033,7 @@ VclPtr<SfxTabPage> SwSectionFootnoteEndTabPage::Create( vcl::Window* pParent, return VclPtr<SwSectionFootnoteEndTabPage>::Create(pParent, *rAttrSet); } -IMPL_LINK( SwSectionFootnoteEndTabPage, FootEndHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( SwSectionFootnoteEndTabPage, FootEndHdl, Button *, pBox, void ) { bool bFoot = pFootnoteNtAtTextEndCB == pBox || pFootnoteNtNumCB == pBox || pFootnoteNtNumFormatCB == pBox ; @@ -2097,8 +2085,6 @@ IMPL_LINK( SwSectionFootnoteEndTabPage, FootEndHdl, CheckBox *, pBox ) pSuffixED->Enable( bEnableNumFormat ); pPrefixFT->Enable( bEnableNumFormat ); pSuffixFT->Enable( bEnableNumFormat ); - - return 0; } SwSectionPropertyTabDialog::SwSectionPropertyTabDialog( diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx index 7184c39437ab..bebfe4f3870a 100644 --- a/sw/source/ui/dialog/wordcountdialog.cxx +++ b/sw/source/ui/dialog/wordcountdialog.cxx @@ -34,14 +34,13 @@ #include <vcl/msgbox.hxx> #include <vcl/settings.hxx> -IMPL_STATIC_LINK_NOARG(SwWordCountFloatDlg, CloseHdl) +IMPL_STATIC_LINK_NOARG_TYPED(SwWordCountFloatDlg, CloseHdl, Button*, void) { SfxViewFrame* pVFrame = ::GetActiveView()->GetViewFrame(); if (pVFrame != NULL) { pVFrame->ToggleChildWindow(FN_WORDCOUNT_DIALOG); } - return 0; } SwWordCountFloatDlg::~SwWordCountFloatDlg() diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 37f6aac760a9..e24dbd09f427 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -266,7 +266,7 @@ IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox ) return 0; } -IMPL_LINK_NOARG(SwEnvPage, FieldHdl) +IMPL_LINK_NOARG_TYPED(SwEnvPage, FieldHdl, Button*, void) { OUString aStr("<" + m_pDatabaseLB->GetSelectEntry() + "." + m_pTableLB->GetSelectEntry() + "." + @@ -276,10 +276,9 @@ IMPL_LINK_NOARG(SwEnvPage, FieldHdl) Selection aSel = m_pAddrEdit->GetSelection(); m_pAddrEdit->GrabFocus(); m_pAddrEdit->SetSelection(aSel); - return 0; } -IMPL_LINK_NOARG(SwEnvPage, SenderHdl) +IMPL_LINK_NOARG_TYPED(SwEnvPage, SenderHdl, Button*, void) { const bool bEnable = m_pSenderBox->IsChecked(); GetParentSwEnvDlg()->aEnvItem.bSend = bEnable; @@ -291,7 +290,6 @@ IMPL_LINK_NOARG(SwEnvPage, SenderHdl) m_pSenderEdit->SetText(MakeSender()); } m_pPreview->Invalidate(); - return 0; } void SwEnvPage::InitDatabaseBox() diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx index 17cf4ce5070f..649db1512e4a 100644 --- a/sw/source/ui/envelp/envprt.cxx +++ b/sw/source/ui/envelp/envprt.cxx @@ -84,7 +84,7 @@ void SwEnvPrtPage::dispose() SfxTabPage::dispose(); } -IMPL_LINK_NOARG(SwEnvPrtPage, ClickHdl) +IMPL_LINK_NOARG_TYPED(SwEnvPrtPage, ClickHdl, Button*, void) { if (m_pBottomButton->IsChecked()) { @@ -106,10 +106,9 @@ IMPL_LINK_NOARG(SwEnvPrtPage, ClickHdl) m_pAlignBox->SetItemImage(m_aIds[ENV_VER_CNTR], Image(Bitmap(SW_RES(BMP_VER_CNTR_UPPER)))); m_pAlignBox->SetItemImage(m_aIds[ENV_VER_RGHT], Image(Bitmap(SW_RES(BMP_VER_RGHT_UPPER)))); } - return 0; } -IMPL_LINK( SwEnvPrtPage, ButtonHdl, Button *, pBtn ) +IMPL_LINK_TYPED( SwEnvPrtPage, ButtonHdl, Button *, pBtn, void ) { if (pBtn == m_pPrtSetup) { @@ -124,7 +123,6 @@ IMPL_LINK( SwEnvPrtPage, ButtonHdl, Button *, pBtn ) m_pPrinterInfo->SetText(pPrt->GetName()); } } - return 0; } IMPL_LINK_NOARG_TYPED(SwEnvPrtPage, AlignHdl, ToolBox *, void) diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx index 33c553032802..5f386f7159f4 100644 --- a/sw/source/ui/envelp/envprt.hxx +++ b/sw/source/ui/envelp/envprt.hxx @@ -47,9 +47,9 @@ class SwEnvPrtPage : public SfxTabPage VclPtr<Printer> pPrt; - DECL_LINK(ClickHdl, void *); + DECL_LINK_TYPED(ClickHdl, Button*, void); DECL_LINK_TYPED(AlignHdl, ToolBox *, void); - DECL_LINK( ButtonHdl, Button * ); + DECL_LINK_TYPED(ButtonHdl, Button *, void ); SwEnvDlg* GetParentSwEnvDlg() {return static_cast<SwEnvDlg*>( GetParentDialog());} diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 96c02c28caa3..8159a72c6a3a 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -327,7 +327,7 @@ void SwLabPage::SetToBusinessCard() m_pAddressFrame->Hide(); }; -IMPL_LINK_NOARG(SwLabPage, AddrHdl) +IMPL_LINK_NOARG_TYPED(SwLabPage, AddrHdl, Button*, void) { OUString aWriting; @@ -336,7 +336,6 @@ IMPL_LINK_NOARG(SwLabPage, AddrHdl) m_pWritingEdit->SetText( aWriting ); m_pWritingEdit->GrabFocus(); - return 0; } IMPL_LINK( SwLabPage, DatabaseHdl, ListBox *, pListBox ) @@ -352,7 +351,7 @@ IMPL_LINK( SwLabPage, DatabaseHdl, ListBox *, pListBox ) return 0; } -IMPL_LINK_NOARG(SwLabPage, FieldHdl) +IMPL_LINK_NOARG_TYPED(SwLabPage, FieldHdl, Button*, void) { OUString aStr("<" + m_pDatabaseLB->GetSelectEntry() + "." + m_pTableLB->GetSelectEntry() + "." + @@ -362,13 +361,11 @@ IMPL_LINK_NOARG(SwLabPage, FieldHdl) Selection aSel = m_pWritingEdit->GetSelection(); m_pWritingEdit->GrabFocus(); m_pWritingEdit->SetSelection(aSel); - return 0; } -IMPL_LINK_NOARG(SwLabPage, PageHdl) +IMPL_LINK_NOARG_TYPED(SwLabPage, PageHdl, Button*, void) { m_pMakeBox->GetSelectHdl().Call(m_pMakeBox); - return 0; } IMPL_LINK_NOARG(SwLabPage, MakeHdl) diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 0d21573cf127..12297627e5bb 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -566,7 +566,7 @@ void SwLabFormatPage::Reset(const SfxItemSet* ) PreviewHdl(0); } -IMPL_LINK_NOARG(SwLabFormatPage, SaveHdl) +IMPL_LINK_NOARG_TYPED(SwLabFormatPage, SaveHdl, Button*, void) { SwLabRec aRec; aRec.lHDist = static_cast< long >(GETFLDVAL(*m_pHDistField)); @@ -595,7 +595,6 @@ IMPL_LINK_NOARG(SwLabFormatPage, SaveHdl) m_pMakeFI->SetText(aItem.aMake); m_pTypeFI->SetText(aItem.aType); } - return 0; } SwSaveLabelDlg::SwSaveLabelDlg(SwLabFormatPage* pParent, SwLabRec& rRec) @@ -636,7 +635,7 @@ void SwSaveLabelDlg::dispose() ModalDialog::dispose(); } -IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl) +IMPL_LINK_NOARG_TYPED(SwSaveLabelDlg, OkHdl, Button*, void) { SwLabelConfig& rCfg = pLabPage->GetParentSwLabDlg()->GetLabelsConfig(); OUString sMake(m_pMakeCB->GetText()); @@ -647,7 +646,7 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl) { SAL_WARN( "sw.envelp", "label is predefined and cannot be overwritten" ); ScopedVclPtrInstance<MessageDialog>::Create(this, "CannotSaveLabelDialog", "modules/swriter/ui/cannotsavelabeldialog.ui")->Execute(); - return 0; + return; } ScopedVclPtrInstance<MessageDialog> aQuery(this, "QuerySaveLabelDialog", @@ -659,13 +658,12 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl) replaceAll("%1", sMake).replaceAll("%2", sType)); if (RET_YES != aQuery->Execute()) - return 0; + return; } rLabRec.aType = sType; rCfg.SaveLabel(sMake, sType, rLabRec); bSuccess = true; EndDialog(RET_OK); - return 0; } IMPL_LINK_NOARG(SwSaveLabelDlg, ModifyHdl) diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx index 34f205d89909..67ad694dfbda 100644 --- a/sw/source/ui/envelp/labfmt.hxx +++ b/sw/source/ui/envelp/labfmt.hxx @@ -90,7 +90,7 @@ class SwLabFormatPage : public SfxTabPage DECL_LINK(ModifyHdl, void *); DECL_LINK_TYPED(PreviewHdl, Idle *, void); DECL_LINK( LoseFocusHdl, Control * ); - DECL_LINK(SaveHdl, void *); + DECL_LINK_TYPED(SaveHdl, Button*, void); void ChangeMinMax(); @@ -123,7 +123,7 @@ class SwSaveLabelDlg : public ModalDialog VclPtr<SwLabFormatPage> pLabPage; SwLabRec& rLabRec; - DECL_LINK(OkHdl, void *); + DECL_LINK_TYPED(OkHdl, Button*, void); DECL_LINK(ModifyHdl, void *); public: diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx index 59e3e06ed453..cd4b1404fdc9 100644 --- a/sw/source/ui/envelp/labprt.cxx +++ b/sw/source/ui/envelp/labprt.cxx @@ -45,7 +45,7 @@ SwLabPrtPage::SwLabPrtPage(vcl::Window* pParent, const SfxItemSet& rSet) SetExchangeSupport(); // Install handlers - Link<> aLk = LINK(this, SwLabPrtPage, CountHdl); + Link<Button*,void> aLk = LINK(this, SwLabPrtPage, CountHdl); m_pPageButton->SetClickHdl( aLk ); m_pSingleButton->SetClickHdl( aLk ); @@ -80,7 +80,7 @@ void SwLabPrtPage::dispose() SfxTabPage::dispose(); } -IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton ) +IMPL_LINK_TYPED( SwLabPrtPage, CountHdl, Button *, pButton, void ) { if (pButton == m_pPrtSetup) { @@ -94,7 +94,7 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton ) pDlg.disposeAndClear(); GrabFocus(); m_pPrinterInfo->SetText(pPrinter->GetName()); - return 0; + return; } const bool bEnable = pButton == m_pSingleButton; m_pSingleGrid->Enable(bEnable); @@ -105,7 +105,6 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton ) { m_pColField->GrabFocus(); } - return 0; } VclPtr<SfxTabPage> SwLabPrtPage::Create(vcl::Window* pParent, const SfxItemSet* rSet) diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx index 45b5decffb5e..818273dc9f72 100644 --- a/sw/source/ui/envelp/labprt.hxx +++ b/sw/source/ui/envelp/labprt.hxx @@ -44,7 +44,7 @@ class SwLabPrtPage : public SfxTabPage VclPtr<FixedText> m_pPrinterInfo; VclPtr<PushButton> m_pPrtSetup; - DECL_LINK( CountHdl, Button * ); + DECL_LINK_TYPED( CountHdl, Button *, void ); SwLabDlg* GetParentSwLabDlg() {return static_cast<SwLabDlg*>(GetParentDialog());} diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 72e2cd7a1f18..ab90a22431ac 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -252,7 +252,7 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell, m_pAllRB->Check(); // Install handlers - Link<> aLk = LINK(this, SwMailMergeDlg, ButtonHdl); + Link<Button*,void> aLk = LINK(this, SwMailMergeDlg, ButtonHdl); m_pOkBTN->SetClickHdl(aLk); m_pPathPB->SetClickHdl(LINK(this, SwMailMergeDlg, InsertPathHdl)); @@ -279,9 +279,9 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell, m_pSaveIndividualRB->SetClickHdl( aLk ); aLk.Call( m_pSaveSingleDocRB ); - aLk = LINK(this, SwMailMergeDlg, ModifyHdl); - m_pFromNF->SetModifyHdl(aLk); - m_pToNF->SetModifyHdl(aLk); + Link<> aLk2 = LINK(this, SwMailMergeDlg, ModifyHdl); + m_pFromNF->SetModifyHdl(aLk2); + m_pToNF->SetModifyHdl(aLk2); m_pFromNF->SetMax(SAL_MAX_INT32); m_pToNF->SetMax(SAL_MAX_INT32); @@ -420,16 +420,15 @@ void SwMailMergeDlg::Apply() { } -IMPL_LINK( SwMailMergeDlg, ButtonHdl, Button *, pBtn ) +IMPL_LINK_TYPED( SwMailMergeDlg, ButtonHdl, Button *, pBtn, void ) { if (pBtn == m_pOkBTN) { if( ExecQryShell() ) EndDialog(RET_OK); } - return 0; } -IMPL_LINK( SwMailMergeDlg, OutputTypeHdl, RadioButton *, pBtn ) +IMPL_LINK_TYPED( SwMailMergeDlg, OutputTypeHdl, Button *, pBtn, void ) { bool bPrint = pBtn == m_pPrinterRB; m_pSingleJobsCB->Enable(bPrint); @@ -450,11 +449,9 @@ IMPL_LINK( SwMailMergeDlg, OutputTypeHdl, RadioButton *, pBtn ) m_pFilterLB->Enable(false); m_pGenerateFromDataBaseCB->Enable(false); } - - return 0; } -IMPL_LINK( SwMailMergeDlg, SaveTypeHdl, RadioButton*, pBtn ) +IMPL_LINK_TYPED( SwMailMergeDlg, SaveTypeHdl, Button*, pBtn, void ) { bool bIndividual = pBtn == m_pSaveIndividualRB; @@ -470,12 +467,11 @@ IMPL_LINK( SwMailMergeDlg, SaveTypeHdl, RadioButton*, pBtn ) m_pFilterFT->Enable( false ); m_pFilterLB->Enable( false ); } - return 0; } -IMPL_LINK( SwMailMergeDlg, FilenameHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED( SwMailMergeDlg, FilenameHdl, Button*, pBox, void ) { - bool bEnable = pBox->IsChecked(); + bool bEnable = static_cast<CheckBox*>(pBox)->IsChecked(); m_pColumnFT->Enable( bEnable ); m_pColumnLB->Enable(bEnable); m_pPathFT->Enable( bEnable ); @@ -483,7 +479,6 @@ IMPL_LINK( SwMailMergeDlg, FilenameHdl, CheckBox*, pBox ) m_pPathPB->Enable( bEnable ); m_pFilterFT->Enable( bEnable ); m_pFilterLB->Enable( bEnable ); - return 0; } IMPL_LINK_NOARG(SwMailMergeDlg, ModifyHdl) @@ -585,7 +580,7 @@ bool SwMailMergeDlg::ExecQryShell() return true; } -IMPL_LINK_NOARG(SwMailMergeDlg, InsertPathHdl) +IMPL_LINK_NOARG_TYPED(SwMailMergeDlg, InsertPathHdl, Button*, void) { OUString sPath( m_pPathED->GetText() ); if( sPath.isEmpty() ) { @@ -603,7 +598,6 @@ IMPL_LINK_NOARG(SwMailMergeDlg, InsertPathHdl) else m_pPathED->SetText(aURL.GetFull()); } - return 0; } uno::Reference<XResultSet> SwMailMergeDlg::GetResultSet() const diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx index 6e7ec2e62e5b..7306303ae422 100644 --- a/sw/source/ui/envelp/swuilabimp.hxx +++ b/sw/source/ui/envelp/swuilabimp.hxx @@ -47,10 +47,10 @@ class SwLabPage : public SfxTabPage bool m_bLabel; - DECL_LINK(AddrHdl, void *); - DECL_LINK( DatabaseHdl, ListBox * ); - DECL_LINK(FieldHdl, void *); - DECL_LINK(PageHdl, void *); + DECL_LINK_TYPED(AddrHdl, Button*, void); + DECL_LINK(DatabaseHdl, ListBox * ); + DECL_LINK_TYPED(FieldHdl, Button *, void); + DECL_LINK_TYPED(PageHdl, Button *, void); DECL_LINK(MakeHdl, void *); DECL_LINK(TypeHdl, void *); diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx index 6263190669aa..0886666bc541 100644 --- a/sw/source/ui/fldui/DropDownFieldDialog.cxx +++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx @@ -44,7 +44,7 @@ sw::DropDownFieldDialog::DropDownFieldDialog(vcl::Window *pParent, SwWrtShell &r get(m_pNextPB, "next"); get(m_pEditPB, "edit"); - Link<> aButtonLk = LINK(this, DropDownFieldDialog, ButtonHdl); + Link<Button*,void> aButtonLk = LINK(this, DropDownFieldDialog, ButtonHdl); m_pEditPB->SetClickHdl(aButtonLk); if( bNextButton ) { @@ -106,10 +106,9 @@ void sw::DropDownFieldDialog::Apply() } } -IMPL_LINK(sw::DropDownFieldDialog, ButtonHdl, PushButton*, pButton) +IMPL_LINK_TYPED(sw::DropDownFieldDialog, ButtonHdl, Button*, pButton, void) { EndDialog(m_pNextPB == pButton ? RET_OK : RET_YES ); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index a5f61470f534..0ab326297cfe 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -217,7 +217,7 @@ void SwChangeDBDlg::UpdateFields() pSh->EndAllAction(); } -IMPL_LINK_NOARG(SwChangeDBDlg, ButtonHdl) +IMPL_LINK_NOARG_TYPED(SwChangeDBDlg, ButtonHdl, Button*, void) { OUString sTableName; OUString sColumnName; @@ -229,8 +229,6 @@ IMPL_LINK_NOARG(SwChangeDBDlg, ButtonHdl) pSh->ChgDBData(aData); ShowDBName(pSh->GetDBData()); EndDialog(RET_OK); - - return 0; } IMPL_LINK_NOARG(SwChangeDBDlg, TreeSelectHdl) @@ -261,12 +259,11 @@ void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData) } } -IMPL_LINK_NOARG(SwChangeDBDlg, AddDBHdl) +IMPL_LINK_NOARG_TYPED(SwChangeDBDlg, AddDBHdl, Button*, void) { const OUString sNewDB = SwDBManager::LoadAndRegisterDataSource(); if (!sNewDB.isEmpty()) m_pAvailDBTLB->AddDataSource(sNewDB); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index 96ceb81cd274..f433a5e414ff 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -475,14 +475,13 @@ IMPL_LINK( SwFieldDBPage, TreeSelectHdl, SvTreeListBox *, pBox ) return 0; } -IMPL_LINK_NOARG(SwFieldDBPage, AddDBHdl) +IMPL_LINK_NOARG_TYPED(SwFieldDBPage, AddDBHdl, Button*, void) { OUString sNewDB = SwDBManager::LoadAndRegisterDataSource(); if(!sNewDB.isEmpty()) { m_pDatabaseTLB->AddDataSource(sNewDB); } - return 0; } // Modify diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx index 220d531d8b2d..b663cc4956ad 100644 --- a/sw/source/ui/fldui/flddb.hxx +++ b/sw/source/ui/fldui/flddb.hxx @@ -58,7 +58,7 @@ class SwFieldDBPage : public SwFieldPage DECL_LINK( NumSelectHdl, NumFormatListBox* ); DECL_LINK( TreeSelectHdl, SvTreeListBox* ); DECL_LINK(ModifyHdl, void *); - DECL_LINK(AddDBHdl, void *); + DECL_LINK_TYPED(AddDBHdl, Button*, void); void CheckInsert(); diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index e95edece3efc..91c2dcc4b272 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -240,7 +240,7 @@ void SwFieldEditDlg::InsertHdl() } // kick off changing of the field -IMPL_LINK_NOARG(SwFieldEditDlg, OKHdl) +IMPL_LINK_NOARG_TYPED(SwFieldEditDlg, OKHdl, Button*, void) { if (GetOKButton()->IsEnabled()) { @@ -249,8 +249,6 @@ IMPL_LINK_NOARG(SwFieldEditDlg, OKHdl) pTabPage->FillItemSet(0); EndDialog( RET_OK ); } - - return 0; } short SwFieldEditDlg::Execute() @@ -260,7 +258,7 @@ short SwFieldEditDlg::Execute() } // Traveling between fields of the same type -IMPL_LINK( SwFieldEditDlg, NextPrevHdl, Button *, pButton ) +IMPL_LINK_TYPED( SwFieldEditDlg, NextPrevHdl, Button *, pButton, void ) { bool bNext = pButton == m_pNextBT; @@ -292,11 +290,9 @@ IMPL_LINK( SwFieldEditDlg, NextPrevHdl, Button *, pButton ) pTabPage->EditNewField(); Init(); - - return 0; } -IMPL_LINK_NOARG(SwFieldEditDlg, AddressHdl) +IMPL_LINK_NOARG_TYPED(SwFieldEditDlg, AddressHdl, Button*, void) { SwFieldPage* pTabPage = static_cast<SwFieldPage*>(GetTabPage()); SwFieldMgr& rMgr = pTabPage->GetFieldMgr(); @@ -341,7 +337,6 @@ IMPL_LINK_NOARG(SwFieldEditDlg, AddressHdl) { pSh->UpdateFields( *pCurField ); } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index dd4e8e64ce2f..f028af35d3b4 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -168,12 +168,12 @@ void SwFieldFuncPage::Reset(const SfxItemSet* ) m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, InsertMacroHdl)); m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFieldFuncPage, InsertHdl)); m_pMacroBT->SetClickHdl (LINK(this, SwFieldFuncPage, MacroHdl)); - Link<> aListModifyLk( LINK(this, SwFieldFuncPage, ListModifyHdl)); + Link<Button*,void> aListModifyLk( LINK(this, SwFieldFuncPage, ListModifyHdl)); m_pListAddPB->SetClickHdl(aListModifyLk); m_pListRemovePB->SetClickHdl(aListModifyLk); m_pListUpPB->SetClickHdl(aListModifyLk); m_pListDownPB->SetClickHdl(aListModifyLk); - m_pListItemED->SetReturnActionLink(aListModifyLk); + m_pListItemED->SetReturnActionLink(LINK(this, SwFieldFuncPage, ListModifyReturnActionHdl)); Link<> aListEnableLk = LINK(this, SwFieldFuncPage, ListEnableHdl); m_pListItemED->SetModifyHdl(aListEnableLk); m_pListItemsLB->SetSelectHdl(aListEnableLk); @@ -417,13 +417,17 @@ IMPL_LINK_NOARG(SwFieldFuncPage, SelectHdl) IMPL_LINK_NOARG(SwFieldFuncPage, InsertMacroHdl) { - SelectHdl(); + SelectHdl(NULL); InsertHdl(); return 0; } -IMPL_LINK( SwFieldFuncPage, ListModifyHdl, Control*, pControl) +IMPL_LINK_TYPED( SwFieldFuncPage, ListModifyHdl, Button*, pControl, void) +{ + ListModifyReturnActionHdl(pControl); +} +IMPL_LINK( SwFieldFuncPage, ListModifyReturnActionHdl, Control*, pControl) { m_pListItemsLB->SetUpdateMode(false); if(pControl == m_pListAddPB || @@ -528,7 +532,7 @@ void SwFieldFuncPage::UpdateSubType() } // call MacroBrowser, fill Listbox with Macros -IMPL_LINK( SwFieldFuncPage, MacroHdl, Button *, pBtn ) +IMPL_LINK_TYPED( SwFieldFuncPage, MacroHdl, Button *, pBtn, void ) { vcl::Window* pDefModalDlgParent = Application::GetDefDialogParent(); Application::SetDefDialogParent( pBtn ); @@ -537,8 +541,6 @@ IMPL_LINK( SwFieldFuncPage, MacroHdl, Button *, pBtn ) UpdateSubType(); Application::SetDefDialogParent( pDefModalDlgParent ); - - return 0; } bool SwFieldFuncPage::FillItemSet(SfxItemSet* ) @@ -599,7 +601,7 @@ bool SwFieldFuncPage::FillItemSet(SfxItemSet* ) InsertField( nTypeId, nSubType, aName, aVal, nFormat ); } - ModifyHdl(); // enable/disable Insert if applicable + ModifyHdl(NULL); // enable/disable Insert if applicable return false; } diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx index 468f5fdf0bd8..bedaaa51c2f1 100644 --- a/sw/source/ui/fldui/fldfunc.hxx +++ b/sw/source/ui/fldui/fldfunc.hxx @@ -67,14 +67,15 @@ class SwFieldFuncPage : public SwFieldPage bool bDropDownLBChanged; DECL_LINK(TypeHdl, void *); - DECL_LINK(SelectHdl, void * = 0); + DECL_LINK(SelectHdl, void *); DECL_LINK(InsertMacroHdl, void *); - DECL_LINK(ModifyHdl, void * = 0); - DECL_LINK( ListModifyHdl, Control*); + DECL_LINK(ModifyHdl, void *); + DECL_LINK(ListModifyReturnActionHdl, Control *); + DECL_LINK_TYPED( ListModifyHdl, Button*, void); DECL_LINK( ListEnableHdl, void*); // select Macro - DECL_LINK( MacroHdl, Button * ); + DECL_LINK_TYPED( MacroHdl, Button *, void ); void UpdateSubType(); static OUString TurnMacroString(const OUString &rMacro); diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 06ddf5f9a973..87d9b1cb2157 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -180,7 +180,7 @@ SfxItemSet* SwFieldDlg::CreateInputItemSet( sal_uInt16 nID ) } // kick off inserting of new fields -IMPL_LINK_NOARG(SwFieldDlg, OKHdl) +IMPL_LINK_NOARG_TYPED(SwFieldDlg, OKHdl, Button*, void) { if (GetOKButton().IsEnabled()) { @@ -189,14 +189,11 @@ IMPL_LINK_NOARG(SwFieldDlg, OKHdl) GetOKButton().GrabFocus(); // because of InputField-Dlg } - - return 0; } -IMPL_LINK_NOARG(SwFieldDlg, CancelHdl) +IMPL_LINK_NOARG_TYPED(SwFieldDlg, CancelHdl, Button*, void) { Close(); - return 0; } // newly initialise dialog after Doc-Switch diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index c225195c8029..c261f584830a 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -164,10 +164,9 @@ void SwFieldInputDlg::Apply() rSh.EndAllAction(); } -IMPL_LINK_NOARG(SwFieldInputDlg, NextHdl) +IMPL_LINK_NOARG_TYPED(SwFieldInputDlg, NextHdl, Button*, void) { EndDialog(RET_OK); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index c193ba567edf..ef953516cedd 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -64,7 +64,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) : m_pNextBtn->SetClickHdl( LINK( this, SwJavaEditDialog, NextHdl ) ); m_pOKBtn->SetClickHdl( LINK( this, SwJavaEditDialog, OKHdl ) ); - Link<> aLk = LINK(this, SwJavaEditDialog, RadioButtonHdl); + Link<Button*,void> aLk = LINK(this, SwJavaEditDialog, RadioButtonHdl); m_pUrlRB->SetClickHdl(aLk); m_pEditRB->SetClickHdl(aLk); m_pUrlPB->SetClickHdl(LINK(this, SwJavaEditDialog, InsertFileHdl)); @@ -110,7 +110,7 @@ void SwJavaEditDialog::dispose() SvxStandardDialog::dispose(); } -IMPL_LINK_NOARG(SwJavaEditDialog, PrevHdl) +IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, PrevHdl, Button*, void) { pSh->EnterStdMode(); @@ -119,11 +119,9 @@ IMPL_LINK_NOARG(SwJavaEditDialog, PrevHdl) pField = static_cast<SwScriptField*>(pMgr->GetCurField()); CheckTravel(); RadioButtonHdl(NULL); - - return 0; } -IMPL_LINK_NOARG(SwJavaEditDialog, NextHdl) +IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, NextHdl, Button*, void) { pSh->EnterStdMode(); @@ -132,15 +130,12 @@ IMPL_LINK_NOARG(SwJavaEditDialog, NextHdl) pField = static_cast<SwScriptField*>(pMgr->GetCurField()); CheckTravel(); RadioButtonHdl(NULL); - - return 0; } -IMPL_LINK_NOARG(SwJavaEditDialog, OKHdl) +IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, OKHdl, Button*, void) { SetField(); EndDialog( RET_OK ); - return 0; } void SwJavaEditDialog::Apply() @@ -237,7 +232,7 @@ bool SwJavaEditDialog::IsUpdate() const return pField && ( sal_uInt32(bIsUrl ? 1 : 0) != pField->GetFormat() || pField->GetPar2() != aType || pField->GetPar1() != aText ); } -IMPL_LINK_NOARG(SwJavaEditDialog, RadioButtonHdl) +IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, RadioButtonHdl, Button*, void) { bool bEnable = m_pUrlRB->IsChecked(); m_pUrlPB->Enable(bEnable); @@ -254,10 +249,9 @@ IMPL_LINK_NOARG(SwJavaEditDialog, RadioButtonHdl) if( m_pUrlPB->IsEnabled() && !bEnable ) m_pUrlPB->Enable( false ); } - return 0; } -IMPL_LINK( SwJavaEditDialog, InsertFileHdl, PushButton *, pBtn ) +IMPL_LINK_TYPED( SwJavaEditDialog, InsertFileHdl, Button *, pBtn, void ) { if ( !pFileDlg ) { @@ -270,7 +264,6 @@ IMPL_LINK( SwJavaEditDialog, InsertFileHdl, PushButton *, pBtn ) } pFileDlg->StartExecuteModal( LINK( this, SwJavaEditDialog, DlgClosedHdl ) ); - return 0; } IMPL_LINK_NOARG_TYPED(SwJavaEditDialog, DlgClosedHdl, sfx2::FileDialogHelper *, void) diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 8dadbbafcf74..afc851598507 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -293,7 +293,7 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox) return 0; } -IMPL_LINK_NOARG(SwColumnDlg, OkHdl) +IMPL_LINK_NOARG_TYPED(SwColumnDlg, OkHdl, Button*, void) { // evaluate current selection SfxItemSet* pSet = 0; @@ -371,7 +371,6 @@ IMPL_LINK_NOARG(SwColumnDlg, OkHdl) rWrtShell.EndAction(); } EndDialog(RET_OK); - return 0; } #if OSL_DEBUG_LEVEL < 2 @@ -1076,8 +1075,9 @@ IMPL_LINK( SwColumnPage, EdModify, MetricField *, pMetricField ) // Handler behind the Checkbox for automatic width. When the box is checked // no expicit values for the column width can be entered. -IMPL_LINK( SwColumnPage, AutoWidthHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( SwColumnPage, AutoWidthHdl, Button*, pButton, void ) { + CheckBox* pBox = static_cast<CheckBox*>(pButton); long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP))); pColMgr->SetCount(nCols, (sal_uInt16)nDist); for(sal_uInt16 i = 0; i < nCols; i++) @@ -1090,11 +1090,10 @@ IMPL_LINK( SwColumnPage, AutoWidthHdl, CheckBox *, pBox ) pColMgr->SetAutoWidth(pBox->IsChecked(), sal_uInt16(nDist)); UpdateCols(); Update(NULL); - return 0; } // scroll up the contents of the edits -IMPL_LINK_NOARG(SwColumnPage, Up) +IMPL_LINK_NOARG_TYPED(SwColumnPage, Up, Button*, void) { if( nFirstVis ) { @@ -1102,11 +1101,10 @@ IMPL_LINK_NOARG(SwColumnPage, Up) SetLabels( nFirstVis ); Update(NULL); } - return 0; } // scroll down the contents of the edits. -IMPL_LINK_NOARG(SwColumnPage, Down) +IMPL_LINK_NOARG_TYPED(SwColumnPage, Down, Button*, void) { if( nFirstVis + nVisCols < nCols ) { @@ -1114,7 +1112,6 @@ IMPL_LINK_NOARG(SwColumnPage, Down) SetLabels( nFirstVis ); Update(NULL); } - return 0; } // relict from ancient times - now directly without time handler; triggered by diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 76eba6969af3..d68c0b6c9d1d 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -280,7 +280,7 @@ void SwCaptionDialog::Apply() our_aSepTextSave = m_pSepEdit->GetText(); } -IMPL_LINK( SwCaptionDialog, OptionHdl, Button*, pButton ) +IMPL_LINK_TYPED( SwCaptionDialog, OptionHdl, Button*, pButton, void ) { OUString sFieldTypeName = m_pCategoryBox->GetText(); if(sFieldTypeName == m_sNone) @@ -300,7 +300,6 @@ IMPL_LINK( SwCaptionDialog, OptionHdl, Button*, pButton ) ApplyCaptionOrder(); } DrawSample(); - return 0; } IMPL_LINK_NOARG(SwCaptionDialog, SelectHdl) @@ -334,13 +333,11 @@ IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl) return 0; } -IMPL_LINK_NOARG(SwCaptionDialog, CaptionHdl) +IMPL_LINK_NOARG_TYPED(SwCaptionDialog, CaptionHdl, Button*, void) { SfxItemSet aSet( rView.GetDocShell()->GetDoc()->GetAttrPool() ); ScopedVclPtrInstance< SwCaptionOptDlg > aDlg( this, aSet ); aDlg->Execute(); - - return 0; } void SwCaptionDialog::DrawSample() diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index a6ac4ab1aebf..582537cd6638 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -682,7 +682,7 @@ SwFrmPage::SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet) m_aHeightED.SetLoseFocusHdl( aLk ); m_pAtHorzPosED->SetLoseFocusHdl( aLk ); m_pAtVertPosED->SetLoseFocusHdl( aLk ); - m_pFollowTextFlowCB->SetClickHdl( aLk ); + m_pFollowTextFlowCB->SetClickHdl( LINK(this, SwFrmPage, RangeModifyClickHdl) ); aLk = LINK(this, SwFrmPage, ModifyHdl); m_aWidthED.SetModifyHdl( aLk ); @@ -690,12 +690,12 @@ SwFrmPage::SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet) m_pAtHorzPosED->SetModifyHdl( aLk ); m_pAtVertPosED->SetModifyHdl( aLk ); - aLk = LINK(this, SwFrmPage, AnchorTypeHdl); - m_pAnchorAtPageRB->SetClickHdl( aLk ); - m_pAnchorAtParaRB->SetClickHdl( aLk ); - m_pAnchorAtCharRB->SetClickHdl( aLk ); - m_pAnchorAsCharRB->SetClickHdl( aLk ); - m_pAnchorAtFrameRB->SetClickHdl( aLk ); + Link<Button*,void> aLk2 = LINK(this, SwFrmPage, AnchorTypeHdl); + m_pAnchorAtPageRB->SetClickHdl( aLk2 ); + m_pAnchorAtParaRB->SetClickHdl( aLk2 ); + m_pAnchorAtCharRB->SetClickHdl( aLk2 ); + m_pAnchorAsCharRB->SetClickHdl( aLk2 ); + m_pAnchorAtFrameRB->SetClickHdl( aLk2 ); m_pHorizontalDLB->SetSelectHdl(LINK(this, SwFrmPage, PosHdl)); m_pVerticalDLB-> SetSelectHdl(LINK(this, SwFrmPage, PosHdl)); @@ -705,9 +705,9 @@ SwFrmPage::SwFrmPage(vcl::Window *pParent, const SfxItemSet &rSet) m_pMirrorPagesCB->SetClickHdl(LINK(this, SwFrmPage, MirrorHdl)); - aLk = LINK(this, SwFrmPage, RelSizeClickHdl); - m_pRelWidthCB->SetClickHdl( aLk ); - m_pRelHeightCB->SetClickHdl( aLk ); + aLk2 = LINK(this, SwFrmPage, RelSizeClickHdl); + m_pRelWidthCB->SetClickHdl( aLk2 ); + m_pRelHeightCB->SetClickHdl( aLk2 ); m_pAutoWidthCB->SetClickHdl( LINK( this, SwFrmPage, AutoWidthClickHdl ) ); m_pAutoHeightCB->SetClickHdl( LINK( this, SwFrmPage, AutoHeightClickHdl ) ); @@ -1761,16 +1761,15 @@ SfxTabPage::sfxpg SwFrmPage::DeactivatePage(SfxItemSet * _pSet) } // swap left/right with inside/outside -IMPL_LINK_NOARG(SwFrmPage, MirrorHdl) +IMPL_LINK_NOARG_TYPED(SwFrmPage, MirrorHdl, Button*, void) { RndStdIds eId = GetAnchor(); InitPos( eId, -1, 0, -1, 0, LONG_MAX, LONG_MAX); - - return 0; } -IMPL_LINK( SwFrmPage, RelSizeClickHdl, CheckBox *, pBtn ) +IMPL_LINK_TYPED( SwFrmPage, RelSizeClickHdl, Button *, p, void ) { + CheckBox* pBtn = static_cast<CheckBox*>(p); if (pBtn == m_pRelWidthCB) { m_aWidthED.ShowPercent(pBtn->IsChecked()); @@ -1792,11 +1791,13 @@ IMPL_LINK( SwFrmPage, RelSizeClickHdl, CheckBox *, pBtn ) ModifyHdl(m_aWidthED.get()); else // pBtn == m_pRelHeightCB ModifyHdl(m_aHeightED.get()); - - return 0; } // range check +IMPL_LINK_NOARG_TYPED(SwFrmPage, RangeModifyClickHdl, Button*, void) +{ + RangeModifyHdl(NULL); +} IMPL_LINK_NOARG(SwFrmPage, RangeModifyHdl) { if (bNoModifyHdl) @@ -1918,7 +1919,7 @@ IMPL_LINK_NOARG(SwFrmPage, RangeModifyHdl) return 0; } -IMPL_LINK_NOARG(SwFrmPage, AnchorTypeHdl) +IMPL_LINK_NOARG_TYPED(SwFrmPage, AnchorTypeHdl, Button*, void) { m_pMirrorPagesCB->Enable(!m_pAnchorAsCharRB->IsChecked()); @@ -1943,8 +1944,6 @@ IMPL_LINK_NOARG(SwFrmPage, AnchorTypeHdl) EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment && FLY_AS_CHAR == eId) ); - - return 0; } IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) @@ -2082,27 +2081,24 @@ IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB ) return 0; } -IMPL_LINK_NOARG(SwFrmPage, RealSizeHdl) +IMPL_LINK_NOARG_TYPED(SwFrmPage, RealSizeHdl, Button*, void) { m_aWidthED.SetUserValue( m_aWidthED. NormalizePercent(aGrfSize.Width() ), FUNIT_TWIP); m_aHeightED.SetUserValue(m_aHeightED.NormalizePercent(aGrfSize.Height()), FUNIT_TWIP); fWidthHeightRatio = aGrfSize.Height() ? double(aGrfSize.Width()) / double(aGrfSize.Height()) : 1.0; UpdateExample(); - return 0; } -IMPL_LINK_NOARG(SwFrmPage, AutoWidthClickHdl) +IMPL_LINK_NOARG_TYPED(SwFrmPage, AutoWidthClickHdl, Button*, void) { if( !IsInGraficMode() ) HandleAutoCB( m_pAutoWidthCB->IsChecked(), *m_pWidthFT, *m_pWidthAutoFT, *m_aWidthED.get() ); - return 0; } -IMPL_LINK_NOARG(SwFrmPage, AutoHeightClickHdl) +IMPL_LINK_NOARG_TYPED(SwFrmPage, AutoHeightClickHdl, Button*, void) { if( !IsInGraficMode() ) HandleAutoCB( m_pAutoHeightCB->IsChecked(), *m_pHeightFT, *m_pHeightAutoFT, *m_aWidthED.get() ); - return 0; } IMPL_LINK( SwFrmPage, ModifyHdl, Edit *, pEdit ) @@ -2576,7 +2572,7 @@ SfxTabPage::sfxpg SwGrfExtPage::DeactivatePage(SfxItemSet *_pSet) return LEAVE_PAGE; } -IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl) +IMPL_LINK_NOARG_TYPED(SwGrfExtPage, BrowseHdl, Button*, void) { if(!pGrfDlg) { @@ -2619,10 +2615,9 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl) m_pLeftPagesRB->Enable(bEnable); m_pRightPagesRB->Enable(bEnable); } - return 0; } -IMPL_LINK_NOARG(SwGrfExtPage, MirrorHdl) +IMPL_LINK_NOARG_TYPED(SwGrfExtPage, MirrorHdl, Button*, void) { bool bEnable = m_pMirrorHorzBox->IsChecked(); @@ -2635,8 +2630,6 @@ IMPL_LINK_NOARG(SwGrfExtPage, MirrorHdl) if (!m_pAllPagesRB->IsChecked() && !m_pLeftPagesRB->IsChecked() && !m_pRightPagesRB->IsChecked()) m_pAllPagesRB->Check(); - - return 0; } // example window @@ -2851,7 +2844,7 @@ VclPtr<SfxTabPage> SwFrmURLPage::Create(vcl::Window *pParent, const SfxItemSet * return VclPtr<SwFrmURLPage>::Create( pParent, *rSet ); } -IMPL_LINK_NOARG(SwFrmURLPage, InsertFileHdl) +IMPL_LINK_NOARG_TYPED(SwFrmURLPage, InsertFileHdl, Button*, void) { FileDialogHelper aDlgHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); uno::Reference < ui::dialogs::XFilePicker > xFP = aDlgHelper.GetFilePicker(); @@ -2870,8 +2863,6 @@ IMPL_LINK_NOARG(SwFrmURLPage, InsertFileHdl) { pURLED->SetText( xFP->getFiles().getConstArray()[0] ); } - - return 0; } SwFrmAddPage::SwFrmAddPage(vcl::Window *pParent, const SfxItemSet &rSet) diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index c7574f6cef03..d5f83eecfa9a 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -120,13 +120,13 @@ SwWrapTabPage::SwWrapTabPage(vcl::Window *pParent, const SfxItemSet &rSet) m_pBottomMarginED->SetLastHdl(aLk); m_pBottomMarginED->SetLoseFocusHdl(aLk); - aLk = LINK(this, SwWrapTabPage, WrapTypeHdl); - m_pNoWrapRB->SetClickHdl(aLk); - m_pWrapLeftRB->SetClickHdl(aLk); - m_pWrapRightRB->SetClickHdl(aLk); - m_pWrapParallelRB->SetClickHdl(aLk); - m_pWrapThroughRB->SetClickHdl(aLk); - m_pIdealWrapRB->SetClickHdl(aLk); + Link<Button*,void> aLk2 = LINK(this, SwWrapTabPage, WrapTypeHdl); + m_pNoWrapRB->SetClickHdl(aLk2); + m_pWrapLeftRB->SetClickHdl(aLk2); + m_pWrapRightRB->SetClickHdl(aLk2); + m_pWrapParallelRB->SetClickHdl(aLk2); + m_pWrapThroughRB->SetClickHdl(aLk2); + m_pIdealWrapRB->SetClickHdl(aLk2); ApplyImageList(); m_pWrapOutlineCB->SetClickHdl(LINK(this, SwWrapTabPage, ContourHdl)); } @@ -612,7 +612,7 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit ) return 0; } -IMPL_LINK( SwWrapTabPage, WrapTypeHdl, RadioButton *, pBtn ) +IMPL_LINK_TYPED( SwWrapTabPage, WrapTypeHdl, Button *, pBtn, void ) { bool bWrapThrough = (pBtn == m_pWrapThroughRB); m_pWrapTransparentCB->Enable( bWrapThrough && !m_bHtmlMode ); @@ -624,10 +624,9 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, RadioButton *, pBtn ) (pBtn != m_pNoWrapRB) ); ContourHdl(0); - return 0; } -IMPL_LINK_NOARG(SwWrapTabPage, ContourHdl) +IMPL_LINK_NOARG_TYPED(SwWrapTabPage, ContourHdl, Button*, void) { bool bEnable = !(m_pWrapOutlineCB->IsChecked() && m_pWrapOutlineCB->IsEnabled()); @@ -639,8 +638,6 @@ IMPL_LINK_NOARG(SwWrapTabPage, ContourHdl) m_bContourImage = !bEnable; ApplyImageList(); } - - return 0; } void SwWrapTabPage::DataChanged( const DataChangedEvent& rDCEvt ) diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 76bbb9d8562f..e27d2d9a1b09 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -196,7 +196,7 @@ class SwAutoMarkDlg_Impl : public ModalDialog bool bCreateMode; - DECL_LINK(OkHdl, void *); + DECL_LINK_TYPED(OkHdl, Button*, void); public: SwAutoMarkDlg_Impl(vcl::Window* pParent, const OUString& rAutoMarkURL, bool bCreate); @@ -473,7 +473,7 @@ SwTOXDescription* SwMultiTOXTabDialog::CreateTOXDescFromTOXBase( return pDesc; } -IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl ) +IMPL_LINK_NOARG_TYPED( SwMultiTOXTabDialog, ShowPreviewHdl, Button*, void ) { if(m_pShowExampleCB->IsChecked()) { @@ -514,8 +514,6 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl ) SetViewWindow( bSetViewWindow ? m_pExampleContainerWIN.get() : 0 ); setOptimalLayoutSize(); - - return 0; } bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell& rSh, const OUString& rName) @@ -636,8 +634,8 @@ class SwAddStylesDlg_Impl : public SfxModalDialog OUString* pStyleArr; - DECL_LINK(OkHdl, void *); - DECL_LINK(LeftRightHdl, PushButton*); + DECL_LINK_TYPED(OkHdl, Button*, void); + DECL_LINK_TYPED(LeftRightHdl, Button*, void); DECL_LINK(HeaderDragHdl, void *); public: @@ -730,7 +728,7 @@ void SwAddStylesDlg_Impl::dispose() SfxModalDialog::dispose(); } -IMPL_LINK_NOARG(SwAddStylesDlg_Impl, OkHdl) +IMPL_LINK_NOARG_TYPED(SwAddStylesDlg_Impl, OkHdl, Button*, void) { for(sal_uInt16 i = 0; i < MAXLEVEL; i++) pStyleArr[i].clear(); @@ -750,7 +748,6 @@ IMPL_LINK_NOARG(SwAddStylesDlg_Impl, OkHdl) //TODO write back style names EndDialog(RET_OK); - return 0; } IMPL_LINK_NOARG(SwAddStylesDlg_Impl, HeaderDragHdl) @@ -759,7 +756,7 @@ IMPL_LINK_NOARG(SwAddStylesDlg_Impl, HeaderDragHdl) return 0; } -IMPL_LINK(SwAddStylesDlg_Impl, LeftRightHdl, PushButton*, pBtn) +IMPL_LINK_TYPED(SwAddStylesDlg_Impl, LeftRightHdl, Button*, pBtn, void) { bool bLeft = pBtn == m_pLeftPB; SvTreeListEntry* pEntry = m_pHeaderTree->FirstSelected(); @@ -783,7 +780,6 @@ IMPL_LINK(SwAddStylesDlg_Impl, LeftRightHdl, PushButton*, pBtn) pEntry->SetUserData(reinterpret_cast<void*>(nLevel)); m_pHeaderTree->Invalidate(); } - return 0; } SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet) @@ -874,7 +870,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r pMenu->SetActivateHdl(LINK(this, SwTOXSelectTabPage, MenuEnableHdl)); pMenu->SetSelectHdl(LINK(this, SwTOXSelectTabPage, MenuExecuteHdl)); - Link<> aLk = LINK(this, SwTOXSelectTabPage, CheckBoxHdl); + Link<Button*,void> aLk = LINK(this, SwTOXSelectTabPage, CheckBoxHdl); m_pAddStylesCB->SetClickHdl(aLk); m_pFromHeadingsCB->SetClickHdl(aLk); m_pTOXMarksCB->SetClickHdl(aLk); @@ -1395,8 +1391,9 @@ IMPL_LINK_NOARG(SwTOXSelectTabPage, ModifyHdl) return 0; } -IMPL_LINK(SwTOXSelectTabPage, CheckBoxHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED(SwTOXSelectTabPage, CheckBoxHdl, Button*, pButton, void ) { + CheckBox* pBox = static_cast<CheckBox*>(pButton); SwMultiTOXTabDialog* pTOXDlg = static_cast<SwMultiTOXTabDialog*>(GetTabDialog()); const CurTOXType aCurType = pTOXDlg->GetCurrentTOXType(); if(TOX_CONTENT == aCurType.eType) @@ -1421,10 +1418,9 @@ IMPL_LINK(SwTOXSelectTabPage, CheckBoxHdl, CheckBox*, pBox ) m_pCaseSensitiveCB->Enable(m_pCollectSameCB->IsChecked()); } ModifyHdl(0); - return 0; }; -IMPL_LINK_NOARG(SwTOXSelectTabPage, RadioButtonHdl) +IMPL_LINK_NOARG_TYPED(SwTOXSelectTabPage, RadioButtonHdl, Button*, void) { bool bEnable = m_pFromCaptionsRB->IsChecked(); m_pCaptionSequenceFT->Enable(bEnable); @@ -1432,7 +1428,6 @@ IMPL_LINK_NOARG(SwTOXSelectTabPage, RadioButtonHdl) m_pDisplayTypeFT->Enable(bEnable); m_pDisplayTypeLB->Enable(bEnable); ModifyHdl(0); - return 0; } IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox) @@ -1475,7 +1470,7 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox) return 0; }; -IMPL_LINK(SwTOXSelectTabPage, AddStylesHdl, PushButton*, pButton) +IMPL_LINK_TYPED(SwTOXSelectTabPage, AddStylesHdl, Button*, pButton, void) { ScopedVclPtrInstance<SwAddStylesDlg_Impl> pDlg( pButton, static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(), @@ -1483,7 +1478,6 @@ IMPL_LINK(SwTOXSelectTabPage, AddStylesHdl, PushButton*, pButton) pDlg->Execute(); pDlg.disposeAndClear(); ModifyHdl(0); - return 0; } IMPL_LINK_TYPED(SwTOXSelectTabPage, MenuEnableHdl, Menu*, pMenu, bool) @@ -1910,9 +1904,9 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(vcl::Window* pParent, const SfxItemSet& rAt m_pSortContentRB->SetClickHdl(LINK(this, SwTOXEntryTabPage, SortKeyHdl)); m_pAllLevelsPB->SetClickHdl(LINK(this, SwTOXEntryTabPage, AllLevelsHdl)); - m_pAlphaDelimCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); - m_pCommaSeparatedCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); - m_pRelToStyleCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl)); + m_pAlphaDelimCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyClickHdl)); + m_pCommaSeparatedCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyClickHdl)); + m_pRelToStyleCB->SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyClickHdl)); FieldUnit aMetric = ::GetDfltMetric(false); SetMetric(*m_pTabPosMF, aMetric); @@ -2013,6 +2007,10 @@ void SwTOXEntryTabPage::dispose() // pVoid is used as signal to change all levels of the example +IMPL_LINK_TYPED(SwTOXEntryTabPage, ModifyClickHdl, Button*, pVoid, void) +{ + ModifyHdl(pVoid); +} IMPL_LINK(SwTOXEntryTabPage, ModifyHdl, void*, pVoid) { UpdateDescriptor(); @@ -2214,7 +2212,7 @@ VclPtr<SfxTabPage> SwTOXEntryTabPage::Create( vcl::Window* pParent, const Sf return VclPtr<SwTOXEntryTabPage>::Create(pParent, *rAttrSet); } -IMPL_LINK(SwTOXEntryTabPage, EditStyleHdl, PushButton*, pBtn) +IMPL_LINK_TYPED(SwTOXEntryTabPage, EditStyleHdl, Button*, pBtn, void) { if( LISTBOX_ENTRY_NOTFOUND != m_pCharStyleLB->GetSelectEntryPos()) { @@ -2228,10 +2226,9 @@ IMPL_LINK(SwTOXEntryTabPage, EditStyleHdl, PushButton*, pBtn) &aStyle, &aFamily, 0L); Application::SetDefDialogParent( pDefDlgParent ); } - return 0; } -IMPL_LINK(SwTOXEntryTabPage, RemoveInsertAuthHdl, PushButton*, pButton) +IMPL_LINK_TYPED(SwTOXEntryTabPage, RemoveInsertAuthHdl, Button*, pButton, void) { bool bInsert = pButton == m_pAuthInsertPB; if(bInsert) @@ -2257,7 +2254,6 @@ IMPL_LINK(SwTOXEntryTabPage, RemoveInsertAuthHdl, PushButton*, pButton) } } ModifyHdl(0); - return 0; } void SwTOXEntryTabPage::PreTokenButtonRemoved(const SwFormToken& rToken) @@ -2294,7 +2290,7 @@ bool SwTOXEntryTabPage::Notify( NotifyEvent& rNEvt ) // This function initializes the default value in the Token // put here the UI dependent initializations -IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn) +IMPL_LINK_TYPED(SwTOXEntryTabPage, InsertTokenHdl, Button*, pBtn, void) { OUString sText; FormTokenType eTokenType = TOKEN_ENTRY_NO; @@ -2346,10 +2342,9 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn) aInsert.nChapterFormat = nChapterFormat; // i89791 m_pTokenWIN->InsertAtSelection(sText, aInsert); ModifyHdl(0); - return 0; } -IMPL_LINK_NOARG(SwTOXEntryTabPage, AllLevelsHdl) +IMPL_LINK_NOARG_TYPED(SwTOXEntryTabPage, AllLevelsHdl, Button*, void) { //get current level //write it into all levels @@ -2361,7 +2356,6 @@ IMPL_LINK_NOARG(SwTOXEntryTabPage, AllLevelsHdl) ModifyHdl(this); } - return 0; } void SwTOXEntryTabPage::WriteBackLevel() @@ -2419,11 +2413,10 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, pBox) return 0; } -IMPL_LINK(SwTOXEntryTabPage, SortKeyHdl, RadioButton*, pButton) +IMPL_LINK_TYPED(SwTOXEntryTabPage, SortKeyHdl, Button*, pButton, void) { bool bEnable = m_pSortContentRB == pButton; m_pSortKeyFrame->Enable(bEnable); - return 0; } IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken) @@ -2642,7 +2635,7 @@ IMPL_LINK(SwTOXEntryTabPage, FillCharHdl, ComboBox*, pBox) return 0; } -IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox) +IMPL_LINK_TYPED(SwTOXEntryTabPage, AutoRightHdl, Button*, pBox, void) { //the most right style::TabStop is usually right aligned Control* pCurCtrl = m_pTokenWIN->GetActiveControl(); @@ -2651,14 +2644,13 @@ IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox) "no style::TabStop selected!"); const SwFormToken& rToken = static_cast<SwTOXButton*>(pCurCtrl)->GetFormToken(); - bool bChecked = pBox->IsChecked(); + bool bChecked = static_cast<CheckBox*>(pBox)->IsChecked(); if(rToken.eTokenType == TOKEN_TAB_STOP) static_cast<SwTOXButton*>(pCurCtrl)->SetTabAlign( bChecked ? SVX_TAB_ADJUST_END : SVX_TAB_ADJUST_LEFT); m_pTabPosFT->Enable(!bChecked); m_pTabPosMF->Enable(!bChecked); ModifyHdl(0); - return 0; } void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh) @@ -2730,7 +2722,7 @@ SwTokenWindow::SwTokenWindow(vcl::Window* pParent) sAdditionalAccnameString2 = SW_RESSTR(STR_ADDITIONAL_ACCNAME_STRING2); sAdditionalAccnameString3 = SW_RESSTR(STR_ADDITIONAL_ACCNAME_STRING3); - Link<> aLink(LINK(this, SwTokenWindow, ScrollHdl)); + Link<Button*,void> aLink(LINK(this, SwTokenWindow, ScrollHdl)); m_pLeftScrollWin->SetClickHdl(aLink); m_pRightScrollWin->SetClickHdl(aLink); } @@ -3287,10 +3279,10 @@ void SwTokenWindow::AdjustScrolling() } } -IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn ) +IMPL_LINK_TYPED(SwTokenWindow, ScrollHdl, Button*, pBtn, void ) { if(aControlList.empty()) - return 0; + return; const long nSpace = m_pCtrlParentWin->GetSizePixel().Width(); #if OSL_DEBUG_LEVEL > 1 @@ -3382,8 +3374,6 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn ) pCtrl = *(aControlList.rbegin()); m_pRightScrollWin->Enable((pCtrl->GetPosPixel().X() + pCtrl->GetSizePixel().Width()) > nSpace); } - - return 0; } OUString SwTokenWindow::GetPattern() const @@ -3752,7 +3742,7 @@ VclPtr<SfxTabPage> SwTOXStylesTabPage::Create( vcl::Window* pParent, return VclPtr<SwTOXStylesTabPage>::Create(pParent, *rAttrSet); } -IMPL_LINK( SwTOXStylesTabPage, EditStyleHdl, Button *, pBtn ) +IMPL_LINK_TYPED( SwTOXStylesTabPage, EditStyleHdl, Button *, pBtn, void ) { if( LISTBOX_ENTRY_NOTFOUND != m_pParaLayLB->GetSelectEntryPos()) { @@ -3766,11 +3756,10 @@ IMPL_LINK( SwTOXStylesTabPage, EditStyleHdl, Button *, pBtn ) &aStyle, &aFamily, 0L); Application::SetDefDialogParent( pDefDlgParent ); } - return 0; } // allocate templates -IMPL_LINK_NOARG(SwTOXStylesTabPage, AssignHdl) +IMPL_LINK_NOARG_TYPED(SwTOXStylesTabPage, AssignHdl, Button*, void) { sal_Int32 nLevPos = m_pLevelLB->GetSelectEntryPos(); sal_Int32 nTemplPos = m_pParaLayLB->GetSelectEntryPos(); @@ -3789,10 +3778,9 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, AssignHdl) m_pLevelLB->SelectEntry(aStr); Modify(); } - return 0; } -IMPL_LINK_NOARG(SwTOXStylesTabPage, StdHdl) +IMPL_LINK_NOARG_TYPED(SwTOXStylesTabPage, StdHdl, Button*, void) { const sal_Int32 nPos = m_pLevelLB->GetSelectEntryPos(); if(nPos != LISTBOX_ENTRY_NOTFOUND) @@ -3804,7 +3792,6 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, StdHdl) m_pCurrentForm->SetTemplate(nPos, aEmptyOUStr); Modify(); } - return 0; } IMPL_LINK_NOARG(SwTOXStylesTabPage, DoubleClickHdl) @@ -4219,7 +4206,7 @@ void SwAutoMarkDlg_Impl::dispose() ModalDialog::dispose(); } -IMPL_LINK_NOARG(SwAutoMarkDlg_Impl, OkHdl) +IMPL_LINK_NOARG_TYPED(SwAutoMarkDlg_Impl, OkHdl, Button*, void) { bool bError = false; if(m_pEntriesBB->IsModified() || bCreateMode) @@ -4239,7 +4226,6 @@ IMPL_LINK_NOARG(SwAutoMarkDlg_Impl, OkHdl) } if( !bError ) EndDialog(RET_OK); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index ab1283f2959b..85584e0ff2f8 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -582,7 +582,7 @@ IMPL_LINK( SwNewUserIdxDlg, ModifyHdl, Edit*, pEdit) return 0; } -IMPL_LINK_NOARG(SwIndexMarkPane, NewUserIdxHdl) +IMPL_LINK_NOARG_TYPED(SwIndexMarkPane, NewUserIdxHdl, Button*, void) { ScopedVclPtrInstance< SwNewUserIdxDlg > pDlg(this); if(RET_OK == pDlg->Execute()) @@ -591,27 +591,24 @@ IMPL_LINK_NOARG(SwIndexMarkPane, NewUserIdxHdl) m_pTypeDCB->InsertEntry(sNewName); m_pTypeDCB->SelectEntry(sNewName); } - return 0; } -IMPL_LINK( SwIndexMarkPane, SearchTypeHdl, CheckBox*, pBox) +IMPL_LINK_TYPED( SwIndexMarkPane, SearchTypeHdl, Button*, pBox, void) { - bool bEnable = pBox->IsChecked() && pBox->IsEnabled(); + bool bEnable = static_cast<CheckBox*>(pBox)->IsChecked() && pBox->IsEnabled(); m_pSearchCaseWordOnlyCB->Enable(bEnable); m_pSearchCaseSensitiveCB->Enable(bEnable); - return 0; } -IMPL_LINK( SwIndexMarkPane, InsertHdl, Button *, pButton ) +IMPL_LINK_TYPED( SwIndexMarkPane, InsertHdl, Button *, pButton, void ) { Apply(); //close the dialog if only one entry is available if(!bNewMark && !m_pPrevBT->IsVisible() && !m_pNextBT->IsVisible()) CloseHdl(pButton); - return 0; } -IMPL_LINK_NOARG(SwIndexMarkPane, CloseHdl) +IMPL_LINK_NOARG_TYPED(SwIndexMarkPane, CloseHdl, Button*, void) { if(bNewMark) { @@ -623,7 +620,6 @@ IMPL_LINK_NOARG(SwIndexMarkPane, CloseHdl) { m_rDialog.EndDialog(); } - return 0; } // select index type only when inserting @@ -702,40 +698,35 @@ IMPL_LINK( SwIndexMarkPane, ModifyHdl, ListBox *, pBox ) return 0; } -IMPL_LINK_NOARG(SwIndexMarkPane, NextHdl) +IMPL_LINK_NOARG_TYPED(SwIndexMarkPane, NextHdl, Button*, void) { InsertUpdate(); pTOXMgr->NextTOXMark(); UpdateDialog(); - return 0; } -IMPL_LINK_NOARG(SwIndexMarkPane, NextSameHdl) +IMPL_LINK_NOARG_TYPED(SwIndexMarkPane, NextSameHdl, Button*, void) { InsertUpdate(); pTOXMgr->NextTOXMark(true); UpdateDialog(); - return 0; } -IMPL_LINK_NOARG(SwIndexMarkPane, PrevHdl) +IMPL_LINK_NOARG_TYPED(SwIndexMarkPane, PrevHdl, Button*, void) { InsertUpdate(); pTOXMgr->PrevTOXMark(); UpdateDialog(); - return 0; } -IMPL_LINK_NOARG(SwIndexMarkPane, PrevSameHdl) +IMPL_LINK_NOARG_TYPED(SwIndexMarkPane, PrevSameHdl, Button*, void) { InsertUpdate(); pTOXMgr->PrevTOXMark(true); UpdateDialog(); - - return 0; } -IMPL_LINK_NOARG(SwIndexMarkPane, DelHdl) +IMPL_LINK_NOARG_TYPED(SwIndexMarkPane, DelHdl, Button*, void) { bDel = true; InsertUpdate(); @@ -748,7 +739,6 @@ IMPL_LINK_NOARG(SwIndexMarkPane, DelHdl) CloseHdl(m_pCloseBT); SfxViewFrame::Current()->GetBindings().Invalidate(FN_EDIT_IDX_ENTRY_DLG); } - return 0; } // renew dialog view @@ -1110,7 +1100,7 @@ void SwAuthorMarkPane::ReInitDlg(SwWrtShell& rWrtShell) InitControls(); } -IMPL_LINK_NOARG(SwAuthorMarkPane, CloseHdl) +IMPL_LINK_NOARG_TYPED(SwAuthorMarkPane, CloseHdl, Button*, void) { if(bNewEntry) { @@ -1122,7 +1112,6 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, CloseHdl) { m_rDialog.EndDialog(); } - return 0; } static OUString lcl_FindColumnEntry(const beans::PropertyValue* pFields, sal_Int32 nLen, const OUString& rColumnTitle) @@ -1184,7 +1173,7 @@ IMPL_LINK( SwAuthorMarkPane, CompEntryHdl, ListBox*, pBox) return 0; } -IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl) +IMPL_LINK_NOARG_TYPED(SwAuthorMarkPane, InsertHdl, Button*, void) { //insert or update the SwAuthorityField... if(pSh) @@ -1206,7 +1195,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl) { ScopedVclPtrInstance< MessageDialog > aQuery(&m_rDialog, SW_RES(STR_QUERY_CHANGE_AUTH_ENTRY), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); if(RET_YES != aQuery->Execute()) - return 0; + return; } } @@ -1235,10 +1224,9 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl) } if(!bNewEntry) CloseHdl(0); - return 0; } -IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, pButton) +IMPL_LINK_TYPED(SwAuthorMarkPane, CreateEntryHdl, Button*, pButton, void) { bool bCreate = pButton == m_pCreateEntryPB; OUString sOldId = m_sCreatedEntry[0]; @@ -1280,10 +1268,9 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, pButton) m_pTitleFI->SetText(m_sFields[AUTH_FIELD_TITLE]); m_pActionBT->Enable(); } - return 0; } -IMPL_LINK(SwAuthorMarkPane, ChangeSourceHdl, RadioButton*, pButton) +IMPL_LINK_TYPED(SwAuthorMarkPane, ChangeSourceHdl, Button*, pButton, void) { bool bFromComp = (pButton == m_pFromComponentRB); bIsFromComponent = bFromComp; @@ -1342,7 +1329,6 @@ IMPL_LINK(SwAuthorMarkPane, ChangeSourceHdl, RadioButton*, pButton) } m_pEntryLB->SelectEntryPos(0); CompEntryHdl(m_pEntryLB); - return 0; } IMPL_LINK(SwAuthorMarkPane, EditModifyHdl, Edit*, pEdit) diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index fb980579f171..353f2e9a1357 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -65,7 +65,7 @@ IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox ) } // callback to delete a text mark -IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl) +IMPL_LINK_NOARG_TYPED(SwInsertBookmarkDlg, DeleteHdl, Button*, void) { // remove text marks from the ComboBox @@ -76,7 +76,6 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl) m_pDeleteBtn->Enable(false); // no further entries there m_pOkBtn->Enable(); // the OK handler deletes - return 0; } // callback for OKButton. Inserts a new text mark to the current position. diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index 797ba4e6d35b..56d0beeb8d41 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -56,7 +56,7 @@ void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage ) static_cast<SwEndNoteOptionPage&>(rPage).SetShell( rSh ); } -IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn ) +IMPL_LINK_TYPED( SwFootNoteOptionDlg, OkHdl, Button *, pBtn, void ) { SfxItemSet aDummySet(rSh.GetAttrPool(), 1, 1 ); SfxTabPage *pPage = GetTabPage( m_nFootNoteId ); @@ -66,7 +66,6 @@ IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn ) if ( pPage ) pPage->FillItemSet( &aDummySet ); aOldOkHdl.Call( pBtn ); - return 0; } SwEndNoteOptionPage::SwEndNoteOptionPage(vcl::Window *pParent, bool bEN, @@ -297,7 +296,7 @@ void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell ) // Handler behind the button to collect the footnote at the page. In this case // all kinds of numbering can be used. -IMPL_LINK_NOARG(SwEndNoteOptionPage, PosPageHdl) +IMPL_LINK_NOARG_TYPED(SwEndNoteOptionPage, PosPageHdl, Button*, void) { const SwFootnoteNum eNum = (const SwFootnoteNum)GetNumbering(); bPosDoc = false; @@ -309,8 +308,6 @@ IMPL_LINK_NOARG(SwEndNoteOptionPage, PosPageHdl) } m_pPageTemplLbl->Enable(false); m_pPageTemplBox->Enable(false); - - return 0; } IMPL_LINK_NOARG(SwEndNoteOptionPage, NumCountHdl) @@ -328,7 +325,7 @@ IMPL_LINK_NOARG(SwEndNoteOptionPage, NumCountHdl) // Handler behind the button to collect the footnote at the chapter or end of // the document. In this case no pagewise numbering can be used. -IMPL_LINK_NOARG(SwEndNoteOptionPage, PosChapterHdl) +IMPL_LINK_NOARG_TYPED(SwEndNoteOptionPage, PosChapterHdl, Button*, void) { if ( !bPosDoc ) SelectNumbering(FTNNUM_DOC); @@ -338,7 +335,6 @@ IMPL_LINK_NOARG(SwEndNoteOptionPage, PosChapterHdl) m_pNumCountBox->RemoveEntry(aNumChapter); m_pPageTemplLbl->Enable(); m_pPageTemplBox->Enable(); - return 0; } static SwCharFormat* lcl_GetCharFormat( SwWrtShell* pSh, const OUString& rCharFormatName ) diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index 7444167bf911..c3f031e9861e 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -208,7 +208,7 @@ IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, ) return 0; } -IMPL_LINK_NOARG(SwGlossaryGroupDlg, NewHdl) +IMPL_LINK_NOARG_TYPED(SwGlossaryGroupDlg, NewHdl, Button*, void) { OUString sGroup = m_pNameED->GetText() + OUStringLiteral1<GLOS_DELIM>() @@ -225,17 +225,15 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, NewHdl) m_pGroupTLB->Select(pEntry); m_pGroupTLB->MakeVisible(pEntry); m_pGroupTLB->GetModel()->Resort(); - - return 0; } -IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton ) +IMPL_LINK_TYPED( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton, void ) { SvTreeListEntry* pEntry = m_pGroupTLB->FirstSelected(); if(!pEntry) { pButton->Enable(false); - return 0; + return; } GlosBibUserData* pUserData = static_cast<GlosBibUserData*>(pEntry->GetUserData()); OUString const sEntry(pUserData->sGroupName); @@ -276,10 +274,9 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton ) pButton->Enable(false); //the content must be deleted - otherwise the new handler would be called in Apply() m_pNameED->SetText(aEmptyOUStr); - return 0; } -IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl) +IMPL_LINK_NOARG_TYPED(SwGlossaryGroupDlg, RenameHdl, Button*, void) { SvTreeListEntry* pEntry = m_pGroupTLB->FirstSelected(); GlosBibUserData* pUserData = static_cast<GlosBibUserData*>(pEntry->GetUserData()); @@ -322,7 +319,6 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl) m_pGroupTLB->Select(pEntry); m_pGroupTLB->MakeVisible(pEntry); m_pGroupTLB->GetModel()->Resort(); - return 0; } IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl) diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 175e05992183..1b4a79b30503 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -125,7 +125,7 @@ class SwNewGlosNameDlg : public ModalDialog protected: DECL_LINK( Modify, Edit * ); - DECL_LINK(Rename, void *); + DECL_LINK_TYPED(Rename, Button*, void); public: SwNewGlosNameDlg( vcl::Window* pParent, @@ -614,7 +614,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn ) } // dialog manage regions -IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl) +IMPL_LINK_NOARG_TYPED(SwGlossaryDlg, BibHdl, Button*, void) { SwGlossaries* pGloss = ::GetGlossaries(); if( pGloss->IsGlosPathErr() ) @@ -687,7 +687,6 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl) PathHdl(m_pPathBtn); } } - return 0; } // initialisation; from Ctor and after editing regions @@ -810,7 +809,7 @@ IMPL_LINK( SwNewGlosNameDlg, Modify, Edit *, pBox ) return 0; } -IMPL_LINK_NOARG(SwNewGlosNameDlg, Rename) +IMPL_LINK_NOARG_TYPED(SwNewGlosNameDlg, Rename, Button*, void) { SwGlossaryDlg* pDlg = static_cast<SwGlossaryDlg*>(GetParent()); OUString sNew = GetAppCharClass().uppercase(m_pNewShort->GetText()); @@ -822,13 +821,12 @@ IMPL_LINK_NOARG(SwNewGlosNameDlg, Rename) } else EndDialog(RET_OK); - return 0; } -IMPL_LINK( SwGlossaryDlg, CheckBoxHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( SwGlossaryDlg, CheckBoxHdl, Button *, pBox, void ) { SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get(); - bool bCheck = pBox->IsChecked(); + bool bCheck = static_cast<CheckBox*>(pBox)->IsChecked(); if (pBox == m_pInsertTipCB) rCfg.SetAutoTextTip(bCheck); else if(pBox == m_pFileRelCB) @@ -836,7 +834,6 @@ IMPL_LINK( SwGlossaryDlg, CheckBoxHdl, CheckBox *, pBox ) else rCfg.SetSaveRelNet(bCheck); rCfg.Commit(); - return 0; } // TreeListBox for groups and blocks @@ -1034,7 +1031,7 @@ OUString SwGlossaryDlg::GetCurrGrpName() const return OUString(); } -IMPL_LINK( SwGlossaryDlg, PathHdl, Button *, pBtn ) +IMPL_LINK_TYPED( SwGlossaryDlg, PathHdl, Button *, pBtn, void ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) @@ -1055,13 +1052,11 @@ IMPL_LINK( SwGlossaryDlg, PathHdl, Button *, pBtn ) } } } - return 0; } -IMPL_LINK_NOARG(SwGlossaryDlg, InsertHdl) +IMPL_LINK_NOARG_TYPED(SwGlossaryDlg, InsertHdl, Button*, void) { EndDialog(RET_OK); - return 0; } void SwGlossaryDlg::ShowPreview() diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx index c7390af9449d..53dd61b593cb 100644 --- a/sw/source/ui/misc/impfnote.hxx +++ b/sw/source/ui/misc/impfnote.hxx @@ -62,8 +62,8 @@ class SwEndNoteOptionPage : public SfxTabPage inline void SelectNumbering(int eNum); int GetNumbering() const; - DECL_LINK(PosPageHdl, void *); - DECL_LINK(PosChapterHdl, void *); + DECL_LINK_TYPED(PosPageHdl, Button*, void); + DECL_LINK_TYPED(PosChapterHdl, Button*, void); DECL_LINK(NumCountHdl, void *); public: diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index cbed5a87f647..86ccba7b3b26 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -82,11 +82,10 @@ void SwInsFootNoteDlg::Apply() bFootnote = m_pFootnoteBtn->IsChecked(); } -IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberCharHdl) +IMPL_LINK_NOARG_TYPED(SwInsFootNoteDlg, NumberCharHdl, Button*, void) { m_pNumberCharEdit->GrabFocus(); m_pOkBtn->Enable( !m_pNumberCharEdit->GetText().isEmpty() || bExtCharAvailable ); - return 0; } IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberEditHdl) @@ -97,13 +96,12 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberEditHdl) return 0; } -IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberAutoBtnHdl) +IMPL_LINK_NOARG_TYPED(SwInsFootNoteDlg, NumberAutoBtnHdl, Button*, void) { m_pOkBtn->Enable( true ); - return 0; } -IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl) +IMPL_LINK_NOARG_TYPED(SwInsFootNoteDlg, NumberExtCharHdl, Button*, void) { m_pNumberCharBtn->Check(); @@ -140,11 +138,9 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl) m_pOkBtn->Enable(!m_pNumberCharEdit->GetText().isEmpty()); } } - - return 0; } -IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn ) +IMPL_LINK_TYPED( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn, void ) { Apply(); @@ -156,8 +152,6 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn ) rSh.GotoPrevFootnoteAnchor(); Init(); - - return 0; } SwInsFootNoteDlg::SwInsFootNoteDlg(vcl::Window *pParent, SwWrtShell &rShell, bool bEd) diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index 47a7b7c182e9..1eb0e1413f94 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -193,7 +193,7 @@ void SwLineNumberingDlg::dispose() } -IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl) +IMPL_LINK_NOARG_TYPED(SwLineNumberingDlg, OKHdl, Button*, void) { SwLineNumberInfo aInf(pSh->GetLineNumberInfo()); @@ -252,8 +252,6 @@ IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl) m_pNumberingOnFooterHeader->SetState(TRISTATE_FALSE); EndDialog( RET_OK ); - - return 0; } // modify @@ -269,12 +267,11 @@ IMPL_LINK_NOARG(SwLineNumberingDlg, ModifyHdl) } // On/Off -IMPL_LINK_NOARG(SwLineNumberingDlg, LineOnOffHdl) +IMPL_LINK_NOARG_TYPED(SwLineNumberingDlg, LineOnOffHdl, Button*, void) { bool bEnable = m_pNumberingOnCB->IsChecked(); m_pBodyContent->Enable(bEnable); ModifyHdl(); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index c9eabce7157c..59f4935189d3 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -719,9 +719,9 @@ IMPL_LINK( SwNumPositionTabPage, DistanceHdl, MetricField *, pField ) return 0; } -IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( SwNumPositionTabPage, RelativeHdl, Button *, pBox, void ) { - bool bOn = pBox->IsChecked(); + bool bOn = static_cast<CheckBox*>(pBox)->IsChecked(); bool bSingleSelection = m_pLevelLB->GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl; bool bSetValue = false; long nValue = 0; @@ -755,7 +755,6 @@ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox ) m_pDistBorderMF->SetText(aEmptyOUStr); m_pDistBorderMF->Enable(bOn || bSingleSelection || pOutlineDlg); bLastRelative = bOn; - return 0; } IMPL_LINK_NOARG(SwNumPositionTabPage, LabelFollowedByHdl_Impl) @@ -893,7 +892,7 @@ IMPL_LINK( SwNumPositionTabPage, IndentAtHdl_Impl, MetricField*, pField ) return 0; } -IMPL_LINK_NOARG(SwNumPositionTabPage, StandardHdl) +IMPL_LINK_NOARG_TYPED(SwNumPositionTabPage, StandardHdl, Button*, void) { sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < MAXLEVEL; i++) @@ -927,7 +926,6 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, StandardHdl) InitControls(); SetModified(); - return 0; } #ifdef DBG_UTIL @@ -1022,10 +1020,9 @@ short SwSvxNumBulletTabDialog::Ok() return nRet; } -IMPL_LINK_NOARG(SwSvxNumBulletTabDialog, RemoveNumberingHdl) +IMPL_LINK_NOARG_TYPED(SwSvxNumBulletTabDialog, RemoveNumberingHdl, Button*, void) { EndDialog(RET_USER); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 76d56893dc0b..6b71cdecde9a 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -159,6 +159,7 @@ static sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel) } sal_uInt16 SwOutlineTabDialog::nNumLevel = 1; + SwOutlineTabDialog::SwOutlineTabDialog(vcl::Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell &rSh) : SfxTabDialog(pParent, "OutlineNumberingDialog", @@ -229,15 +230,14 @@ void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) } } -IMPL_LINK_NOARG(SwOutlineTabDialog, CancelHdl) +IMPL_LINK_NOARG_TYPED(SwOutlineTabDialog, CancelHdl, Button*, void) { if (!bModified) rWrtSh.ResetModified(); EndDialog(); - return 0; } -IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn ) +IMPL_LINK_TYPED( SwOutlineTabDialog, FormHdl, Button *, pBtn, void ) { PopupMenu *pFormMenu = get_menu("form"); // fill PopupMenu @@ -257,7 +257,6 @@ IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn ) pFormMenu->SetSelectHdl(LINK(this, SwOutlineTabDialog, MenuSelectHdl)); pFormMenu->Execute(pBtn, Rectangle(Point(0,0), pBtn->GetSizePixel()), PopupMenuFlags::ExecuteDown); - return 0; } IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu ) diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index cbe3a891b340..ff28147f2523 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -52,17 +52,15 @@ const sal_uInt16 SwFootNotePage::aPageRg[] = { // handler to switch between the different possibilities how the footnote // region's height can be set. -IMPL_LINK_NOARG(SwFootNotePage, HeightPage) +IMPL_LINK_NOARG_TYPED(SwFootNotePage, HeightPage, Button*, void) { m_pMaxHeightEdit->Enable(false); - return 0; } -IMPL_LINK_NOARG(SwFootNotePage, HeightMetric) +IMPL_LINK_NOARG_TYPED(SwFootNotePage, HeightMetric, Button*, void) { m_pMaxHeightEdit->Enable(); m_pMaxHeightEdit->GrabFocus(); - return 0; } // handler limit values diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index ef7823c3b61d..cdcba665ccbe 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -95,15 +95,14 @@ SwTextGridPage::SwTextGridPage(vcl::Window *pParent, const SfxItemSet &rSet) : m_pCharWidthMF->SetDownHdl(aSizeLink); m_pCharWidthMF->SetLoseFocusHdl(aSizeLink); - Link<> aGridTypeHdl = LINK(this, SwTextGridPage, GridTypeHdl); + Link<Button*,void> aGridTypeHdl = LINK(this, SwTextGridPage, GridTypeHdl); m_pNoGridRB->SetClickHdl(aGridTypeHdl); m_pLinesGridRB->SetClickHdl(aGridTypeHdl); m_pCharsGridRB->SetClickHdl(aGridTypeHdl); - Link<> aModifyLk = LINK(this, SwTextGridPage, GridModifyHdl); - m_pColorLB->SetSelectHdl(aModifyLk); - m_pPrintCB->SetClickHdl(aModifyLk); - m_pRubyBelowCB->SetClickHdl(aModifyLk); + m_pColorLB->SetSelectHdl(LINK(this, SwTextGridPage, GridModifyHdl)); + m_pPrintCB->SetClickHdl(LINK(this, SwTextGridPage, GridModifyClickHdl)); + m_pRubyBelowCB->SetClickHdl(LINK(this, SwTextGridPage, GridModifyClickHdl)); m_pDisplayCB->SetClickHdl(LINK(this, SwTextGridPage, DisplayGridHdl)); @@ -485,7 +484,7 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField) return 0; } -IMPL_LINK(SwTextGridPage, GridTypeHdl, RadioButton*, pButton) +IMPL_LINK_TYPED(SwTextGridPage, GridTypeHdl, Button*, pButton, void) { bool bEnable = m_pNoGridRB.get() != pButton; m_pLayoutFL->Enable(bEnable); @@ -509,17 +508,19 @@ IMPL_LINK(SwTextGridPage, GridTypeHdl, RadioButton*, pButton) } GridModifyHdl(0); - return 0; } -IMPL_LINK_NOARG(SwTextGridPage, DisplayGridHdl) +IMPL_LINK_NOARG_TYPED(SwTextGridPage, DisplayGridHdl, Button*, void) { bool bChecked = m_pDisplayCB->IsChecked(); m_pPrintCB->Enable(bChecked); m_pPrintCB->Check(bChecked); - return 0; } +IMPL_LINK_NOARG_TYPED(SwTextGridPage, GridModifyClickHdl, Button*, void) +{ + GridModifyHdl(0); +} IMPL_LINK_NOARG(SwTextGridPage, GridModifyHdl) { const SfxItemSet& rOldSet = GetItemSet(); diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 535d1b69b473..d86b6bfc5e65 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -180,7 +180,7 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell) } // initialise - Link<> aLk = LINK(this,SwSortDlg, CheckHdl); + Link<Button*,void> aLk = LINK(this,SwSortDlg, CheckHdl); m_pKeyCB1->SetClickHdl( aLk ); m_pKeyCB2->SetClickHdl( aLk ); m_pKeyCB3->SetClickHdl( aLk ); @@ -385,15 +385,14 @@ void SwSortDlg::Apply() ScopedVclPtrInstance<MessageDialog>::Create( this->GetParent(), SW_RES(STR_SRTERR), VCL_MESSAGE_INFO)->Execute(); } -IMPL_LINK( SwSortDlg, DelimHdl, RadioButton*, pButton ) +IMPL_LINK_TYPED( SwSortDlg, DelimHdl, Button*, pButton, void ) { bool bEnable = pButton == m_pDelimFreeRB && m_pDelimFreeRB->IsEnabled(); m_pDelimEdt->Enable( bEnable ); m_pDelimPB->Enable( bEnable ); - return 0; } -IMPL_LINK_NOARG(SwSortDlg, DelimCharHdl) +IMPL_LINK_NOARG_TYPED(SwSortDlg, DelimCharHdl, Button*, void) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) @@ -409,10 +408,9 @@ IMPL_LINK_NOARG(SwSortDlg, DelimCharHdl) m_pDelimEdt->SetText( OUString(sal_Unicode(pItem->GetValue())) ); } } - return 0; } -IMPL_LINK( SwSortDlg, CheckHdl, void *, pControl ) +IMPL_LINK_TYPED( SwSortDlg, CheckHdl, Button*, pControl, void ) { if( pControl == m_pRowRB.get()) { @@ -440,7 +438,6 @@ IMPL_LINK( SwSortDlg, CheckHdl, void *, pControl ) !m_pKeyCB2->IsChecked() && !m_pKeyCB3->IsChecked()) static_cast<CheckBox *>(pControl)->Check(); - return 0; } IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox ) diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index 59980d53005a..fd432e1e4167 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -216,7 +216,7 @@ SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) : m_pDocumentStartRB->Check(); m_pPageStartNF->Enable(false); m_pPageStartNF->SetValue(lcl_GetCurrentPage(mpSh)); - Link<> aStartPageHdl = LINK(this, SwTitlePageDlg, StartPageHdl); + Link<Button*,void> aStartPageHdl = LINK(this, SwTitlePageDlg, StartPageHdl); m_pDocumentStartRB->SetClickHdl(aStartPageHdl); m_pPageStartRB->SetClickHdl(aStartPageHdl); @@ -250,22 +250,19 @@ IMPL_LINK_NOARG(SwTitlePageDlg, DownHdl) return 0; } -IMPL_LINK_NOARG(SwTitlePageDlg, RestartNumberingHdl) +IMPL_LINK_NOARG_TYPED(SwTitlePageDlg, RestartNumberingHdl, Button*, void) { m_pRestartNumberingNF->Enable(m_pRestartNumberingCB->IsChecked()); - return 0; } -IMPL_LINK_NOARG(SwTitlePageDlg, SetPageNumberHdl) +IMPL_LINK_NOARG_TYPED(SwTitlePageDlg, SetPageNumberHdl, Button*, void) { m_pSetPageNumberNF->Enable(m_pSetPageNumberCB->IsChecked()); - return 0; } -IMPL_LINK_NOARG(SwTitlePageDlg, StartPageHdl) +IMPL_LINK_NOARG_TYPED(SwTitlePageDlg, StartPageHdl, Button*, void) { m_pPageStartNF->Enable(m_pPageStartRB->IsChecked()); - return 0; } SwTitlePageDlg::~SwTitlePageDlg() @@ -291,16 +288,14 @@ void SwTitlePageDlg::dispose() SfxModalDialog::dispose(); } -IMPL_LINK_NOARG(SwTitlePageDlg, EditHdl) +IMPL_LINK_NOARG_TYPED(SwTitlePageDlg, EditHdl, Button*, void) { SwView& rView = mpSh->GetView(); rView.GetDocShell()->FormatPage(m_pPagePropertiesLB->GetSelectEntry(), "page", *mpSh); rView.InvalidateRulerPos(); - - return 0; } -IMPL_LINK_NOARG(SwTitlePageDlg, OKHdl) +IMPL_LINK_NOARG_TYPED(SwTitlePageDlg, OKHdl, Button*, void) { lcl_PushCursor(mpSh); @@ -350,7 +345,6 @@ IMPL_LINK_NOARG(SwTitlePageDlg, OKHdl) if (!m_pUseExistingPagesRB->IsChecked()) mpSh->GotoPage(GetInsertPosition(), false); EndDialog( RET_OK ); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 866c2f006e76..e8f166506de4 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -147,7 +147,7 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) } mpKeepColumn->SaveValue(); - Link<> aLk( LINK(this, SwConvertTableDlg, BtnHdl) ); + Link<Button*,void> aLk( LINK(this, SwConvertTableDlg, BtnHdl) ); mpTabBtn->SetClickHdl( aLk ); mpSemiBtn->SetClickHdl( aLk ); mpParaBtn->SetClickHdl( aLk ); @@ -197,7 +197,7 @@ void SwConvertTableDlg::dispose() SfxModalDialog::dispose(); } -IMPL_LINK( SwConvertTableDlg, AutoFormatHdl, PushButton*, pButton ) +IMPL_LINK_TYPED( SwConvertTableDlg, AutoFormatHdl, Button*, pButton, void ) { SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); @@ -206,10 +206,9 @@ IMPL_LINK( SwConvertTableDlg, AutoFormatHdl, PushButton*, pButton ) OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFormatOfIndex( pTAutoFormat ); - return 0; } -IMPL_LINK( SwConvertTableDlg, BtnHdl, Button*, pButton ) +IMPL_LINK_TYPED( SwConvertTableDlg, BtnHdl, Button*, pButton, void ) { if( pButton == mpTabBtn ) mpKeepColumn->SetState( mpKeepColumn->GetSavedValue() ); @@ -221,22 +220,18 @@ IMPL_LINK( SwConvertTableDlg, BtnHdl, Button*, pButton ) } mpKeepColumn->Enable( mpTabBtn->IsChecked() ); mpOtherEd->Enable( mpOtherBtn->IsChecked() ); - return 0; } -IMPL_LINK_NOARG(SwConvertTableDlg, CheckBoxHdl) +IMPL_LINK_NOARG_TYPED(SwConvertTableDlg, CheckBoxHdl, Button*, void) { mpRepeatHeaderCB->Enable(mpHeaderCB->IsChecked()); ReapeatHeaderCheckBoxHdl(); - - return 0; } -IMPL_LINK_NOARG(SwConvertTableDlg, ReapeatHeaderCheckBoxHdl) +IMPL_LINK_NOARG_TYPED(SwConvertTableDlg, ReapeatHeaderCheckBoxHdl, Button*, void) { bool bEnable = mpHeaderCB->IsChecked() && mpRepeatHeaderCB->IsChecked(); mpRepeatRows->Enable(bEnable); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index e471c9cf5d59..ad62d2def1e7 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -129,10 +129,9 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView ) m_pRepeatHeaderNF->SetMax( nMax ); } -IMPL_LINK_NOARG(SwInsTableDlg, OKHdl) +IMPL_LINK_NOARG_TYPED(SwInsTableDlg, OKHdl, Button*, void) { EndDialog(RET_OK); - return 0; } SwInsTableDlg::~SwInsTableDlg() @@ -200,7 +199,7 @@ IMPL_LINK( SwInsTableDlg, ModifyRowCol, NumericField *, pField ) return 0; } -IMPL_LINK( SwInsTableDlg, AutoFormatHdl, PushButton*, pButton ) +IMPL_LINK_TYPED( SwInsTableDlg, AutoFormatHdl, Button*, pButton, void ) { SwAbstractDialogFactory* pFact = swui::GetFactory(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); @@ -209,22 +208,17 @@ IMPL_LINK( SwInsTableDlg, AutoFormatHdl, PushButton*, pButton ) OSL_ENSURE(pDlg, "Dialog creation failed!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFormatOfIndex( pTAutoFormat ); - return 0; } -IMPL_LINK_NOARG(SwInsTableDlg, CheckBoxHdl) +IMPL_LINK_NOARG_TYPED(SwInsTableDlg, CheckBoxHdl, Button*, void) { m_pRepeatHeaderCB->Enable(m_pHeaderCB->IsChecked()); ReapeatHeaderCheckBoxHdl(); - - return 0; } -IMPL_LINK_NOARG(SwInsTableDlg, ReapeatHeaderCheckBoxHdl) +IMPL_LINK_NOARG_TYPED(SwInsTableDlg, ReapeatHeaderCheckBoxHdl, Button*, void) { m_pRepeatGroup->Enable(m_pHeaderCB->IsChecked() && m_pRepeatHeaderCB->IsChecked()); - - return 0; } IMPL_LINK_NOARG(SwInsTableDlg, ModifyRepeatHeaderNF_Hdl) diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 1a490e2b2bf9..d16675521945 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -137,15 +137,15 @@ void SwFormatTablePage::Init() m_aRightMF.SetMetricFieldMin(-999999); //handler - Link<> aLk = LINK( this, SwFormatTablePage, AutoClickHdl ); - m_pFullBtn->SetClickHdl( aLk ); - m_pFreeBtn->SetClickHdl( aLk ); - m_pLeftBtn->SetClickHdl( aLk ); - m_pFromLeftBtn->SetClickHdl( aLk ); - m_pRightBtn->SetClickHdl( aLk ); - m_pCenterBtn->SetClickHdl( aLk ); - - aLk = LINK( this, SwFormatTablePage, UpDownLoseFocusHdl ); + Link<Button*,void> aLk2 = LINK( this, SwFormatTablePage, AutoClickHdl ); + m_pFullBtn->SetClickHdl( aLk2 ); + m_pFreeBtn->SetClickHdl( aLk2 ); + m_pLeftBtn->SetClickHdl( aLk2 ); + m_pFromLeftBtn->SetClickHdl( aLk2 ); + m_pRightBtn->SetClickHdl( aLk2 ); + m_pCenterBtn->SetClickHdl( aLk2 ); + + Link<> aLk = LINK( this, SwFormatTablePage, UpDownLoseFocusHdl ); m_pTopMF->SetUpHdl( aLk ); m_pBottomMF->SetUpHdl( aLk ); m_aRightMF.SetUpHdl( aLk ); @@ -167,8 +167,9 @@ void SwFormatTablePage::Init() m_pRelWidthCB->SetClickHdl(LINK( this, SwFormatTablePage, RelWidthClickHdl )); } -IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) +IMPL_LINK_TYPED( SwFormatTablePage, RelWidthClickHdl, Button*, p, void ) { + CheckBox* pBtn = static_cast<CheckBox*>(p); OSL_ENSURE(pTableData, "table data not available?"); bool bIsChecked = pBtn->IsChecked(); sal_Int64 nLeft = m_aLeftMF.DenormalizePercent(m_aLeftMF.GetValue(FUNIT_TWIP )); @@ -199,11 +200,9 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) m_pRightFT->Enable(bEnable); } bModified = true; - - return 0; } -IMPL_LINK( SwFormatTablePage, AutoClickHdl, void *, pControl ) +IMPL_LINK_TYPED( SwFormatTablePage, AutoClickHdl, Button*, pControl, void ) { bool bRestore = true, bLeftEnable = false, @@ -265,7 +264,6 @@ IMPL_LINK( SwFormatTablePage, AutoClickHdl, void *, pControl ) } ModifyHdl(m_aWidthMF.get()); bModified = true; - return 0; } void SwFormatTablePage::RightModify() @@ -858,7 +856,7 @@ void SwTableColumnPage::Init(bool bWeb) } SetMetric(*m_pSpaceED, aMetric); - Link<> aLk = LINK( this, SwTableColumnPage, AutoClickHdl ); + Link<Button*,void> aLk = LINK( this, SwTableColumnPage, AutoClickHdl ); m_pUpBtn->SetClickHdl( aLk ); m_pDownBtn->SetClickHdl( aLk ); @@ -867,7 +865,7 @@ void SwTableColumnPage::Init(bool bWeb) m_pProportionalCB->SetClickHdl( aLk ); } -IMPL_LINK( SwTableColumnPage, AutoClickHdl, void *, pControl ) +IMPL_LINK_TYPED( SwTableColumnPage, AutoClickHdl, Button*, pControl, void ) { //move display window if(pControl == m_pDownBtn.get()) @@ -902,7 +900,6 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, void *, pControl ) m_pDownBtn->Enable(aValueTable[0] > 0); m_pUpBtn->Enable(aValueTable[ MET_FIELDS -1 ] < nNoOfVisibleCols -1 ); UpdateCols(0); - return 0; } IMPL_LINK( SwTableColumnPage, UpHdl, MetricField*, pEdit ) @@ -929,16 +926,15 @@ IMPL_LINK( SwTableColumnPage, LoseFocusHdl, MetricField*, pEdit ) return 0; } -IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED( SwTableColumnPage, ModeHdl, Button*, pBox, void ) { - bool bCheck = pBox->IsChecked(); + bool bCheck = static_cast<CheckBox*>(pBox)->IsChecked(); if (pBox == m_pProportionalCB) { if(bCheck) m_pModifyTableCB->Check(); m_pModifyTableCB->Enable(!bCheck && bModifyTable); } - return 0; } bool SwTableColumnPage::FillItemSet( SfxItemSet* ) @@ -1692,7 +1688,7 @@ void SwTextFlowPage::SetShell(SwWrtShell* pSh) } } -IMPL_LINK_NOARG(SwTextFlowPage, PageBreakHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwTextFlowPage, PageBreakHdl_Impl, Button*, void) { if( m_pPgBrkCB->IsChecked() ) { @@ -1727,10 +1723,9 @@ IMPL_LINK_NOARG(SwTextFlowPage, PageBreakHdl_Impl) m_pPgBrkBeforeRB-> Enable(false); m_pPgBrkAfterRB-> Enable(false); } - return 0; } -IMPL_LINK_NOARG(SwTextFlowPage, ApplyCollClickHdl_Impl) +IMPL_LINK_NOARG_TYPED(SwTextFlowPage, ApplyCollClickHdl_Impl, Button*, void) { bool bEnable = false; if ( m_pPageCollCB->IsChecked() && @@ -1749,10 +1744,9 @@ IMPL_LINK_NOARG(SwTextFlowPage, ApplyCollClickHdl_Impl) m_pPageNoFT->Enable(bEnable); m_pPageNoNF->Enable(bEnable); } - return 0; } -IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn ) +IMPL_LINK_TYPED( SwTextFlowPage, PageBreakPosHdl_Impl, Button*, pBtn, void ) { if ( m_pPgBrkCB->IsChecked() ) { @@ -1779,10 +1773,9 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn ) m_pPageNoNF->Enable(false); } } - return 0; } -IMPL_LINK( SwTextFlowPage, PageBreakTypeHdl_Impl, RadioButton*, pBtn ) +IMPL_LINK_TYPED( SwTextFlowPage, PageBreakTypeHdl_Impl, Button*, pBtn, void ) { if ( pBtn == m_pColBrkRB || m_pPgBrkAfterRB->IsChecked() ) { @@ -1794,27 +1787,22 @@ IMPL_LINK( SwTextFlowPage, PageBreakTypeHdl_Impl, RadioButton*, pBtn ) } else if ( m_pPgBrkBeforeRB->IsChecked() ) PageBreakPosHdl_Impl(m_pPgBrkBeforeRB); - return 0; } -IMPL_LINK( SwTextFlowPage, SplitHdl_Impl, CheckBox*, pBox ) +IMPL_LINK_TYPED( SwTextFlowPage, SplitHdl_Impl, Button*, pBox, void ) { - m_pSplitRowCB->Enable(pBox->IsChecked()); - return 0; + m_pSplitRowCB->Enable(static_cast<CheckBox*>(pBox)->IsChecked()); } -IMPL_STATIC_LINK( - SwTextFlowPage, SplitRowHdl_Impl, TriStateBox*, pBox ) +IMPL_STATIC_LINK_TYPED( + SwTextFlowPage, SplitRowHdl_Impl, Button*, pBox, void ) { - pBox->EnableTriState(false); - return 0; + static_cast<TriStateBox*>(pBox)->EnableTriState(false); } -IMPL_LINK_NOARG(SwTextFlowPage, HeadLineCBClickHdl) +IMPL_LINK_NOARG_TYPED(SwTextFlowPage, HeadLineCBClickHdl, Button*, void) { m_pRepeatHeaderCombo->Enable(m_pHeadLineCB->IsChecked()); - - return 0; } void SwTextFlowPage::DisablePageBreak() diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 87123fde207a..4d9c25b3c572 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -207,7 +207,7 @@ void SwAutoFormatDlg::dispose() void SwAutoFormatDlg::Init( const SwTableAutoFormat* pSelFormat ) { - Link<> aLk( LINK( this, SwAutoFormatDlg, CheckHdl ) ); + Link<Button*,void> aLk( LINK( this, SwAutoFormatDlg, CheckHdl ) ); m_pBtnBorder->SetClickHdl( aLk ); m_pBtnFont->SetClickHdl( aLk ); m_pBtnPattern->SetClickHdl( aLk ); @@ -277,7 +277,7 @@ void SwAutoFormatDlg::FillAutoFormatOfIndex( SwTableAutoFormat*& rToFill ) const // Handler: -IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) +IMPL_LINK_TYPED( SwAutoFormatDlg, CheckHdl, Button *, pBtn, void ) { SwTableAutoFormat* pData = &(*pTableTable)[nIndex]; bool bCheck = static_cast<CheckBox*>(pBtn)->IsChecked(), bDataChgd = true; @@ -305,10 +305,9 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) m_pWndPreview->NotifyChange( *pData ); } - return 0; } -IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl) +IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, AddHdl, Button*, void) { bool bOk = false, bFormatInserted = false; while( !bOk ) @@ -363,10 +362,9 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl) else bOk = true; } - return 0; } -IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl) +IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, RemoveHdl, Button*, void) { OUString aMessage = aStrDelMsg; aMessage += "\n\n"; @@ -399,11 +397,9 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl) pBox.reset(); SelFormatHdl( 0 ); - - return 0; } -IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) +IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, RenameHdl, Button*, void) { bool bOk = false; while( !bOk ) @@ -463,7 +459,6 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) else bOk = true; } - return 0; } IMPL_LINK_NOARG(SwAutoFormatDlg, SelFormatHdl) @@ -500,12 +495,11 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, SelFormatHdl) return 0; } -IMPL_LINK_NOARG(SwAutoFormatDlg, OkHdl) +IMPL_LINK_NOARG_TYPED(SwAutoFormatDlg, OkHdl, Button*, void) { if( bSetAutoFormat ) pShell->SetTableAutoFormat( (*pTableTable)[ nIndex ] ); EndDialog( RET_OK ); - return sal_IntPtr(true); } AutoFormatPreview::AutoFormatPreview(vcl::Window* pParent, WinBits nStyle) : diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx index f2ebdb3a6df5..4442f018552e 100644 --- a/sw/source/ui/utlui/swrenamexnameddlg.cxx +++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx @@ -86,7 +86,7 @@ void SwRenameXNamedDlg::dispose() ModalDialog::dispose(); } -IMPL_LINK_NOARG(SwRenameXNamedDlg, OkHdl) +IMPL_LINK_NOARG_TYPED(SwRenameXNamedDlg, OkHdl, Button*, void) { try { @@ -97,7 +97,6 @@ IMPL_LINK_NOARG(SwRenameXNamedDlg, OkHdl) OSL_FAIL("name wasn't changed"); } EndDialog(RET_OK); - return 0; } IMPL_LINK(SwRenameXNamedDlg, ModifyHdl, Edit*, pEdit) diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 912f27407f41..8f021cdc92c1 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1591,11 +1591,10 @@ void SwDBManager::MergeCancel() bCancel = true; } -IMPL_LINK( SwDBManager, PrtCancelHdl, Button *, pButton ) +IMPL_LINK_TYPED( SwDBManager, PrtCancelHdl, Button *, pButton, void ) { pButton->GetParent()->Hide(); MergeCancel(); - return 0; } // determine the column's Numberformat and transfer to the forwarded Formatter, diff --git a/sw/source/uibase/dbui/dbui.cxx b/sw/source/uibase/dbui/dbui.cxx index a23431460407..5c7de4e813c1 100644 --- a/sw/source/uibase/dbui/dbui.cxx +++ b/sw/source/uibase/dbui/dbui.cxx @@ -127,7 +127,7 @@ void CancelableDialog::dispose() Dialog::dispose(); } -void CancelableDialog::SetCancelHdl( const Link<>& rLink ) +void CancelableDialog::SetCancelHdl( const Link<Button*,void>& rLink ) { m_pCancelButton->SetClickHdl( rLink ); } diff --git a/sw/source/uibase/envelp/syncbtn.cxx b/sw/source/uibase/envelp/syncbtn.cxx index fe5984f65bce..8a446b80af98 100644 --- a/sw/source/uibase/envelp/syncbtn.cxx +++ b/sw/source/uibase/envelp/syncbtn.cxx @@ -79,10 +79,9 @@ void SwSyncBtnDlg::dispose() SfxFloatingWindow::dispose(); } -IMPL_STATIC_LINK_NOARG(SwSyncBtnDlg, BtnHdl) +IMPL_STATIC_LINK_NOARG_TYPED(SwSyncBtnDlg, BtnHdl, Button*, void) { SfxViewFrame::Current()->GetDispatcher()->Execute(FN_UPDATE_ALL_LINKS, SfxCallMode::ASYNCHRON); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/inc/DropDownFieldDialog.hxx b/sw/source/uibase/inc/DropDownFieldDialog.hxx index a7ef05f126f1..a0f9ea850467 100644 --- a/sw/source/uibase/inc/DropDownFieldDialog.hxx +++ b/sw/source/uibase/inc/DropDownFieldDialog.hxx @@ -43,7 +43,7 @@ class DropDownFieldDialog : public SvxStandardDialog SwWrtShell &rSh; SwDropDownField* pDropField; - DECL_LINK(ButtonHdl, PushButton*); + DECL_LINK_TYPED(ButtonHdl, Button*, void); virtual void Apply() SAL_OVERRIDE; public: DropDownFieldDialog( vcl::Window *pParent, SwWrtShell &rSh, diff --git a/sw/source/uibase/inc/bookmark.hxx b/sw/source/uibase/inc/bookmark.hxx index 1185317191d6..d350197882d6 100644 --- a/sw/source/uibase/inc/bookmark.hxx +++ b/sw/source/uibase/inc/bookmark.hxx @@ -56,7 +56,7 @@ class SwInsertBookmarkDlg: public SvxStandardDialog SfxRequest& rReq; DECL_LINK(ModifyHdl, BookmarkCombo *); - DECL_LINK(DeleteHdl, void *); + DECL_LINK_TYPED(DeleteHdl, Button*, void); virtual void Apply() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/break.hxx b/sw/source/uibase/inc/break.hxx index 85ce67b0ce26..49664253dc9c 100644 --- a/sw/source/uibase/inc/break.hxx +++ b/sw/source/uibase/inc/break.hxx @@ -51,10 +51,11 @@ class SwBreakDlg: public SvxStandardDialog bool bHtmlMode; - DECL_LINK( ClickHdl, void * ); - DECL_LINK( PageNumHdl, CheckBox * ); + DECL_LINK_TYPED( ClickHdl, Button*, void ); + DECL_LINK( SelectHdl, void * ); + DECL_LINK_TYPED( PageNumHdl, Button*, void ); DECL_LINK(PageNumModifyHdl, void *); - DECL_LINK(OkHdl, void *); + DECL_LINK_TYPED(OkHdl, Button*, void); void CheckEnable(); diff --git a/sw/source/uibase/inc/changedb.hxx b/sw/source/uibase/inc/changedb.hxx index 8a3f95a3003c..6efb9212dd7a 100644 --- a/sw/source/uibase/inc/changedb.hxx +++ b/sw/source/uibase/inc/changedb.hxx @@ -47,8 +47,8 @@ class SwChangeDBDlg: public SvxStandardDialog SwFieldMgr *pMgr; DECL_LINK(TreeSelectHdl, void * = 0); - DECL_LINK(ButtonHdl, void *); - DECL_LINK(AddDBHdl, void *); + DECL_LINK_TYPED(ButtonHdl, Button*, void); + DECL_LINK_TYPED(AddDBHdl, Button*, void); virtual void Apply() SAL_OVERRIDE; void UpdateFields(); diff --git a/sw/source/uibase/inc/chrdlg.hxx b/sw/source/uibase/inc/chrdlg.hxx index 58366f7c3baa..8da147d50546 100644 --- a/sw/source/uibase/inc/chrdlg.hxx +++ b/sw/source/uibase/inc/chrdlg.hxx @@ -74,8 +74,8 @@ class SwCharURLPage : public SfxTabPage SvxMacroItem* pINetItem; bool bModified; - DECL_LINK(InsertFileHdl, void *); - DECL_LINK(EventHdl, void *); + DECL_LINK_TYPED(InsertFileHdl, Button*, void); + DECL_LINK_TYPED(EventHdl, Button*, void); public: SwCharURLPage( vcl::Window* pParent, diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx index 3150b3fc8e74..18985b33ed1b 100644 --- a/sw/source/uibase/inc/column.hxx +++ b/sw/source/uibase/inc/column.hxx @@ -61,7 +61,7 @@ class SwColumnDlg : public SfxModalDialog bool bFrameChanged : 1; DECL_LINK(ObjectHdl, ListBox*); - DECL_LINK(OkHdl, void *); + DECL_LINK_TYPED(OkHdl, Button*, void); public: SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh); @@ -141,11 +141,11 @@ class SwColumnPage : public SfxTabPage DECL_LINK( ColModify, NumericField * ); DECL_LINK( GapModify, MetricField * ); DECL_LINK( EdModify, MetricField * ); - DECL_LINK( AutoWidthHdl, CheckBox * ); + DECL_LINK_TYPED( AutoWidthHdl, Button *, void ); DECL_LINK( SetDefaultsHdl, ValueSet * ); - DECL_LINK(Up, void *); - DECL_LINK(Down, void *); + DECL_LINK_TYPED(Up, Button *, void); + DECL_LINK_TYPED(Down, Button *, void); DECL_LINK( UpdateColMgr, void* ); void Timeout(); diff --git a/sw/source/uibase/inc/convert.hxx b/sw/source/uibase/inc/convert.hxx index 39d4e4745182..aa57f2360343 100644 --- a/sw/source/uibase/inc/convert.hxx +++ b/sw/source/uibase/inc/convert.hxx @@ -55,10 +55,10 @@ class SwConvertTableDlg: public SfxModalDialog SwTableAutoFormat* pTAutoFormat; SwWrtShell* pShell; - DECL_LINK( AutoFormatHdl, PushButton* ); - DECL_LINK( BtnHdl, Button* ); - DECL_LINK(CheckBoxHdl, void * = 0); - DECL_LINK( ReapeatHeaderCheckBoxHdl, void* = 0); + DECL_LINK_TYPED( AutoFormatHdl, Button*, void ); + DECL_LINK_TYPED( BtnHdl, Button*, void ); + DECL_LINK_TYPED( CheckBoxHdl, Button* = 0, void ); + DECL_LINK_TYPED( ReapeatHeaderCheckBoxHdl, Button* = 0, void ); public: SwConvertTableDlg( SwView& rView, bool bToTable ); diff --git a/sw/source/uibase/inc/cption.hxx b/sw/source/uibase/inc/cption.hxx index 541bf43ee551..77927246d5ac 100644 --- a/sw/source/uibase/inc/cption.hxx +++ b/sw/source/uibase/inc/cption.hxx @@ -96,8 +96,8 @@ class SwCaptionDialog : public SvxStandardDialog DECL_LINK(SelectHdl, void *); DECL_LINK(ModifyHdl, void *); - DECL_LINK(OptionHdl, Button *); - DECL_LINK(CaptionHdl, void *); + DECL_LINK_TYPED(OptionHdl, Button *, void); + DECL_LINK_TYPED(CaptionHdl, Button *, void); virtual void Apply() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx index 789b197684a8..53088dea74b7 100644 --- a/sw/source/uibase/inc/dbinsdlg.hxx +++ b/sw/source/uibase/inc/dbinsdlg.hxx @@ -133,14 +133,14 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem SwTableRep* pRep; sal_Int32 nGBFormatLen; - DECL_LINK( PageHdl, Button* ); - DECL_LINK( AutoFormatHdl, PushButton* ); - DECL_LINK( TableFormatHdl, PushButton* ); - DECL_LINK( DBFormatHdl, Button* ); - DECL_LINK( TableToFromHdl, Button* ); + DECL_LINK_TYPED( PageHdl, Button*, void ); + DECL_LINK_TYPED( AutoFormatHdl, Button*, void ); + DECL_LINK_TYPED( TableFormatHdl, Button*, void ); + DECL_LINK_TYPED( DBFormatHdl, Button*, void ); + DECL_LINK_TYPED( TableToFromHdl, Button*, void ); DECL_LINK( SelectHdl, ListBox* ); DECL_LINK( DblClickHdl, ListBox* ); - DECL_LINK( HeaderHdl, Button* ); + DECL_LINK_TYPED( HeaderHdl, Button*, void ); bool SplitTextToColArr( const OUString& rText, _DB_Columns& rColArr, bool bInsField ); using SfxModalDialog::Notify; diff --git a/sw/source/uibase/inc/dbui.hxx b/sw/source/uibase/inc/dbui.hxx index 3d9c2d9d47f2..d6d81ba9d3e8 100644 --- a/sw/source/uibase/inc/dbui.hxx +++ b/sw/source/uibase/inc/dbui.hxx @@ -40,7 +40,7 @@ public: virtual ~CancelableDialog(); virtual void dispose() SAL_OVERRIDE; - void SetCancelHdl( const Link<>& rLink ); + void SetCancelHdl( const Link<Button*,void>& rLink ); void Show(); }; diff --git a/sw/source/uibase/inc/docfnote.hxx b/sw/source/uibase/inc/docfnote.hxx index 8d0eec4ff2b8..9c87e66af780 100644 --- a/sw/source/uibase/inc/docfnote.hxx +++ b/sw/source/uibase/inc/docfnote.hxx @@ -26,14 +26,14 @@ class SwWrtShell; class SwFootNoteOptionDlg :public SfxTabDialog { SwWrtShell &rSh; - Link<> aOldOkHdl; + Link<Button*, void> aOldOkHdl; sal_uInt16 m_nFootNoteId; sal_uInt16 m_nEndNoteId; virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SAL_OVERRIDE; - DECL_LINK( OkHdl, Button * ); + DECL_LINK_TYPED( OkHdl, Button *, void ); public: SwFootNoteOptionDlg(vcl::Window *pParent, SwWrtShell &rSh ); diff --git a/sw/source/uibase/inc/docstdlg.hxx b/sw/source/uibase/inc/docstdlg.hxx index ce769478e3b2..8cd7251e9ef2 100644 --- a/sw/source/uibase/inc/docstdlg.hxx +++ b/sw/source/uibase/inc/docstdlg.hxx @@ -40,7 +40,7 @@ protected: virtual bool FillItemSet( SfxItemSet *rSet) SAL_OVERRIDE; virtual void Reset (const SfxItemSet *rSet) SAL_OVERRIDE; - DECL_LINK(UpdateHdl, void *); + DECL_LINK_TYPED(UpdateHdl, Button*, void); private: VclPtr<FixedText> m_pPageNo; diff --git a/sw/source/uibase/inc/drpcps.hxx b/sw/source/uibase/inc/drpcps.hxx index 75b395717459..511ecc76b359 100644 --- a/sw/source/uibase/inc/drpcps.hxx +++ b/sw/source/uibase/inc/drpcps.hxx @@ -69,10 +69,10 @@ friend class SwDropCapsPict; virtual sfxpg DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE; void FillSet( SfxItemSet &rSet ); - DECL_LINK(ClickHdl, void *); + DECL_LINK_TYPED(ClickHdl, Button*, void); DECL_LINK( ModifyHdl, Edit * ); DECL_LINK(SelectHdl, void *); - DECL_LINK(WholeWordHdl, void *); + DECL_LINK_TYPED(WholeWordHdl, Button*, void); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; diff --git a/sw/source/uibase/inc/envlop.hxx b/sw/source/uibase/inc/envlop.hxx index 44595cb91444..853ffc8e6196 100644 --- a/sw/source/uibase/inc/envlop.hxx +++ b/sw/source/uibase/inc/envlop.hxx @@ -91,8 +91,8 @@ class SwEnvPage : public SfxTabPage OUString sActDBName; DECL_LINK( DatabaseHdl, ListBox * ); - DECL_LINK(FieldHdl, void *); - DECL_LINK(SenderHdl, void *); + DECL_LINK_TYPED(FieldHdl, Button*, void ); + DECL_LINK_TYPED(SenderHdl, Button*, void ); void InitDatabaseBox(); diff --git a/sw/source/uibase/inc/fldedt.hxx b/sw/source/uibase/inc/fldedt.hxx index b7bf377fcd9a..04bc3dab649f 100644 --- a/sw/source/uibase/inc/fldedt.hxx +++ b/sw/source/uibase/inc/fldedt.hxx @@ -32,8 +32,8 @@ class SwFieldEditDlg : public SfxSingleTabDialog VclPtr<PushButton> m_pNextBT; VclPtr<PushButton> m_pAddressBT; - DECL_LINK(AddressHdl, void *); - DECL_LINK(NextPrevHdl, Button *); + DECL_LINK_TYPED(AddressHdl, Button *, void); + DECL_LINK_TYPED(NextPrevHdl, Button *, void); void Init(); VclPtr<SfxTabPage> CreatePage(sal_uInt16 nGroup); @@ -45,7 +45,7 @@ public: virtual ~SwFieldEditDlg(); virtual void dispose() SAL_OVERRIDE; - DECL_LINK(OKHdl, void *); + DECL_LINK_TYPED(OKHdl, Button*, void); virtual short Execute() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/fldtdlg.hxx b/sw/source/uibase/inc/fldtdlg.hxx index cab774e12dd0..3f89dc6a8cee 100644 --- a/sw/source/uibase/inc/fldtdlg.hxx +++ b/sw/source/uibase/inc/fldtdlg.hxx @@ -50,8 +50,8 @@ public: SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent); virtual ~SwFieldDlg(); - DECL_LINK(OKHdl, void *); - DECL_LINK(CancelHdl, void *); + DECL_LINK_TYPED(OKHdl, Button*, void); + DECL_LINK_TYPED(CancelHdl, Button*, void); void Initialize(SfxChildWinInfo *pInfo); void ReInitDlg(); diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index b603d5b70430..37332fb75c1a 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -131,19 +131,20 @@ class SwFrmPage: public SfxTabPage virtual sfxpg DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE; DECL_LINK(RangeModifyHdl, void *); - DECL_LINK(AnchorTypeHdl, void *); + DECL_LINK_TYPED(RangeModifyClickHdl, Button*, void); + DECL_LINK_TYPED(AnchorTypeHdl, Button*, void); DECL_LINK( PosHdl, ListBox * ); DECL_LINK( RelHdl, ListBox * ); void InitPos(RndStdIds eId, sal_Int16 nH, sal_Int16 nHRel, sal_Int16 nV, sal_Int16 nVRel, long nX, long nY); - DECL_LINK(RealSizeHdl, void *); - DECL_LINK( RelSizeClickHdl, CheckBox * ); - DECL_LINK(MirrorHdl, void *); + DECL_LINK_TYPED(RealSizeHdl, Button *, void); + DECL_LINK_TYPED( RelSizeClickHdl, Button *, void ); + DECL_LINK_TYPED(MirrorHdl, Button *, void); - DECL_LINK( AutoWidthClickHdl, void* ); - DECL_LINK( AutoHeightClickHdl, void* ); + DECL_LINK_TYPED( AutoWidthClickHdl, Button *, void); + DECL_LINK_TYPED( AutoHeightClickHdl, Button *, void); // update example void UpdateExample(); @@ -221,8 +222,8 @@ class SwGrfExtPage: public SfxTabPage bool bHtmlMode; // handler for mirroring - DECL_LINK(MirrorHdl, void *); - DECL_LINK(BrowseHdl, void *); + DECL_LINK_TYPED(MirrorHdl, Button*, void); + DECL_LINK_TYPED(BrowseHdl, Button*, void); virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE; virtual ~SwGrfExtPage(); @@ -253,7 +254,7 @@ class SwFrmURLPage : public SfxTabPage VclPtr<CheckBox> pServerCB; VclPtr<CheckBox> pClientCB; - DECL_LINK(InsertFileHdl, void *); + DECL_LINK_TYPED(InsertFileHdl, Button*, void); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; diff --git a/sw/source/uibase/inc/glosbib.hxx b/sw/source/uibase/inc/glosbib.hxx index bcfe4a229eae..1808a47fca21 100644 --- a/sw/source/uibase/inc/glosbib.hxx +++ b/sw/source/uibase/inc/glosbib.hxx @@ -92,10 +92,10 @@ class SwGlossaryGroupDlg : public SvxStandardDialog protected: virtual void Apply() SAL_OVERRIDE; DECL_LINK( SelectHdl, SvTabListBox* ); - DECL_LINK(NewHdl, void *); - DECL_LINK( DeleteHdl, Button* ); + DECL_LINK_TYPED(NewHdl, Button *, void); + DECL_LINK_TYPED( DeleteHdl, Button*, void ); DECL_LINK(ModifyHdl, void *); - DECL_LINK(RenameHdl, void *); + DECL_LINK_TYPED(RenameHdl, Button *, void); public: SwGlossaryGroupDlg(vcl::Window * pParent, diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx index d71b7922953b..f8cd535738f0 100644 --- a/sw/source/uibase/inc/glossary.hxx +++ b/sw/source/uibase/inc/glossary.hxx @@ -128,11 +128,11 @@ class SwGlossaryDlg : public SvxStandardDialog DECL_LINK( GrpSelect, SvTreeListBox * ); DECL_LINK( MenuHdl, Menu * ); DECL_LINK_TYPED( EnableHdl, Menu *, bool ); - DECL_LINK(BibHdl, void *); + DECL_LINK_TYPED(BibHdl, Button *, void); DECL_LINK_TYPED(EditHdl, MenuButton *, void); - DECL_LINK(InsertHdl, void *); - DECL_LINK( PathHdl, Button * ); - DECL_LINK( CheckBoxHdl, CheckBox * ); + DECL_LINK_TYPED(InsertHdl, Button *, void); + DECL_LINK_TYPED( PathHdl, Button *, void ); + DECL_LINK_TYPED( CheckBoxHdl, Button*, void ); DECL_LINK( PreviewLoadedHdl, void * ); virtual void Apply() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/inpdlg.hxx b/sw/source/uibase/inc/inpdlg.hxx index 2be62a3e1a8e..187a02c1b320 100644 --- a/sw/source/uibase/inc/inpdlg.hxx +++ b/sw/source/uibase/inc/inpdlg.hxx @@ -49,7 +49,7 @@ class SwFieldInputDlg: public SvxStandardDialog VclPtr<OKButton> m_pOKBT; VclPtr<PushButton> m_pNextBT; - DECL_LINK(NextHdl, void *); + DECL_LINK_TYPED(NextHdl, Button*, void); public: SwFieldInputDlg( vcl::Window *pParent, SwWrtShell &rSh, SwField* pField, bool bNextButton = false ); diff --git a/sw/source/uibase/inc/insfnote.hxx b/sw/source/uibase/inc/insfnote.hxx index 4ae31b247d34..b292f3106c66 100644 --- a/sw/source/uibase/inc/insfnote.hxx +++ b/sw/source/uibase/inc/insfnote.hxx @@ -54,11 +54,11 @@ class SwInsFootNoteDlg: public SvxStandardDialog VclPtr<PushButton> m_pPrevBT; VclPtr<PushButton> m_pNextBT; - DECL_LINK(NumberCharHdl, void *); + DECL_LINK_TYPED(NumberCharHdl, Button *, void); DECL_LINK(NumberEditHdl, void *); - DECL_LINK(NumberAutoBtnHdl, void *); - DECL_LINK(NumberExtCharHdl, void *); - DECL_LINK(NextPrevHdl, Button *); + DECL_LINK_TYPED(NumberAutoBtnHdl, Button *, void); + DECL_LINK_TYPED(NumberExtCharHdl, Button *, void); + DECL_LINK_TYPED(NextPrevHdl, Button *, void); virtual void Apply() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/instable.hxx b/sw/source/uibase/inc/instable.hxx index b10625b96087..ba9b57958d53 100644 --- a/sw/source/uibase/inc/instable.hxx +++ b/sw/source/uibase/inc/instable.hxx @@ -55,12 +55,12 @@ class SwInsTableDlg : public SfxModalDialog SwTableAutoFormat* pTAutoFormat; sal_Int64 nEnteredValRepeatHeaderNF; - DECL_LINK( ModifyName, Edit * ); - DECL_LINK( ModifyRowCol, NumericField * ); - DECL_LINK( AutoFormatHdl, PushButton* ); - DECL_LINK(OKHdl, void*); - DECL_LINK(CheckBoxHdl, void * = 0); - DECL_LINK( ReapeatHeaderCheckBoxHdl, void* = 0); + DECL_LINK( ModifyName, Edit* ); + DECL_LINK( ModifyRowCol, NumericField* ); + DECL_LINK_TYPED( AutoFormatHdl, Button*, void ); + DECL_LINK_TYPED(OKHdl, Button*, void); + DECL_LINK_TYPED(CheckBoxHdl, Button* = 0, void); + DECL_LINK_TYPED( ReapeatHeaderCheckBoxHdl, Button* = 0, void); DECL_LINK( ModifyRepeatHeaderNF_Hdl, void* ); public: diff --git a/sw/source/uibase/inc/javaedit.hxx b/sw/source/uibase/inc/javaedit.hxx index 1958fce891b2..f436557ae5f3 100644 --- a/sw/source/uibase/inc/javaedit.hxx +++ b/sw/source/uibase/inc/javaedit.hxx @@ -56,11 +56,11 @@ private: sfx2::FileDialogHelper* pFileDlg; VclPtr<vcl::Window> pOldDefDlgParent; - DECL_LINK(OKHdl, void *); - DECL_LINK(PrevHdl, void *); - DECL_LINK(NextHdl, void *); - DECL_LINK(RadioButtonHdl, void *); - DECL_LINK(InsertFileHdl, PushButton *); + DECL_LINK_TYPED(OKHdl, Button*, void); + DECL_LINK_TYPED(PrevHdl, Button*, void); + DECL_LINK_TYPED(NextHdl, Button*, void); + DECL_LINK_TYPED(RadioButtonHdl, Button*, void); + DECL_LINK_TYPED(InsertFileHdl, Button *, void); DECL_LINK_TYPED(DlgClosedHdl, sfx2::FileDialogHelper *, void); virtual void Apply() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/linenum.hxx b/sw/source/uibase/inc/linenum.hxx index d73af8c83916..2d18ef619da8 100644 --- a/sw/source/uibase/inc/linenum.hxx +++ b/sw/source/uibase/inc/linenum.hxx @@ -48,8 +48,8 @@ private: VclPtr<CheckBox> m_pRestartEachPageCB; VclPtr<CheckBox> m_pNumberingOnCB; VclPtr<CheckBox> m_pNumberingOnFooterHeader; - DECL_LINK(OKHdl, void *); - DECL_LINK(LineOnOffHdl, void * = 0); + DECL_LINK_TYPED(OKHdl, Button*, void); + DECL_LINK_TYPED(LineOnOffHdl, Button* = 0, void); DECL_LINK(ModifyHdl, void * = 0); public: diff --git a/sw/source/uibase/inc/mailconfigpage.hxx b/sw/source/uibase/inc/mailconfigpage.hxx index e502ea9fef8c..81f4588a13f6 100644 --- a/sw/source/uibase/inc/mailconfigpage.hxx +++ b/sw/source/uibase/inc/mailconfigpage.hxx @@ -50,9 +50,9 @@ class SwMailConfigPage : public SfxTabPage SwMailMergeConfigItem* m_pConfigItem; - DECL_LINK(ReplyToHdl, CheckBox*); - DECL_LINK(AuthenticationHdl, void *); - DECL_LINK(TestHdl, void *); + DECL_LINK_TYPED(ReplyToHdl, Button*, void); + DECL_LINK_TYPED(AuthenticationHdl, Button*, void); + DECL_LINK_TYPED(TestHdl, Button*, void); public: SwMailConfigPage( vcl::Window* pParent, const SfxItemSet& rSet ); diff --git a/sw/source/uibase/inc/mailmrge.hxx b/sw/source/uibase/inc/mailmrge.hxx index 8c221b5e7d07..085b535d0642 100644 --- a/sw/source/uibase/inc/mailmrge.hxx +++ b/sw/source/uibase/inc/mailmrge.hxx @@ -104,12 +104,12 @@ class SwMailMergeDlg : public SvxStandardDialog Size m_aDialogSize; OUString m_sSaveFilter; - DECL_LINK( ButtonHdl, Button* ); - DECL_LINK(InsertPathHdl, void *); - DECL_LINK( OutputTypeHdl, RadioButton* ); - DECL_LINK( FilenameHdl, CheckBox* ); + DECL_LINK_TYPED( ButtonHdl, Button*, void ); + DECL_LINK_TYPED( InsertPathHdl, Button*, void); + DECL_LINK_TYPED( OutputTypeHdl, Button*, void ); + DECL_LINK_TYPED( FilenameHdl, Button*, void ); DECL_LINK(ModifyHdl, void *); - DECL_LINK( SaveTypeHdl, RadioButton* ); + DECL_LINK_TYPED( SaveTypeHdl, Button*, void ); virtual void Apply() SAL_OVERRIDE; bool ExecQryShell(); diff --git a/sw/source/uibase/inc/num.hxx b/sw/source/uibase/inc/num.hxx index c4fa047b9440..00c198be33bf 100644 --- a/sw/source/uibase/inc/num.hxx +++ b/sw/source/uibase/inc/num.hxx @@ -94,8 +94,8 @@ class SwNumPositionTabPage : public SfxTabPage DECL_LINK( LevelHdl, ListBox * ); DECL_LINK(EditModifyHdl, void *); DECL_LINK( DistanceHdl, MetricField * ); - DECL_LINK( RelativeHdl, CheckBox * ); - DECL_LINK(StandardHdl, void *); + DECL_LINK_TYPED( RelativeHdl, Button*, void ); + DECL_LINK_TYPED(StandardHdl, Button*, void); void InitPosAndSpaceMode(); void ShowControlsDependingOnPosAndSpaceMode(); @@ -150,7 +150,7 @@ class SwSvxNumBulletTabDialog : public SfxTabDialog protected: virtual short Ok() SAL_OVERRIDE; virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) SAL_OVERRIDE; - DECL_LINK(RemoveNumberingHdl, void *); + DECL_LINK_TYPED(RemoveNumberingHdl, Button*, void); public: SwSvxNumBulletTabDialog(vcl::Window* pParent, const SfxItemSet* pSwItemSet, diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx index 2ca04b2b582b..ed3630c368a3 100644 --- a/sw/source/uibase/inc/numpara.hxx +++ b/sw/source/uibase/inc/numpara.hxx @@ -53,10 +53,10 @@ class SwParagraphNumTabPage : public SfxTabPage bool bModified : 1; bool bCurNumrule : 1; - DECL_LINK(NewStartHdl_Impl, void *); + DECL_LINK_TYPED(NewStartHdl_Impl, Button*, void); DECL_LINK( StyleHdl_Impl, ListBox* ); - DECL_LINK(LineCountHdl_Impl, void *); - DECL_LINK(EditNumStyleHdl_Impl, void *); + DECL_LINK_TYPED(LineCountHdl_Impl, Button*, void); + DECL_LINK_TYPED(EditNumStyleHdl_Impl, Button*, void); DECL_LINK(EditNumStyleSelectHdl_Impl, void *); static const sal_uInt16 aPageRg[]; diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx index d48bf227ef1c..f247d6c76af1 100644 --- a/sw/source/uibase/inc/optcomp.hxx +++ b/sw/source/uibase/inc/optcomp.hxx @@ -51,7 +51,7 @@ private: // handler DECL_LINK(SelectHdl, void *); - DECL_LINK(UseAsDefaultHdl, void *); + DECL_LINK_TYPED(UseAsDefaultHdl, Button*, void); // private methods void InitControls( const SfxItemSet& rSet ); diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index 5ac39f582816..ce91d28fcff1 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -60,7 +60,7 @@ private: sal_Int32 m_nOldLinkMode; DECL_LINK(MetricHdl, void *); - DECL_LINK(StandardizedPageCountCheckHdl, void *); + DECL_LINK_TYPED(StandardizedPageCountCheckHdl, Button*, void); public: SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet); diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index 1d096fa8fb28..e6b6a89a50e1 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -60,7 +60,7 @@ class SwContentOptPage : public SfxTabPage VclPtr<FixedText> m_pMetricLabel; VclPtr<ListBox> m_pMetricLB; - DECL_LINK(VertRulerHdl, CheckBox*); + DECL_LINK_TYPED(VertRulerHdl, Button*, void); public: SwContentOptPage( vcl::Window* pParent, const SfxItemSet& rSet); virtual ~SwContentOptPage(); @@ -105,7 +105,7 @@ class SwAddPrinterTabPage : public SfxTabPage bool bAttrModified; bool bPreview; - DECL_LINK(AutoClickHdl, void *); + DECL_LINK_TYPED(AutoClickHdl, Button*, void); DECL_LINK(SelectHdl, void *); public: @@ -173,7 +173,7 @@ class SwStdFontTabPage : public SfxTabPage OUString sScriptAsian; OUString sScriptComplex; - DECL_LINK(StandardHdl, void *); + DECL_LINK_TYPED(StandardHdl, Button*, void); DECL_LINK(ModifyHdl, ComboBox * ); DECL_LINK(ModifyHeightHdl, FontSizeBox * ); DECL_LINK(LoseFocusHdl, ComboBox * ); @@ -219,7 +219,7 @@ class SwTableOptionsTabPage : public SfxTabPage SwWrtShell* pWrtShell; bool bHTMLMode; - DECL_LINK(CheckBoxHdl, void *); + DECL_LINK_TYPED(CheckBoxHdl, Button*, void); public: SwTableOptionsTabPage(vcl::Window* pParent, const SfxItemSet& rSet); @@ -388,7 +388,7 @@ private: bool bAttrModified; void Init(); - DECL_LINK(AutoClickHdl, void*); + DECL_LINK_TYPED(AutoClickHdl, Button*, void); }; #endif // DBG_UTIL @@ -403,8 +403,8 @@ class SwCompareOptionsTabPage : public SfxTabPage VclPtr<NumericField> m_pLenNF; VclPtr<CheckBox> m_pStoreRsidCB; - DECL_LINK(ComparisonHdl, void *); - DECL_LINK(IgnoreHdl, void *); + DECL_LINK_TYPED(ComparisonHdl, Button*, void); + DECL_LINK_TYPED(IgnoreHdl, Button*, void); public: SwCompareOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx index 78f96c8c0dbb..bbb1dc8bca31 100644 --- a/sw/source/uibase/inc/outline.hxx +++ b/sw/source/uibase/inc/outline.hxx @@ -59,8 +59,8 @@ class SwOutlineTabDialog : public SfxTabDialog bool bModified : 1; protected: - DECL_LINK(CancelHdl, void *); - DECL_LINK( FormHdl, Button * ); + DECL_LINK_TYPED(CancelHdl, Button*, void); + DECL_LINK_TYPED( FormHdl, Button *, void ); DECL_LINK( MenuSelectHdl, Menu * ); virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/pgfnote.hxx b/sw/source/uibase/inc/pgfnote.hxx index 223fe3851f7a..dfc2227327d7 100644 --- a/sw/source/uibase/inc/pgfnote.hxx +++ b/sw/source/uibase/inc/pgfnote.hxx @@ -57,8 +57,8 @@ private: VclPtr<MetricField> m_pLineLengthEdit; VclPtr<MetricField> m_pLineDistEdit; - DECL_LINK(HeightPage, void *); - DECL_LINK(HeightMetric, void *); + DECL_LINK_TYPED(HeightPage, Button*, void); + DECL_LINK_TYPED(HeightMetric, Button*, void); DECL_LINK(HeightModify, void *); DECL_LINK( LineWidthChanged_Impl, void * ); DECL_LINK( LineColorSelected_Impl, void * ); diff --git a/sw/source/uibase/inc/pggrid.hxx b/sw/source/uibase/inc/pggrid.hxx index 86aae8d5637c..0274619df91b 100644 --- a/sw/source/uibase/inc/pggrid.hxx +++ b/sw/source/uibase/inc/pggrid.hxx @@ -71,11 +71,12 @@ class SwTextGridPage: public SfxTabPage void PutGridItem(SfxItemSet& rSet); static void SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 nValue ); - DECL_LINK(GridTypeHdl, RadioButton*); + DECL_LINK_TYPED(GridTypeHdl, Button*, void); DECL_LINK(CharorLineChangedHdl, SpinField*); DECL_LINK(TextSizeChangedHdl, SpinField*); DECL_LINK(GridModifyHdl, void*); - DECL_LINK(DisplayGridHdl, void *); + DECL_LINK_TYPED(GridModifyClickHdl, Button*, void); + DECL_LINK_TYPED(DisplayGridHdl, Button*, void); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx index 7b4d1dec3c61..368509214b22 100644 --- a/sw/source/uibase/inc/regionsw.hxx +++ b/sw/source/uibase/inc/regionsw.hxx @@ -108,21 +108,21 @@ class SwEditRegionDlg : public SfxModalDialog DECL_LINK( GetFirstEntryHdl, SvTreeListBox * ); DECL_LINK( DeselectHdl, SvTreeListBox * ); - DECL_LINK(OkHdl, void *); + DECL_LINK_TYPED(OkHdl, Button*, void); DECL_LINK(NameEditHdl, void *); DECL_LINK( ConditionEditHdl, Edit * ); - DECL_LINK( ChangePasswdHdl, Button * ); - DECL_LINK( ChangeProtectHdl, TriStateBox * ); - DECL_LINK( ChangeHideHdl, TriStateBox * ); + DECL_LINK_TYPED( ChangePasswdHdl, Button *, void ); + DECL_LINK_TYPED( ChangeProtectHdl, Button *, void ); + DECL_LINK_TYPED( ChangeHideHdl, Button *, void ); // #114856# edit in readonly sections - DECL_LINK( ChangeEditInReadonlyHdl, TriStateBox * ); - DECL_LINK(ChangeDismissHdl, void *); - DECL_LINK( UseFileHdl, CheckBox* ); - DECL_LINK(FileSearchHdl, void *); - DECL_LINK(OptionsHdl, void *); + DECL_LINK_TYPED( ChangeEditInReadonlyHdl, Button *, void ); + DECL_LINK_TYPED(ChangeDismissHdl, Button*, void); + DECL_LINK_TYPED( UseFileHdl, Button*, void ); + DECL_LINK_TYPED(FileSearchHdl, Button*, void); + DECL_LINK_TYPED(OptionsHdl, Button*, void); DECL_LINK( FileNameHdl, Edit* ); - DECL_LINK( DDEHdl, CheckBox* ); + DECL_LINK_TYPED( DDEHdl, Button*, void ); DECL_LINK_TYPED( DlgClosedHdl, sfx2::FileDialogHelper*, void ); DECL_LINK( SubRegionEventHdl, VclWindowEvent * ); @@ -171,13 +171,13 @@ class SwInsertSectionTabPage : public SfxTabPage sfx2::DocumentInserter* m_pDocInserter; VclPtr<vcl::Window> m_pOldDefDlgParent; - DECL_LINK( ChangeHideHdl, CheckBox * ); - DECL_LINK( ChangeProtectHdl, CheckBox * ); - DECL_LINK( ChangePasswdHdl, Button * ); + DECL_LINK_TYPED( ChangeHideHdl, Button *, void ); + DECL_LINK_TYPED( ChangeProtectHdl, Button *, void ); + DECL_LINK_TYPED( ChangePasswdHdl, Button *, void ); DECL_LINK(NameEditHdl, void *); - DECL_LINK( UseFileHdl, CheckBox* ); - DECL_LINK(FileSearchHdl, void *); - DECL_LINK( DDEHdl, CheckBox* ); + DECL_LINK_TYPED( UseFileHdl, Button*, void ); + DECL_LINK_TYPED(FileSearchHdl, Button*, void ); + DECL_LINK_TYPED( DDEHdl, Button*, void ); DECL_LINK_TYPED( DlgClosedHdl, sfx2::FileDialogHelper*, void ); public: @@ -222,7 +222,7 @@ class SwSectionFootnoteEndTabPage : public SfxTabPage VclPtr<FixedText> pEndSuffixFT; VclPtr<Edit> pEndSuffixED; - DECL_LINK( FootEndHdl, CheckBox * ); + DECL_LINK_TYPED( FootEndHdl, Button*, void ); void ResetState( bool bFootnote, const SwFormatFootnoteEndAtTextEnd& ); public: diff --git a/sw/source/uibase/inc/srtdlg.hxx b/sw/source/uibase/inc/srtdlg.hxx index 44d912562767..69de0e969bed 100644 --- a/sw/source/uibase/inc/srtdlg.hxx +++ b/sw/source/uibase/inc/srtdlg.hxx @@ -77,10 +77,10 @@ class SwSortDlg : public SvxStandardDialog virtual void Apply() SAL_OVERRIDE; sal_Unicode GetDelimChar() const; - DECL_LINK( CheckHdl, void * ); - DECL_LINK( DelimHdl, RadioButton* ); + DECL_LINK_TYPED( CheckHdl, Button*, void ); + DECL_LINK_TYPED( DelimHdl, Button*, void ); DECL_LINK( LanguageHdl, ListBox* ); - DECL_LINK(DelimCharHdl, void *); + DECL_LINK_TYPED(DelimCharHdl, Button*,void); public: SwSortDlg(vcl::Window * pParent, SwWrtShell &rSh); diff --git a/sw/source/uibase/inc/swrenamexnameddlg.hxx b/sw/source/uibase/inc/swrenamexnameddlg.hxx index 84967e6fd9df..523dcce86a26 100644 --- a/sw/source/uibase/inc/swrenamexnameddlg.hxx +++ b/sw/source/uibase/inc/swrenamexnameddlg.hxx @@ -41,7 +41,7 @@ class SwRenameXNamedDlg : public ModalDialog ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xSecondAccess; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xThirdAccess; - DECL_LINK(OkHdl, void *); + DECL_LINK_TYPED(OkHdl, Button*, void); DECL_LINK(ModifyHdl, Edit*); public: diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx index 6934ec058952..99ef88a13a60 100644 --- a/sw/source/uibase/inc/swuiccoll.hxx +++ b/sw/source/uibase/inc/swuiccoll.hxx @@ -52,8 +52,9 @@ class SwCondCollPage : public SfxTabPage virtual sfxpg DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE; - DECL_LINK( OnOffHdl, CheckBox* ); + DECL_LINK_TYPED( OnOffHdl, Button*, void ); DECL_LINK( AssignRemoveHdl, PushButton*); + DECL_LINK_TYPED( AssignRemoveClickHdl, Button*, void); DECL_LINK( SelectHdl, ListBox* ); using SfxTabPage::ActivatePage; diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 3a82b385040b..2f08b236cb40 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -94,7 +94,7 @@ class SwMultiTOXTabDialog : public SfxTabDialog SwTOXDescription* CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX); DECL_LINK(CreateExample_Hdl, void*); - DECL_LINK(ShowPreviewHdl, void*); + DECL_LINK_TYPED(ShowPreviewHdl, Button*, void); public: SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet& rSet, @@ -203,13 +203,13 @@ class SwTOXSelectTabPage : public SfxTabPage bool m_bWaitingInitialSettings; DECL_LINK(TOXTypeHdl, ListBox* ); - DECL_LINK(AddStylesHdl, PushButton* ); + DECL_LINK_TYPED(AddStylesHdl, Button*, void ); DECL_LINK_TYPED(MenuEnableHdl, Menu*, bool); DECL_LINK(MenuExecuteHdl, Menu*); DECL_LINK(LanguageHdl, ListBox*); - DECL_LINK(CheckBoxHdl, CheckBox* ); - DECL_LINK(RadioButtonHdl, void *); + DECL_LINK_TYPED(CheckBoxHdl, Button*, void ); + DECL_LINK_TYPED(RadioButtonHdl, Button*, void); DECL_LINK(ModifyHdl, void*); void ApplyTOXDescription(); @@ -272,7 +272,7 @@ class SwTokenWindow : public VclHBox, public VclBuilderContainer DECL_LINK(TbxFocusHdl, SwTOXEdit* ); DECL_LINK(NextItemBtnHdl, SwTOXButton* ); DECL_LINK(TbxFocusBtnHdl, SwTOXButton* ); - DECL_LINK(ScrollHdl, ImageButton* ); + DECL_LINK_TYPED(ScrollHdl, Button*, void ); void SetActiveControl(Control* pSet); @@ -411,24 +411,25 @@ class SwTOXEntryTabPage : public SfxTabPage bool bInLevelHdl; DECL_LINK(StyleSelectHdl, ListBox*); - DECL_LINK(EditStyleHdl, PushButton*); - DECL_LINK(InsertTokenHdl, PushButton*); + DECL_LINK_TYPED(EditStyleHdl, Button*, void); + DECL_LINK_TYPED(InsertTokenHdl, Button*, void); DECL_LINK(LevelHdl, SvTreeListBox*); - DECL_LINK(AutoRightHdl, CheckBox*); + DECL_LINK_TYPED(AutoRightHdl, Button*, void); DECL_LINK(TokenSelectedHdl, SwFormToken*); DECL_LINK(TabPosHdl, MetricField*); DECL_LINK(FillCharHdl, ComboBox*); - DECL_LINK(RemoveInsertAuthHdl, PushButton*); - DECL_LINK(SortKeyHdl, RadioButton*); + DECL_LINK_TYPED(RemoveInsertAuthHdl, Button*, void); + DECL_LINK_TYPED(SortKeyHdl, Button*, void); DECL_LINK(ChapterInfoHdl, ListBox*); DECL_LINK(ChapterInfoOutlineHdl, NumericField*); DECL_LINK(NumberFormatHdl, ListBox*); - DECL_LINK(AllLevelsHdl, void *); + DECL_LINK_TYPED(AllLevelsHdl, Button*, void); void WriteBackLevel(); void UpdateDescriptor(); DECL_LINK(ModifyHdl, void*); + DECL_LINK_TYPED(ModifyClickHdl, Button*, void); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; @@ -464,11 +465,11 @@ class SwTOXStylesTabPage : public SfxTabPage SwForm* m_pCurrentForm; - DECL_LINK( EditStyleHdl, Button *); - DECL_LINK(StdHdl, void *); + DECL_LINK_TYPED( EditStyleHdl, Button *, void); + DECL_LINK_TYPED(StdHdl, Button*, void); DECL_LINK(EnableSelectHdl, void *); DECL_LINK(DoubleClickHdl, void *); - DECL_LINK(AssignHdl, void *); + DECL_LINK_TYPED(AssignHdl, Button*, void); void Modify(); SwForm& GetForm() diff --git a/sw/source/uibase/inc/swuiidxmrk.hxx b/sw/source/uibase/inc/swuiidxmrk.hxx index 60558569af64..40772ab5519d 100644 --- a/sw/source/uibase/inc/swuiidxmrk.hxx +++ b/sw/source/uibase/inc/swuiidxmrk.hxx @@ -107,17 +107,17 @@ class SwIndexMarkPane void InsertMark(); void UpdateMark(); - DECL_LINK( InsertHdl, Button * ); - DECL_LINK(CloseHdl, void *); - DECL_LINK(DelHdl, void *); - DECL_LINK(NextHdl, void *); - DECL_LINK(NextSameHdl, void *); - DECL_LINK(PrevHdl, void *); - DECL_LINK(PrevSameHdl, void *); - DECL_LINK( ModifyHdl, ListBox* ); + DECL_LINK_TYPED( InsertHdl, Button *, void ); + DECL_LINK_TYPED(CloseHdl, Button*, void); + DECL_LINK_TYPED(DelHdl, Button*, void); + DECL_LINK_TYPED(NextHdl, Button*, void); + DECL_LINK_TYPED(NextSameHdl, Button*, void); + DECL_LINK_TYPED(PrevHdl, Button*, void); + DECL_LINK_TYPED(PrevSameHdl, Button*, void); + DECL_LINK( ModifyHdl, ListBox* pBox ); DECL_LINK( KeyDCBModifyHdl, ComboBox * ); - DECL_LINK(NewUserIdxHdl, void *); - DECL_LINK( SearchTypeHdl, CheckBox*); + DECL_LINK_TYPED(NewUserIdxHdl, Button*, void); + DECL_LINK_TYPED( SearchTypeHdl, Button*, void); DECL_LINK( PhoneticEDModifyHdl, Edit * ); //this method updates the values from 'nLangForPhoneticReading' and 'bIsPhoneticReadingEnabled' @@ -205,11 +205,11 @@ class SwAuthorMarkPane ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xBibAccess; - DECL_LINK(InsertHdl, void *); - DECL_LINK(CloseHdl, void *); - DECL_LINK(CreateEntryHdl, PushButton*); + DECL_LINK_TYPED(InsertHdl, Button*, void); + DECL_LINK_TYPED(CloseHdl, Button*, void); + DECL_LINK_TYPED(CreateEntryHdl, Button*, void); DECL_LINK(CompEntryHdl, ListBox*); - DECL_LINK(ChangeSourceHdl, RadioButton*); + DECL_LINK_TYPED(ChangeSourceHdl, Button*, void); DECL_LINK(IsEntryAllowedHdl, Edit*); DECL_LINK(EditModifyHdl, Edit*); diff --git a/sw/source/uibase/inc/syncbtn.hxx b/sw/source/uibase/inc/syncbtn.hxx index e2fa361c4ea9..6f6d8f5c7d12 100644 --- a/sw/source/uibase/inc/syncbtn.hxx +++ b/sw/source/uibase/inc/syncbtn.hxx @@ -27,7 +27,7 @@ class SwSyncBtnDlg : public SfxFloatingWindow { VclPtr<PushButton> m_pSyncBtn; - DECL_STATIC_LINK( SwSyncBtnDlg, BtnHdl, void* ); + DECL_STATIC_LINK_TYPED( SwSyncBtnDlg, BtnHdl, Button*, void ); public: SwSyncBtnDlg(SfxBindings*, SfxChildWindow*, vcl::Window *pParent); diff --git a/sw/source/uibase/inc/tautofmt.hxx b/sw/source/uibase/inc/tautofmt.hxx index 72e62c2fe631..4c619b112027 100644 --- a/sw/source/uibase/inc/tautofmt.hxx +++ b/sw/source/uibase/inc/tautofmt.hxx @@ -70,11 +70,11 @@ class SwAutoFormatDlg : public SfxModalDialog void Init( const SwTableAutoFormat* pSelFormat ); void UpdateChecks( const SwTableAutoFormat&, bool bEnableBtn ); - DECL_LINK( CheckHdl, Button * ); - DECL_LINK(OkHdl, void *); - DECL_LINK( AddHdl, void * ); - DECL_LINK( RemoveHdl, void * ); - DECL_LINK( RenameHdl, void * ); + DECL_LINK_TYPED( CheckHdl, Button*, void ); + DECL_LINK_TYPED(OkHdl, Button*, void); + DECL_LINK_TYPED( AddHdl, Button*, void ); + DECL_LINK_TYPED( RemoveHdl, Button*, void ); + DECL_LINK_TYPED( RenameHdl, Button*, void ); DECL_LINK( SelFormatHdl, void * ); public: diff --git a/sw/source/uibase/inc/titlepage.hxx b/sw/source/uibase/inc/titlepage.hxx index 40789e8ca2c3..d461e5a5fda5 100644 --- a/sw/source/uibase/inc/titlepage.hxx +++ b/sw/source/uibase/inc/titlepage.hxx @@ -53,13 +53,13 @@ private: sal_uInt16 GetInsertPosition() const; - DECL_LINK(OKHdl, void *); - DECL_LINK(EditHdl, void *); - DECL_LINK(RestartNumberingHdl, void *); - DECL_LINK(SetPageNumberHdl, void *); + DECL_LINK_TYPED(OKHdl, Button*, void); + DECL_LINK_TYPED(EditHdl, Button*, void); + DECL_LINK_TYPED(RestartNumberingHdl, Button*, void); + DECL_LINK_TYPED(SetPageNumberHdl, Button*, void); DECL_LINK(UpHdl, void *); DECL_LINK(DownHdl, void *); - DECL_LINK(StartPageHdl, void *); + DECL_LINK_TYPED(StartPageHdl, Button*, void); public: SwTitlePageDlg( vcl::Window *pParent ); virtual ~SwTitlePageDlg(); diff --git a/sw/source/uibase/inc/wordcountdialog.hxx b/sw/source/uibase/inc/wordcountdialog.hxx index 1ac17c1910e6..0b52b2d230b7 100644 --- a/sw/source/uibase/inc/wordcountdialog.hxx +++ b/sw/source/uibase/inc/wordcountdialog.hxx @@ -50,7 +50,7 @@ class SwWordCountFloatDlg : public SfxModelessDialog VclPtr<CloseButton> m_pClosePB; - DECL_STATIC_LINK( SwWordCountFloatDlg, CloseHdl, void* ); + DECL_STATIC_LINK_TYPED( SwWordCountFloatDlg, CloseHdl, Button*, void ); public: SwWordCountFloatDlg( SfxBindings* pBindings, SfxChildWindow* pChild, diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx index 9b19cf1092b7..c38a1cc107ab 100644 --- a/sw/source/uibase/inc/wrap.hxx +++ b/sw/source/uibase/inc/wrap.hxx @@ -86,8 +86,8 @@ class SwWrapTabPage: public SfxTabPage virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; DECL_LINK( RangeModifyHdl, MetricField * ); - DECL_LINK( WrapTypeHdl, RadioButton * ); - DECL_LINK(ContourHdl, void *); + DECL_LINK_TYPED( WrapTypeHdl, Button *, void ); + DECL_LINK_TYPED( ContourHdl, Button *, void); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; diff --git a/sw/source/uibase/sidebar/PageColumnControl.cxx b/sw/source/uibase/sidebar/PageColumnControl.cxx index d1a675e29900..6c9e7bd3e89d 100644 --- a/sw/source/uibase/sidebar/PageColumnControl.cxx +++ b/sw/source/uibase/sidebar/PageColumnControl.cxx @@ -105,12 +105,11 @@ IMPL_LINK(PageColumnControl, ImplColumnHdl, void *, pControl) return 0; } -IMPL_LINK_NOARG(PageColumnControl, MoreButtonClickHdl_Impl) +IMPL_LINK_NOARG_TYPED(PageColumnControl, MoreButtonClickHdl_Impl, Button*, void) { mrPagePropPanel.GetBindings()->GetDispatcher()->Execute( FN_FORMAT_PAGE_COLUMN_DLG, SfxCallMode::ASYNCHRON ); mrPagePropPanel.ClosePageColumnPopup(); - return 0; } } } // end of namespace sw::sidebar diff --git a/sw/source/uibase/sidebar/PageColumnControl.hxx b/sw/source/uibase/sidebar/PageColumnControl.hxx index 955323c10159..3989ea9ae2d6 100644 --- a/sw/source/uibase/sidebar/PageColumnControl.hxx +++ b/sw/source/uibase/sidebar/PageColumnControl.hxx @@ -56,7 +56,7 @@ private: PagePropertyPanel& mrPagePropPanel; DECL_LINK(ImplColumnHdl, void*); - DECL_LINK(MoreButtonClickHdl_Impl, void*); + DECL_LINK_TYPED(MoreButtonClickHdl_Impl, Button*, void); }; } } // end of namespace sw::sidebar diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx index 621d18f9bc8c..88484f26b143 100644 --- a/sw/source/uibase/sidebar/PageSizeControl.cxx +++ b/sw/source/uibase/sidebar/PageSizeControl.cxx @@ -173,12 +173,11 @@ IMPL_LINK(PageSizeControl, ImplSizeHdl, void *, pControl) return 0; } -IMPL_LINK_NOARG(PageSizeControl, MoreButtonClickHdl_Impl) +IMPL_LINK_NOARG_TYPED(PageSizeControl, MoreButtonClickHdl_Impl, Button*, void) { mrPagePropPanel.GetBindings()->GetDispatcher()->Execute( FN_FORMAT_PAGE_SETTING_DLG, SfxCallMode::ASYNCHRON ); mrPagePropPanel.ClosePageSizePopup(); - return 0; } } } // end of namespace sw::sidebar diff --git a/sw/source/uibase/sidebar/PageSizeControl.hxx b/sw/source/uibase/sidebar/PageSizeControl.hxx index ae4756af6604..7bb7e08ccdd2 100644 --- a/sw/source/uibase/sidebar/PageSizeControl.hxx +++ b/sw/source/uibase/sidebar/PageSizeControl.hxx @@ -62,7 +62,7 @@ private: PagePropertyPanel& mrPagePropPanel; DECL_LINK(ImplSizeHdl, void*); - DECL_LINK(MoreButtonClickHdl_Impl, void*); + DECL_LINK_TYPED(MoreButtonClickHdl_Impl, Button*, void); }; } } // end of namespace sw::sidebar diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index a0457f0b5b02..c0457bbef5eb 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -491,8 +491,8 @@ ThemePanel::ThemePanel(vcl::Window* pParent, get(mpApplyButton, "apply"); mpApplyButton->SetClickHdl(LINK(this, ThemePanel, ClickHdl)); - mpListBoxFonts->SetDoubleClickHdl(LINK(this, ThemePanel, ClickHdl)); - mpListBoxColors->SetDoubleClickHdl(LINK(this, ThemePanel, ClickHdl)); + mpListBoxFonts->SetDoubleClickHdl(LINK(this, ThemePanel, DoubleClickHdl)); + mpListBoxColors->SetDoubleClickHdl(LINK(this, ThemePanel, DoubleClickHdl)); std::vector<FontSet> aFontSets = initFontSets(); for (size_t i = 0; i < aFontSets.size(); ++i) @@ -521,7 +521,11 @@ void ThemePanel::dispose() PanelLayout::dispose(); } -IMPL_LINK_NOARG(ThemePanel, ClickHdl) +IMPL_LINK_NOARG_TYPED(ThemePanel, ClickHdl, Button*, void) +{ + DoubleClickHdl(NULL); +} +IMPL_LINK_NOARG(ThemePanel, DoubleClickHdl) { SwDocShell* pDocSh = static_cast<SwDocShell*>(SfxObjectShell::Current()); if (pDocSh) diff --git a/sw/source/uibase/sidebar/ThemePanel.hxx b/sw/source/uibase/sidebar/ThemePanel.hxx index d4f9faff7094..0e95c5e0f205 100644 --- a/sw/source/uibase/sidebar/ThemePanel.hxx +++ b/sw/source/uibase/sidebar/ThemePanel.hxx @@ -66,7 +66,8 @@ private: VclPtr<ListBox> mpListBoxColors; VclPtr<PushButton> mpApplyButton; - DECL_LINK(ClickHdl, void*); + DECL_LINK_TYPED(ClickHdl, Button*, void); + DECL_LINK(DoubleClickHdl, void*); }; }} // end of namespace sw::sidebar diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx index 62d28b665e21..d312cedb4b36 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx @@ -113,7 +113,7 @@ void WrapPropertyPanel::dispose() void WrapPropertyPanel::Initialize() { - Link<> aLink = LINK(this, WrapPropertyPanel, WrapTypeHdl); + Link<Button*,void> aLink = LINK(this, WrapPropertyPanel, WrapTypeHdl); mpRBNoWrap->SetClickHdl(aLink); mpRBWrapLeft->SetClickHdl(aLink); mpRBWrapRight->SetClickHdl(aLink); @@ -164,7 +164,7 @@ void WrapPropertyPanel::Initialize() mpBindings->Update( FN_FRAME_WRAP_IDEAL ); } -IMPL_LINK_NOARG(WrapPropertyPanel, WrapTypeHdl) +IMPL_LINK_NOARG_TYPED(WrapPropertyPanel, WrapTypeHdl, Button*, void) { sal_uInt16 nSlot = 0; if ( mpRBWrapLeft->IsChecked() ) @@ -193,8 +193,6 @@ IMPL_LINK_NOARG(WrapPropertyPanel, WrapTypeHdl) } SfxBoolItem bStateItem( nSlot, true ); mpBindings->GetDispatcher()->Execute( nSlot, SfxCallMode::RECORD, &bStateItem, 0L ); - - return 0; } void WrapPropertyPanel::NotifyItemUpdate( diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx index bd1f27ad0931..9edcb9cb7764 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.hxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.hxx @@ -78,7 +78,7 @@ namespace sw { namespace sidebar { void Initialize(); - DECL_LINK(WrapTypeHdl, void*); + DECL_LINK_TYPED(WrapTypeHdl, Button*, void); }; } } // end of namespace ::sw::sidebar diff --git a/sw/source/uibase/table/tablepg.hxx b/sw/source/uibase/table/tablepg.hxx index 3d6833a7db1f..e75484b138a1 100644 --- a/sw/source/uibase/table/tablepg.hxx +++ b/sw/source/uibase/table/tablepg.hxx @@ -71,8 +71,8 @@ class SwFormatTablePage : public SfxTabPage void Init(); void ModifyHdl(const Edit* pEdit); - DECL_LINK( AutoClickHdl, void * ); - DECL_LINK( RelWidthClickHdl, CheckBox * ); + DECL_LINK_TYPED( AutoClickHdl, Button*, void ); + DECL_LINK_TYPED( RelWidthClickHdl, Button*, void ); void RightModify(); DECL_LINK( UpDownLoseFocusHdl, MetricField * ); @@ -117,12 +117,12 @@ class SwTableColumnPage : public SfxTabPage bool bPercentMode:1; void Init(bool bWeb); - DECL_LINK( AutoClickHdl, void * ); + DECL_LINK_TYPED( AutoClickHdl, Button *, void ); void ModifyHdl( MetricField* pEdit ); DECL_LINK( UpHdl, MetricField * ); DECL_LINK( DownHdl, MetricField * ); DECL_LINK( LoseFocusHdl, MetricField * ); - DECL_LINK( ModeHdl, CheckBox * ); + DECL_LINK_TYPED( ModeHdl, Button *, void ); void UpdateCols( sal_uInt16 nAktPos ); SwTwips GetVisibleWidth(sal_uInt16 nPos); void SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth); @@ -172,13 +172,13 @@ class SwTextFlowPage : public SfxTabPage bool bPageBreak; bool bHtmlMode; - DECL_LINK(PageBreakHdl_Impl, void *); - DECL_LINK(ApplyCollClickHdl_Impl, void *); - DECL_LINK( PageBreakPosHdl_Impl, RadioButton* ); - DECL_LINK( PageBreakTypeHdl_Impl, RadioButton* ); - DECL_LINK( SplitHdl_Impl, CheckBox* ); - DECL_STATIC_LINK( SwTextFlowPage, SplitRowHdl_Impl, TriStateBox* ); - DECL_LINK( HeadLineCBClickHdl, void* = 0 ); + DECL_LINK_TYPED(PageBreakHdl_Impl, Button*, void); + DECL_LINK_TYPED(ApplyCollClickHdl_Impl, Button*, void); + DECL_LINK_TYPED( PageBreakPosHdl_Impl, Button*, void ); + DECL_LINK_TYPED( PageBreakTypeHdl_Impl, Button*, void ); + DECL_LINK_TYPED( SplitHdl_Impl, Button*, void ); + DECL_STATIC_LINK_TYPED( SwTextFlowPage, SplitRowHdl_Impl, Button*, void ); + DECL_LINK_TYPED( HeadLineCBClickHdl, Button* = 0, void ); public: SwTextFlowPage( vcl::Window* pParent, const SfxItemSet& rSet ); |