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 /sfx2/source/dialog | |
parent | 46a27805fb707544a844a961a3743b8b992282f0 (diff) |
Convert vcl Button Link<> click handler to typed Link<Button*,void>
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/checkin.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 20 | ||||
-rw-r--r-- | sfx2/source/dialog/infobar.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/inputdlg.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/dialog/newstyle.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/dialog/passwd.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/printopt.cxx | 15 | ||||
-rw-r--r-- | sfx2/source/dialog/securitypage.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/dialog/srchdlg.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/styledlg.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 17 | ||||
-rw-r--r-- | sfx2/source/dialog/templateinfodlg.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/versdlg.cxx | 9 |
17 files changed, 48 insertions, 86 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index a6eabcea28a6..ec76c0565041 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -515,7 +515,7 @@ void BackingWindow::Resize() Invalidate(); } -IMPL_LINK(BackingWindow, ExtLinkClickHdl, Button*, pButton) +IMPL_LINK_TYPED(BackingWindow, ExtLinkClickHdl, Button*, pButton, void) { OUString aNode; @@ -552,10 +552,9 @@ IMPL_LINK(BackingWindow, ExtLinkClickHdl, Button*, pButton) { } } - return 0; } -IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton ) +IMPL_LINK_TYPED( BackingWindow, ClickHdl, Button*, pButton, void ) { // dispatch the appropriate URL and end the dialog if( pButton == mpWriterAllButton ) @@ -604,7 +603,6 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton ) mpLocalView->reload(); mpLocalView->GrabFocus(); } - return 0; } IMPL_LINK_TYPED( BackingWindow, MenuSelectHdl, MenuButton*, pButton, void ) diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index 5c8dd072bc67..ad63152ab4e8 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -105,9 +105,9 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer std::set<const ThumbnailViewItem*, selection_cmp_fn> maSelTemplates; std::set<const ThumbnailViewItem*, selection_cmp_fn> maSelFolders; - DECL_LINK(ClickHdl, Button*); + DECL_LINK_TYPED(ClickHdl, Button*, void); DECL_LINK_TYPED(MenuSelectHdl, MenuButton*, void); - DECL_LINK(ExtLinkClickHdl, Button*); + DECL_LINK_TYPED(ExtLinkClickHdl, Button*, void); DECL_LINK_TYPED(OpenRegionHdl, void*, void); DECL_LINK_TYPED(OpenTemplateHdl, ThumbnailViewItem*, void); diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 709ba9a16333..b9b1b528d46d 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -623,7 +623,7 @@ void SfxFloatingWindow::FillInfo(SfxChildWinInfo& rInfo) const // SfxSingleTabDialog ---------------------------------------------------- -IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl) +IMPL_LINK_NOARG_TYPED(SfxSingleTabDialog, OKHdl_Impl, Button*, void) /* [Description] @@ -635,7 +635,7 @@ IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl) { // TabPage without ItemSet EndDialog( RET_OK ); - return 1; + return; } if ( !GetOutputItemSet() ) @@ -648,7 +648,7 @@ IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl) { int nRet = pImpl->m_pSfxPage->DeactivatePage( GetOutputSetImpl() ); if ( nRet != SfxTabPage::LEAVE_PAGE ) - return 0; + return; else bModified = ( GetOutputItemSet()->Count() > 0 ); } @@ -675,7 +675,7 @@ IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl) } else EndDialog(); - return 0; + return; } diff --git a/sfx2/source/dialog/checkin.cxx b/sfx2/source/dialog/checkin.cxx index e628476df652..c6e10ccec20e 100644 --- a/sfx2/source/dialog/checkin.cxx +++ b/sfx2/source/dialog/checkin.cxx @@ -43,10 +43,9 @@ bool SfxCheckinDialog::IsMajor( ) return m_pMajorCB->IsChecked( ); } -IMPL_LINK_NOARG( SfxCheckinDialog, OKHdl ) +IMPL_LINK_NOARG_TYPED( SfxCheckinDialog, OKHdl, Button*, void ) { EndDialog( RET_OK ); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 3334c9e9b97d..408a34346491 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -831,7 +831,7 @@ void SfxDocumentPage::dispose() } -IMPL_LINK_NOARG(SfxDocumentPage, DeleteHdl) +IMPL_LINK_NOARG_TYPED(SfxDocumentPage, DeleteHdl, Button*, void) { OUString aName; if ( bEnableUseUserData && m_pUseUserDataCB->IsChecked() ) @@ -847,10 +847,9 @@ IMPL_LINK_NOARG(SfxDocumentPage, DeleteHdl) m_pTimeLogValFt->SetText( rLocaleWrapper.getDuration( aTime ) ); m_pDocNoValFt->SetText(OUString('1')); bHandleDelete = true; - return 0; } -IMPL_LINK_NOARG(SfxDocumentPage, SignatureHdl) +IMPL_LINK_NOARG_TYPED(SfxDocumentPage, SignatureHdl, Button*, void) { SfxObjectShell* pDoc = SfxObjectShell::Current(); if( pDoc ) @@ -859,11 +858,9 @@ IMPL_LINK_NOARG(SfxDocumentPage, SignatureHdl) ImplUpdateSignatures(); } - - return 0; } -IMPL_STATIC_LINK_NOARG(SfxDocumentPage, ChangePassHdl) +IMPL_STATIC_LINK_NOARG_TYPED(SfxDocumentPage, ChangePassHdl, Button*, void) { SfxObjectShell* pShell = SfxObjectShell::Current(); do @@ -882,7 +879,6 @@ IMPL_STATIC_LINK_NOARG(SfxDocumentPage, ChangePassHdl) pShell->SetModified(); } while (false); - return 0; } void SfxDocumentPage::ImplUpdateSignatures() @@ -1365,12 +1361,11 @@ CustomPropertiesEditButton::CustomPropertiesEditButton(vcl::Window* pParent, Win SetClickHdl( LINK( this, CustomPropertiesEditButton, ClickHdl )); } -IMPL_LINK_NOARG(CustomPropertiesEditButton, ClickHdl) +IMPL_LINK_NOARG_TYPED(CustomPropertiesEditButton, ClickHdl, Button*, void) { VclPtrInstance< DurationDialog_Impl > pDurationDlg( this, m_pLine->m_aDurationField->GetDuration() ); if ( RET_OK == pDurationDlg->Execute() ) m_pLine->m_aDurationField->SetDuration( pDurationDlg->GetDuration() ); - return 1; } void CustomPropertiesYesNoButton::Resize() @@ -1540,8 +1535,9 @@ IMPL_STATIC_LINK( return 0; } -IMPL_LINK( CustomPropertiesWindow, RemoveHdl, CustomPropertiesRemoveButton*, pButton ) +IMPL_LINK_TYPED( CustomPropertiesWindow, RemoveHdl, Button*, pBtn, void ) { + CustomPropertiesRemoveButton* pButton = static_cast<CustomPropertiesRemoveButton*>(pBtn); CustomPropertyLine* pLine = pButton->GetLine(); std::vector< CustomPropertyLine* >::iterator pFound = std::find( m_aCustomPropertiesLines.begin(), m_aCustomPropertiesLines.end(), pLine ); @@ -1573,7 +1569,6 @@ IMPL_LINK( CustomPropertiesWindow, RemoveHdl, CustomPropertiesRemoveButton*, pBu } m_aRemovedHdl.Call(0); - return 0; } IMPL_LINK( CustomPropertiesWindow, EditLoseFocusHdl, CustomPropertiesEdit*, pEdit ) @@ -2189,11 +2184,10 @@ void SfxCustomPropertiesPage::dispose() SfxTabPage::dispose(); } -IMPL_LINK_NOARG(SfxCustomPropertiesPage, AddHdl) +IMPL_LINK_NOARG_TYPED(SfxCustomPropertiesPage, AddHdl, Button*, void) { Any aAny; m_pPropertiesCtrl->AddLine( OUString(), aAny, true ); - return 0; } bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet ) diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index 67208ba61e73..d6d9d2e6d1b0 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -230,10 +230,9 @@ void SfxInfoBarWindow::Resize() m_pMessage->SetPosSizePixel(aMessagePosition, aMessageSize); } -IMPL_LINK_NOARG(SfxInfoBarWindow, CloseHandler) +IMPL_LINK_NOARG_TYPED(SfxInfoBarWindow, CloseHandler, Button*, void) { static_cast<SfxInfoBarContainerWindow*>(GetParent())->removeInfoBar(this); - return 0; } SfxInfoBarContainerWindow::SfxInfoBarContainerWindow(SfxInfoBarContainerChild* pChildWin ) : diff --git a/sfx2/source/dialog/inputdlg.cxx b/sfx2/source/dialog/inputdlg.cxx index faa591d89f6a..8aa717d4a56e 100644 --- a/sfx2/source/dialog/inputdlg.cxx +++ b/sfx2/source/dialog/inputdlg.cxx @@ -45,10 +45,9 @@ OUString InputDialog::getEntryText() const return m_pEntry->GetText(); } -IMPL_LINK(InputDialog,ClickHdl,PushButton*, pButton) +IMPL_LINK_TYPED(InputDialog,ClickHdl, Button*, pButton, void) { EndDialog(pButton == m_pOK ? RET_OK : RET_CANCEL); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 8b69def6daee..b97ac2df97cc 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -353,16 +353,12 @@ IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleSelectHdl_Impl ) return 0; } -IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleHdl_Impl ) +IMPL_LINK_NOARG_TYPED( SfxManageStyleSheetPage, EditStyleHdl_Impl, Button*, void ) { - OUString aTemplName(m_pFollowLb->GetSelectEntry()); if (Execute_Impl( SID_STYLE_EDIT, aTemplName, OUString(),(sal_uInt16)pStyle->GetFamily(), 0 )) { } - - return 0; - } IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleSelectHdl_Impl ) @@ -375,12 +371,11 @@ IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleSelectHdl_Impl ) return 0; } -IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleHdl_Impl ) +IMPL_LINK_NOARG_TYPED( SfxManageStyleSheetPage, EditLinkStyleHdl_Impl, Button*, void ) { OUString aTemplName(m_pBaseLb->GetSelectEntry()); if (aTemplName != SfxResId(STR_NONE)) Execute_Impl( SID_STYLE_EDIT, aTemplName, OUString(),(sal_uInt16)pStyle->GetFamily(), 0 ); - return 0; } // Internal: Perform functions through the Dispatcher diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 57396e79b00f..4b0408fe3ddc 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -28,9 +28,12 @@ // PRIVATE METHODES ------------------------------------------------------ -IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl ) +IMPL_LINK_NOARG_TYPED( SfxNewStyleDlg, OKClickHdl, Button*, void ) +{ + OKHdl(NULL); +} +IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, /*pControl*/ ) { - (void)pControl; //unused const OUString aName( m_pColBox->GetText() ); SfxStyleSheetBase* pStyle = rPool.Find( aName, rPool.GetSearchFamily() ); if ( pStyle ) @@ -67,7 +70,7 @@ SfxNewStyleDlg::SfxNewStyleDlg( vcl::Window* pParent, SfxStyleSheetBasePool& rIn m_pColBox->set_height_request(m_pColBox->GetTextHeight() * 10); get(m_pOKBtn, "ok"); - m_pOKBtn->SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl)); + m_pOKBtn->SetClickHdl(LINK(this, SfxNewStyleDlg, OKClickHdl)); m_pColBox->SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl)); m_pColBox->SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl)); diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index 9ae21b08e1ed..96f7c42a6dea 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -60,7 +60,7 @@ IMPL_LINK( SfxPasswordDialog, EditModifyHdl, Edit *, pEdit ) return 0; } -IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl) +IMPL_LINK_NOARG_TYPED(SfxPasswordDialog, OKHdl, Button*, void) { bool bConfirmFailed = bool( mnExtras & SfxShowExtras::CONFIRM ) && ( GetConfirm() != GetPassword() ); @@ -75,7 +75,6 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl) } else EndDialog( RET_OK ); - return 0; } // CTOR / DTOR ----------------------------------------------------------- @@ -112,8 +111,7 @@ SfxPasswordDialog::SfxPasswordDialog(vcl::Window* pParent, const OUString* pGrou Link<> aLink = LINK( this, SfxPasswordDialog, EditModifyHdl ); mpPassword1ED->SetModifyHdl( aLink ); mpPassword2ED->SetModifyHdl( aLink ); - aLink = LINK( this, SfxPasswordDialog, OKHdl ); - mpOKBtn->SetClickHdl( aLink ); + mpOKBtn->SetClickHdl( LINK( this, SfxPasswordDialog, OKHdl ) ); if (pGroupText) mpPassword1Box->set_label(*pGroupText); diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 28a245325c58..8c25b8fefc72 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -271,22 +271,18 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt } } -IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, CheckBox*, pBox ) +IMPL_LINK_NOARG_TYPED( SfxCommonPrintOptionsTabPage, ClickReduceTransparencyCBHdl, Button*, void ) { - (void)pBox; //unused const bool bReduceTransparency = m_pReduceTransparencyCB->IsChecked(); m_pReduceTransparencyAutoRB->Enable( bReduceTransparency ); m_pReduceTransparencyNoneRB->Enable( bReduceTransparency ); m_pTransparencyCB->Enable( !bReduceTransparency ); - - return 0; } -IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, pBox ) +IMPL_LINK_NOARG_TYPED( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, Button*, void ) { - (void)pBox; //unused const bool bEnable = m_pReduceGradientsCB->IsChecked(); m_pReduceGradientsStripesRB->Enable( bEnable ); @@ -294,13 +290,10 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl, CheckBox*, p m_pReduceGradientsStepCountNF->Enable( bEnable ); ToggleReduceGradientsStripesRBHdl(m_pReduceGradientsStripesRB); - - return 0; } -IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBox ) +IMPL_LINK_NOARG_TYPED( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, Button*, void ) { - (void)pBox; //unused const bool bEnable = m_pReduceBitmapsCB->IsChecked(); m_pReduceBitmapsOptimalRB->Enable( bEnable ); @@ -310,8 +303,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, CheckBox*, pBo m_pReduceBitmapsResolutionLB->Enable( bEnable ); ToggleReduceBitmapsResolutionRBHdl(m_pReduceBitmapsResolutionRB); - - return 0; } IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, RadioButton*, pButton ) diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 60ff95989b9b..c92981fe6acb 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -150,7 +150,7 @@ struct SfxSecurityPage_Impl bool m_bEndRedliningWarningDone; DECL_LINK( RecordChangesCBToggleHdl, void* ); - DECL_LINK( ChangeProtectionPBHdl, void* ); + DECL_LINK_TYPED( ChangeProtectionPBHdl, Button*, void ); SfxSecurityPage_Impl( SfxSecurityPage &rDlg, const SfxItemSet &rItemSet ); ~SfxSecurityPage_Impl(); @@ -377,10 +377,10 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl) } -IMPL_LINK_NOARG(SfxSecurityPage_Impl, ChangeProtectionPBHdl) +IMPL_LINK_NOARG_TYPED(SfxSecurityPage_Impl, ChangeProtectionPBHdl, Button*, void) { if (m_eRedlingMode == RL_NONE) - return 0; + return; // the push button text is always the opposite of the current state. Thus: const bool bCurrentProtection = m_pUnProtectPB->IsVisible(); @@ -393,7 +393,7 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, ChangeProtectionPBHdl) { // ask for password and if dialog is canceled or no password provided return if (!lcl_GetPassword( m_rMyTabPage.GetParent(), bNewProtection, aPasswordText )) - return 0; + return; // provided password still needs to be checked? if (!bNewProtection && !m_bOrigPasswordIsConfirmed) @@ -401,7 +401,7 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, ChangeProtectionPBHdl) if (lcl_IsPasswordCorrect( aPasswordText )) m_bOrigPasswordIsConfirmed = true; else - return 0; + return; } } DBG_ASSERT( m_bOrigPasswordIsConfirmed, "ooops... this should not have happened!" ); @@ -415,8 +415,6 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, ChangeProtectionPBHdl) m_pUnProtectPB->Show(bNewProtection); m_pProtectPB->Show(!bNewProtection); - - return 0; } diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index a74292f92d22..9f4d099c4bec 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -132,7 +132,7 @@ void SearchDialog::SaveConfig() aViewOpt.SetUserItem( "UserItem", aUserItem ); } -IMPL_LINK_NOARG(SearchDialog, FindHdl) +IMPL_LINK_NOARG_TYPED(SearchDialog, FindHdl, Button*, void) { OUString sSrchTxt = m_pSearchEdit->GetText(); sal_Int32 nPos = m_pSearchEdit->GetEntryPos( sSrchTxt ); @@ -141,7 +141,6 @@ IMPL_LINK_NOARG(SearchDialog, FindHdl) if ( nPos > 0 ) m_pSearchEdit->InsertEntry( sSrchTxt, 0 ); m_aFindHdl.Call( this ); - return 0; } void SearchDialog::SetFocusOnEdit() diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index 6c3f55009bbf..d96b80ba07ac 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -118,7 +118,7 @@ short SfxStyleDialog::Ok() -IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton ) +IMPL_LINK_NOARG_TYPED( SfxStyleDialog, CancelHdl, Button *, void ) /* [Description] @@ -127,7 +127,6 @@ IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton ) */ { - (void)pButton; //unused SfxTabPage* pPage = GetTabPage(m_nOrganizerId); const SfxItemSet* pInSet = GetInputSetImpl(); @@ -148,7 +147,6 @@ IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton ) if ( pPage ) pPage->Reset( GetInputSetImpl() ); EndDialog(); - return 0; } OUString SfxStyleDialog::GenerateUnusedName(SfxStyleSheetBasePool &rPool) diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 2b7111646b32..d19a2abfa9b0 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -567,7 +567,7 @@ void SfxTabDialog::Start( bool bShow ) -void SfxTabDialog::SetApplyHandler(const Link<>& _rHdl) +void SfxTabDialog::SetApplyHandler(const Link<Button*, void>& _rHdl) { DBG_ASSERT( m_pApplyBtn, "SfxTabDialog::GetApplyHandler: no apply button enabled!" ); if ( m_pApplyBtn ) @@ -860,10 +860,9 @@ short SfxTabDialog::Ok() return bModified ? RET_OK : RET_CANCEL; } -IMPL_LINK_NOARG(SfxTabDialog, CancelHdl) +IMPL_LINK_NOARG_TYPED(SfxTabDialog, CancelHdl, Button*, void) { EndDialog( RET_USER_CANCEL ); - return 0; } @@ -898,7 +897,7 @@ void SfxTabDialog::RefreshInputSet() -IMPL_LINK_NOARG(SfxTabDialog, OkHdl) +IMPL_LINK_NOARG_TYPED(SfxTabDialog, OkHdl, Button*, void) /* [Description] @@ -919,7 +918,6 @@ IMPL_LINK_NOARG(SfxTabDialog, OkHdl) Close(); } } - return 0; } bool SfxTabDialog::Apply() @@ -968,7 +966,7 @@ bool SfxTabDialog::PrepareLeaveCurrentPage() -IMPL_LINK_NOARG(SfxTabDialog, UserHdl) +IMPL_LINK_NOARG_TYPED(SfxTabDialog, UserHdl, Button*, void) /* [Description] @@ -989,12 +987,11 @@ IMPL_LINK_NOARG(SfxTabDialog, UserHdl) nRet = RET_USER_CANCEL; EndDialog( nRet ); } - return 0; } -IMPL_LINK_NOARG(SfxTabDialog, ResetHdl) +IMPL_LINK_NOARG_TYPED(SfxTabDialog, ResetHdl, Button*, void) /* [Description] @@ -1016,12 +1013,11 @@ IMPL_LINK_NOARG(SfxTabDialog, ResetHdl) } else pDataObject->pTabPage->Reset( pSet ); - return 0; } -IMPL_LINK_NOARG(SfxTabDialog, BaseFmtHdl) +IMPL_LINK_NOARG_TYPED(SfxTabDialog, BaseFmtHdl, Button*, void) /* [Description] @@ -1094,7 +1090,6 @@ IMPL_LINK_NOARG(SfxTabDialog, BaseFmtHdl) pDataObject->pTabPage->Reset( &aTmpSet ); pDataObject->pTabPage->pImpl->mbStandard = true; } - return 1; } diff --git a/sfx2/source/dialog/templateinfodlg.cxx b/sfx2/source/dialog/templateinfodlg.cxx index 7b7a553855e1..fc2de4f7b449 100644 --- a/sfx2/source/dialog/templateinfodlg.cxx +++ b/sfx2/source/dialog/templateinfodlg.cxx @@ -126,10 +126,9 @@ void SfxTemplateInfoDlg::loadDocument(const OUString &rURL) } } -IMPL_LINK_NOARG (SfxTemplateInfoDlg, CloseHdl) +IMPL_LINK_NOARG_TYPED(SfxTemplateInfoDlg, CloseHdl, Button*, void) { Close(); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 0ea9352e5458..5fe8966a8c64 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -213,7 +213,7 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersion m_pVersionBox = VclPtr<SfxVersionsTabListBox_Impl>::Create(*pContainer, WB_TABSTOP); - Link<> aClickLink = LINK( this, SfxVersionDialog, ButtonHdl_Impl ); + Link<Button*,void> aClickLink = LINK( this, SfxVersionDialog, ButtonHdl_Impl ); m_pViewButton->SetClickHdl ( aClickLink ); m_pSaveButton->SetClickHdl ( aClickLink ); m_pDeleteButton->SetClickHdl ( aClickLink ); @@ -392,7 +392,7 @@ IMPL_LINK_NOARG(SfxVersionDialog, SelectHdl_Impl) return 0L; } -IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton ) +IMPL_LINK_TYPED( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton, void ) { SfxObjectShell *pObjShell = pViewFrame->GetObjectShell(); SvTreeListEntry *pEntry = m_pVersionBox->FirstSelected(); @@ -463,8 +463,6 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton ) VclPtrInstance< SfxCmisVersionsDialog > pDlg(pViewFrame); pDlg->Execute(); } - - return 0L; } SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl(vcl::Window *pParent, SfxVersionInfo& rInfo, bool bEdit) @@ -520,13 +518,12 @@ void SfxViewVersionDialog_Impl::dispose() SfxModalDialog::dispose(); } -IMPL_LINK(SfxViewVersionDialog_Impl, ButtonHdl, Button*, pButton) +IMPL_LINK_TYPED(SfxViewVersionDialog_Impl, ButtonHdl, Button*, pButton, void) { assert(pButton == m_pOKButton); (void)pButton; m_rInfo.aComment = m_pEdit->GetText(); EndDialog(RET_OK); - return 0L; } SfxCmisVersionsDialog::SfxCmisVersionsDialog ( SfxViewFrame* pVwFrame ) |