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 /uui | |
parent | 46a27805fb707544a844a961a3743b8b992282f0 (diff) |
Convert vcl Button Link<> click handler to typed Link<Button*,void>
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/authfallbackdlg.cxx | 6 | ||||
-rw-r--r-- | uui/source/authfallbackdlg.hxx | 4 | ||||
-rw-r--r-- | uui/source/logindlg.cxx | 10 | ||||
-rw-r--r-- | uui/source/logindlg.hxx | 6 | ||||
-rw-r--r-- | uui/source/masterpasscrtdlg.cxx | 3 | ||||
-rw-r--r-- | uui/source/masterpasscrtdlg.hxx | 2 | ||||
-rw-r--r-- | uui/source/masterpassworddlg.cxx | 3 | ||||
-rw-r--r-- | uui/source/masterpassworddlg.hxx | 2 | ||||
-rw-r--r-- | uui/source/nameclashdlg.cxx | 8 | ||||
-rw-r--r-- | uui/source/nameclashdlg.hxx | 2 | ||||
-rw-r--r-- | uui/source/passworddlg.cxx | 4 | ||||
-rw-r--r-- | uui/source/passworddlg.hxx | 2 | ||||
-rw-r--r-- | uui/source/secmacrowarnings.cxx | 14 | ||||
-rw-r--r-- | uui/source/secmacrowarnings.hxx | 8 | ||||
-rw-r--r-- | uui/source/unknownauthdlg.cxx | 8 | ||||
-rw-r--r-- | uui/source/unknownauthdlg.hxx | 4 |
16 files changed, 32 insertions, 54 deletions
diff --git a/uui/source/authfallbackdlg.cxx b/uui/source/authfallbackdlg.cxx index 216d2c32c184..3acbc2ffcbe3 100644 --- a/uui/source/authfallbackdlg.cxx +++ b/uui/source/authfallbackdlg.cxx @@ -47,14 +47,12 @@ void AuthFallbackDlg::dispose() ModalDialog::dispose(); } -IMPL_LINK ( AuthFallbackDlg, OKHdl, Button *, ) +IMPL_LINK_NOARG_TYPED ( AuthFallbackDlg, OKHdl, Button *, void) { EndDialog( RET_OK ); - return 1; } -IMPL_LINK ( AuthFallbackDlg, CancelHdl, Button *, ) +IMPL_LINK_NOARG_TYPED ( AuthFallbackDlg, CancelHdl, Button *, void) { EndDialog(); - return 0; } diff --git a/uui/source/authfallbackdlg.hxx b/uui/source/authfallbackdlg.hxx index 29634d1f69b0..6442f74c0237 100644 --- a/uui/source/authfallbackdlg.hxx +++ b/uui/source/authfallbackdlg.hxx @@ -35,8 +35,8 @@ public: private: - DECL_LINK ( OKHdl, Button * ); - DECL_LINK ( CancelHdl, Button * ); + DECL_LINK_TYPED ( OKHdl, Button *, void ); + DECL_LINK_TYPED ( CancelHdl, Button *, void ); }; #endif // INCLUDED_SVTOOLS_AUTHFALLBACKDLG_HXX diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx index ca44729e15f0..8cf4e58d2699 100644 --- a/uui/source/logindlg.cxx +++ b/uui/source/logindlg.cxx @@ -128,16 +128,15 @@ void LoginDialog::EnableUseSysCredsControls_Impl( bool bUseSysCredsEnabled ) m_pAccountED->Enable( !bUseSysCredsEnabled ); } -IMPL_LINK_NOARG(LoginDialog, OKHdl_Impl) +IMPL_LINK_NOARG_TYPED(LoginDialog, OKHdl_Impl, Button*, void) { // trim the strings m_pNameED->SetText(comphelper::string::strip(m_pNameED->GetText(), ' ')); m_pPasswordED->SetText(comphelper::string::strip(m_pPasswordED->GetText(), ' ')); EndDialog( RET_OK ); - return 1; } -IMPL_LINK_NOARG(LoginDialog, PathHdl_Impl) +IMPL_LINK_NOARG_TYPED(LoginDialog, PathHdl_Impl, Button*, void) { try { @@ -157,14 +156,11 @@ IMPL_LINK_NOARG(LoginDialog, PathHdl_Impl) { SAL_WARN("uui", "LoginDialog::PathHdl_Impl: caught UNO exception: " << e.Message); } - - return 1; } -IMPL_LINK_NOARG(LoginDialog, UseSysCredsHdl_Impl) +IMPL_LINK_NOARG_TYPED(LoginDialog, UseSysCredsHdl_Impl, Button*, void) { EnableUseSysCredsControls_Impl( m_pUseSysCredsCB->IsChecked() ); - return 1; } LoginDialog::LoginDialog(vcl::Window* pParent, sal_uInt16 nFlags, diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx index 96304a0359ed..a8c34646bf04 100644 --- a/uui/source/logindlg.hxx +++ b/uui/source/logindlg.hxx @@ -62,9 +62,9 @@ class LoginDialog : public ModalDialog void HideControls_Impl( sal_uInt16 nFlags ); void EnableUseSysCredsControls_Impl( bool bUseSysCredsEnabled ); - DECL_LINK(OKHdl_Impl, void *); - DECL_LINK(PathHdl_Impl, void *); - DECL_LINK(UseSysCredsHdl_Impl, void *); + DECL_LINK_TYPED(OKHdl_Impl, Button*, void); + DECL_LINK_TYPED(PathHdl_Impl, Button*, void); + DECL_LINK_TYPED(UseSysCredsHdl_Impl, Button*, void); public: LoginDialog(vcl::Window* pParent, sal_uInt16 nFlags, diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx index 85ddf2754b81..06ded1599cb1 100644 --- a/uui/source/masterpasscrtdlg.cxx +++ b/uui/source/masterpasscrtdlg.cxx @@ -33,7 +33,7 @@ IMPL_LINK_NOARG(MasterPasswordCreateDialog, EditHdl_Impl) return 0; } -IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl) +IMPL_LINK_NOARG_TYPED(MasterPasswordCreateDialog, OKHdl_Impl, Button*, void) { // compare both passwords and show message box if there are not equal!! if( m_pEDMasterPasswordCrt->GetText() == m_pEDMasterPasswordRepeat->GetText() ) @@ -47,7 +47,6 @@ IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl) m_pEDMasterPasswordRepeat->SetText( OUString() ); m_pEDMasterPasswordCrt->GrabFocus(); } - return 1; } MasterPasswordCreateDialog::MasterPasswordCreateDialog(vcl::Window* pParent, ResMgr* pResMgr) diff --git a/uui/source/masterpasscrtdlg.hxx b/uui/source/masterpasscrtdlg.hxx index b8279fcec363..d363cb60e600 100644 --- a/uui/source/masterpasscrtdlg.hxx +++ b/uui/source/masterpasscrtdlg.hxx @@ -37,7 +37,7 @@ private: VclPtr<OKButton> m_pOKBtn; - DECL_LINK(OKHdl_Impl, void *); + DECL_LINK_TYPED(OKHdl_Impl, Button*, void); DECL_LINK(EditHdl_Impl, void *); public: diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx index 924112b088c7..b45f588552a0 100644 --- a/uui/source/masterpassworddlg.cxx +++ b/uui/source/masterpassworddlg.cxx @@ -26,10 +26,9 @@ -IMPL_LINK_NOARG(MasterPasswordDialog, OKHdl_Impl) +IMPL_LINK_NOARG_TYPED(MasterPasswordDialog, OKHdl_Impl, Button*, void) { EndDialog( RET_OK ); - return 1; } diff --git a/uui/source/masterpassworddlg.hxx b/uui/source/masterpassworddlg.hxx index 1d37d0d93d78..c1d945eee6f6 100644 --- a/uui/source/masterpassworddlg.hxx +++ b/uui/source/masterpassworddlg.hxx @@ -33,7 +33,7 @@ class MasterPasswordDialog : public ModalDialog VclPtr<Edit> m_pEDMasterPassword; VclPtr<OKButton> m_pOKBtn; - DECL_LINK(OKHdl_Impl, void *); + DECL_LINK_TYPED(OKHdl_Impl, Button*, void); public: MasterPasswordDialog( vcl::Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr ); diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx index 0911605a7863..e299b2709233 100644 --- a/uui/source/nameclashdlg.cxx +++ b/uui/source/nameclashdlg.cxx @@ -25,7 +25,7 @@ // NameClashDialog --------------------------------------------------------- -IMPL_LINK( NameClashDialog, ButtonHdl_Impl, PushButton *, pBtn ) +IMPL_LINK_TYPED( NameClashDialog, ButtonHdl_Impl, Button *, pBtn, void ) { long nRet = (long) ABORT; if ( m_pBtnRename == pBtn ) @@ -36,7 +36,7 @@ IMPL_LINK( NameClashDialog, ButtonHdl_Impl, PushButton *, pBtn ) { ScopedVclPtrInstance< MessageDialog > aError(nullptr, maSameName); aError->Execute(); - return 1; + return; } maNewName = aNewName; } @@ -44,8 +44,6 @@ IMPL_LINK( NameClashDialog, ButtonHdl_Impl, PushButton *, pBtn ) nRet = (long) OVERWRITE; EndDialog( nRet ); - - return 1; } @@ -63,7 +61,7 @@ NameClashDialog::NameClashDialog( vcl::Window* pParent, ResMgr* pResMgr, get(m_pBtnRename, "rename"); get(m_pBtnCancel, "cancel"); - Link<> aLink( LINK( this, NameClashDialog, ButtonHdl_Impl ) ); + Link<Button*,void> aLink( LINK( this, NameClashDialog, ButtonHdl_Impl ) ); m_pBtnOverwrite->SetClickHdl( aLink ); m_pBtnRename->SetClickHdl( aLink ); m_pBtnCancel->SetClickHdl( aLink ); diff --git a/uui/source/nameclashdlg.hxx b/uui/source/nameclashdlg.hxx index 545f581dd077..3e050f6953d9 100644 --- a/uui/source/nameclashdlg.hxx +++ b/uui/source/nameclashdlg.hxx @@ -40,7 +40,7 @@ class NameClashDialog : public ModalDialog OUString maSameName; OUString maNewName; - DECL_LINK( ButtonHdl_Impl, PushButton * ); + DECL_LINK_TYPED( ButtonHdl_Impl, Button *, void ); public: NameClashDialog( vcl::Window* pParent, ResMgr* pResMgr, diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 2563ea745de7..c993ac201871 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -97,7 +97,7 @@ void PasswordDialog::dispose() ModalDialog::dispose(); } -IMPL_LINK_NOARG(PasswordDialog, OKHdl_Impl) +IMPL_LINK_NOARG_TYPED(PasswordDialog, OKHdl_Impl, Button*, void) { bool bEDPasswdValid = m_pEDPassword->GetText().getLength() >= nMinLen; bool bPasswdMismatch = m_pEDConfirmPassword->GetText() != m_pEDPassword->GetText(); @@ -111,8 +111,6 @@ IMPL_LINK_NOARG(PasswordDialog, OKHdl_Impl) } else if (bValid) EndDialog( RET_OK ); - - return 1; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/uui/source/passworddlg.hxx b/uui/source/passworddlg.hxx index 712bcfae0ee3..d013dcac6725 100644 --- a/uui/source/passworddlg.hxx +++ b/uui/source/passworddlg.hxx @@ -41,7 +41,7 @@ class PasswordDialog : public ModalDialog OUString aPasswdMismatch; - DECL_LINK(OKHdl_Impl, void *); + DECL_LINK_TYPED(OKHdl_Impl, Button*, void); public: PasswordDialog( vcl::Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr, const OUString& aDocURL, diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index cb661be0d97d..39fbda6af57f 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -113,7 +113,7 @@ void MacroWarning::SetDocumentURL( const OUString& rDocURL ) mpDocNameFI->SetText( rDocURL ); } -IMPL_LINK_NOARG(MacroWarning, ViewSignsBtnHdl) +IMPL_LINK_NOARG_TYPED(MacroWarning, ViewSignsBtnHdl, Button*, void) { DBG_ASSERT( mxCert.is(), "*MacroWarning::ViewSignsBtnHdl(): no certificate set!" ); @@ -126,11 +126,9 @@ IMPL_LINK_NOARG(MacroWarning, ViewSignsBtnHdl) else if( mxStore.is() ) xD->showScriptingContentSignatures( mxStore, uno::Reference< io::XInputStream >() ); } - - return 0; } -IMPL_LINK_NOARG(MacroWarning, EnableBtnHdl) +IMPL_LINK_NOARG_TYPED(MacroWarning, EnableBtnHdl, Button*, void) { if( mbSignedMode && mpAlwaysTrustCB->IsChecked() ) { // insert path into trusted path list @@ -149,22 +147,18 @@ IMPL_LINK_NOARG(MacroWarning, EnableBtnHdl) } EndDialog( RET_OK ); - return 0; } -IMPL_LINK_NOARG(MacroWarning, DisableBtnHdl) +IMPL_LINK_NOARG_TYPED(MacroWarning, DisableBtnHdl, Button*, void) { EndDialog(); - return 0; } -IMPL_LINK_NOARG(MacroWarning, AlwaysTrustCheckHdl) +IMPL_LINK_NOARG_TYPED(MacroWarning, AlwaysTrustCheckHdl, Button*, void) { bool bEnable = ( mnActSecLevel < 2 || mpAlwaysTrustCB->IsChecked() ); mpEnableBtn->Enable( bEnable ); mpDisableBtn->Enable( !mpAlwaysTrustCB->IsChecked() ); - - return 0; } void MacroWarning::InitControls() diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx index f51bb9078dff..8a81afaad3f4 100644 --- a/uui/source/secmacrowarnings.hxx +++ b/uui/source/secmacrowarnings.hxx @@ -59,10 +59,10 @@ private: const bool mbShowSignatures; sal_Int32 mnActSecLevel; - DECL_LINK( ViewSignsBtnHdl, void* ); - DECL_LINK( EnableBtnHdl, void* ); - DECL_LINK( DisableBtnHdl, void* ); - DECL_LINK( AlwaysTrustCheckHdl, void* ); + DECL_LINK_TYPED( ViewSignsBtnHdl, Button*, void ); + DECL_LINK_TYPED( EnableBtnHdl, Button*, void ); + DECL_LINK_TYPED( DisableBtnHdl, Button*, void ); + DECL_LINK_TYPED( AlwaysTrustCheckHdl, Button*, void ); void InitControls(); diff --git a/uui/source/unknownauthdlg.cxx b/uui/source/unknownauthdlg.cxx index f51606e39c80..8d0ac80904df 100644 --- a/uui/source/unknownauthdlg.cxx +++ b/uui/source/unknownauthdlg.cxx @@ -29,7 +29,7 @@ using namespace css; -IMPL_LINK_NOARG(UnknownAuthDialog, OKHdl_Impl) +IMPL_LINK_NOARG_TYPED(UnknownAuthDialog, OKHdl_Impl, Button*, void) { if ( m_pOptionButtonAccept->IsChecked() ) { @@ -38,13 +38,11 @@ IMPL_LINK_NOARG(UnknownAuthDialog, OKHdl_Impl) { EndDialog(); } - - return 1; } -IMPL_LINK_NOARG(UnknownAuthDialog, ViewCertHdl_Impl) +IMPL_LINK_NOARG_TYPED(UnknownAuthDialog, ViewCertHdl_Impl, Button*, void) { uno::Reference< css::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures; @@ -52,8 +50,6 @@ IMPL_LINK_NOARG(UnknownAuthDialog, ViewCertHdl_Impl) css::security::DocumentDigitalSignatures::createDefault(m_xContext) ); xDocumentDigitalSignatures.get()->showCertificate(getCert()); - - return 0; } diff --git a/uui/source/unknownauthdlg.hxx b/uui/source/unknownauthdlg.hxx index 2eafe5e3b5f0..fa6ce667ab42 100644 --- a/uui/source/unknownauthdlg.hxx +++ b/uui/source/unknownauthdlg.hxx @@ -39,8 +39,8 @@ private: const css::uno::Reference< css::uno::XComponentContext >& m_xContext; const css::uno::Reference< css::security::XCertificate >& m_rXCert; - DECL_LINK(OKHdl_Impl, void *); - DECL_LINK(ViewCertHdl_Impl, void *); + DECL_LINK_TYPED(OKHdl_Impl, Button*, void); + DECL_LINK_TYPED(ViewCertHdl_Impl, Button*, void); public: UnknownAuthDialog(vcl::Window* pParent, |