From 8a65284fe31e6c0a927cb88b75df7845cd248572 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 31 Mar 2015 23:04:14 +0100 Subject: Automated conversion of VclPtr construction to use Instance template. Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e --- uui/source/iahndl.cxx | 2 +- uui/source/masterpasscrtdlg.cxx | 2 +- uui/source/masterpassworddlg.cxx | 2 +- uui/source/nameclashdlg.cxx | 2 +- uui/source/passworddlg.cxx | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'uui/source') diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index f8ec35ec28f3..e0ea07c1b85f 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -1024,7 +1024,7 @@ executeMessageBox( { SolarMutexGuard aGuard; - ScopedVclPtr xBox(new MessBox(pParent, nButtonMask, rTitle, rMessage)); + ScopedVclPtrInstance< MessBox > xBox(pParent, nButtonMask, rTitle, rMessage); sal_uInt16 aResult = xBox->Execute(); switch( aResult ) diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx index 1dd9205c6525..85ddf2754b81 100644 --- a/uui/source/masterpasscrtdlg.cxx +++ b/uui/source/masterpasscrtdlg.cxx @@ -41,7 +41,7 @@ IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl) else { OUString aErrorMsg( ResId( STR_ERROR_PASSWORDS_NOT_IDENTICAL, *pResourceMgr )); - ScopedVclPtr aErrorBox(new MessageDialog(this, aErrorMsg)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(this, aErrorMsg); aErrorBox->Execute(); m_pEDMasterPasswordCrt->SetText( OUString() ); m_pEDMasterPasswordRepeat->SetText( OUString() ); diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx index 46d4b7ebbbdb..924112b088c7 100644 --- a/uui/source/masterpassworddlg.cxx +++ b/uui/source/masterpassworddlg.cxx @@ -49,7 +49,7 @@ MasterPasswordDialog::MasterPasswordDialog if( nDialogMode == ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER ) { OUString aErrorMsg( ResId( STR_ERROR_MASTERPASSWORD_WRONG, *pResourceMgr )); - ScopedVclPtr aErrorBox(new MessageDialog(pParent, aErrorMsg)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(pParent, aErrorMsg); aErrorBox->Execute(); } diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx index 8e11603b278d..06ff359bf3ca 100644 --- a/uui/source/nameclashdlg.cxx +++ b/uui/source/nameclashdlg.cxx @@ -34,7 +34,7 @@ IMPL_LINK( NameClashDialog, ButtonHdl_Impl, PushButton *, pBtn ) OUString aNewName = m_pEDNewName->GetText(); if ( ( aNewName == maNewName ) || aNewName.isEmpty() ) { - ScopedVclPtr aError(new MessageDialog(NULL, maSameName)); + ScopedVclPtrInstance< MessageDialog > aError(nullptr, maSameName); aError->Execute(); return 1; } diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index b5f3e99d519a..2563ea745de7 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -44,7 +44,7 @@ PasswordDialog::PasswordDialog(vcl::Window* _pParent, const sal_uInt16 nOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG; const sal_uInt16 nErrStrId = bIsSimplePasswordRequest ? STR_ERROR_SIMPLE_PASSWORD_WRONG : nOpenToModifyErrStrId; OUString aErrorMsg(ResId(nErrStrId, *pResourceMgr).toString()); - ScopedVclPtr aErrorBox(new MessageDialog(GetParent(), aErrorMsg)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(GetParent(), aErrorMsg); aErrorBox->Execute(); } @@ -106,7 +106,7 @@ IMPL_LINK_NOARG(PasswordDialog, OKHdl_Impl) if (m_pEDConfirmPassword->IsVisible() && bPasswdMismatch) { - ScopedVclPtr aErrorBox(new MessageDialog(this, aPasswdMismatch)); + ScopedVclPtrInstance< MessageDialog > aErrorBox(this, aPasswdMismatch); aErrorBox->Execute(); } else if (bValid) -- cgit v1.2.1