diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-11 14:42:23 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-09 22:17:00 +0100 |
commit | 00f2787a4a68633206635743298926bf2e65a8fa (patch) | |
tree | efc3a4f02b3d8acd69d25071499be5a475cb0338 /uui | |
parent | b3dcb2996b70caabda1939c9e85545c97d78404a (diff) |
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133
Conflicts:
sw/qa/tiledrendering/tiledrendering.cxx
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/iahndl.cxx | 24 | ||||
-rw-r--r-- | uui/source/masterpasscrtdlg.cxx | 4 | ||||
-rw-r--r-- | uui/source/masterpassworddlg.cxx | 4 | ||||
-rw-r--r-- | uui/source/nameclashdlg.cxx | 4 | ||||
-rw-r--r-- | uui/source/passworddlg.cxx | 8 |
5 files changed, 22 insertions, 22 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index f265fe6370b4..64e18d87fd71 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -1024,9 +1024,9 @@ executeMessageBox( { SolarMutexGuard aGuard; - MessBox xBox( pParent, nButtonMask, rTitle, rMessage ); + VclPtr<MessBox> xBox(new MessBox(pParent, nButtonMask, rTitle, rMessage)); - sal_uInt16 aResult = xBox.Execute(); + sal_uInt16 aResult = xBox->Execute(); switch( aResult ) { case RET_OK: @@ -1059,11 +1059,11 @@ NameClashResolveDialogResult executeSimpleNameClashResolveDialog( vcl::Window *p if ( !xManager.get() ) return ABORT; - NameClashDialog aDialog( pParent, xManager.get(), rTargetFolderURL, - rClashingName, rProposedNewName, bAllowOverwrite ); + VclPtr<NameClashDialog> aDialog(new NameClashDialog(pParent, xManager.get(), rTargetFolderURL, + rClashingName, rProposedNewName, bAllowOverwrite) ); - NameClashResolveDialogResult eResult = (NameClashResolveDialogResult) aDialog.Execute(); - rProposedNewName = aDialog.getNewName(); + NameClashResolveDialogResult eResult = (NameClashResolveDialogResult) aDialog->Execute(); + rProposedNewName = aDialog->getNewName(); return eResult; } @@ -1207,20 +1207,20 @@ UUIInteractionHelper::handleMacroConfirmRequest( if ( pResMgr.get() ) { bool bShowSignatures = aSignInfo.getLength() > 0; - MacroWarning aWarning( - getParentProperty(), bShowSignatures, *pResMgr.get() ); + VclPtr<MacroWarning> aWarning(new MacroWarning( + getParentProperty(), bShowSignatures, *pResMgr.get()) ); - aWarning.SetDocumentURL( aDocumentURL ); + aWarning->SetDocumentURL( aDocumentURL ); if ( aSignInfo.getLength() > 1 ) { - aWarning.SetStorage( xZipStorage, aDocumentVersion, aSignInfo ); + aWarning->SetStorage( xZipStorage, aDocumentVersion, aSignInfo ); } else if ( aSignInfo.getLength() == 1 ) { - aWarning.SetCertificate( aSignInfo[ 0 ].Signer ); + aWarning->SetCertificate( aSignInfo[ 0 ].Signer ); } - bApprove = aWarning.Execute() == RET_OK; + bApprove = aWarning->Execute() == RET_OK; } if ( bApprove && xApprove.is() ) diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx index a7acc0189a26..f54078ad9435 100644 --- a/uui/source/masterpasscrtdlg.cxx +++ b/uui/source/masterpasscrtdlg.cxx @@ -41,8 +41,8 @@ IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl) else { OUString aErrorMsg( ResId( STR_ERROR_PASSWORDS_NOT_IDENTICAL, *pResourceMgr )); - MessageDialog aErrorBox(this, aErrorMsg); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(this, aErrorMsg)); + aErrorBox->Execute(); m_pEDMasterPasswordCrt->SetText( OUString() ); m_pEDMasterPasswordRepeat->SetText( OUString() ); m_pEDMasterPasswordCrt->GrabFocus(); diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx index 3b6a071968a3..0b219a62b835 100644 --- a/uui/source/masterpassworddlg.cxx +++ b/uui/source/masterpassworddlg.cxx @@ -49,8 +49,8 @@ MasterPasswordDialog::MasterPasswordDialog if( nDialogMode == ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER ) { OUString aErrorMsg( ResId( STR_ERROR_MASTERPASSWORD_WRONG, *pResourceMgr )); - MessageDialog aErrorBox(pParent, aErrorMsg); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(pParent, aErrorMsg)); + aErrorBox->Execute(); } m_pOKBtn->SetClickHdl( LINK( this, MasterPasswordDialog, OKHdl_Impl ) ); diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx index 63ad0926dc02..105ba878a4fd 100644 --- a/uui/source/nameclashdlg.cxx +++ b/uui/source/nameclashdlg.cxx @@ -34,8 +34,8 @@ IMPL_LINK( NameClashDialog, ButtonHdl_Impl, PushButton *, pBtn ) OUString aNewName = m_pEDNewName->GetText(); if ( ( aNewName == maNewName ) || aNewName.isEmpty() ) { - MessageDialog aError(NULL, maSameName); - aError.Execute(); + VclPtr<MessageDialog> aError(new MessageDialog(NULL, maSameName)); + aError->Execute(); return 1; } maNewName = aNewName; diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 2e5ed497b599..421b84681ad7 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -44,8 +44,8 @@ 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()); - MessageDialog aErrorBox(GetParent(), aErrorMsg); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(GetParent(), aErrorMsg)); + aErrorBox->Execute(); } // default settings for enter password or reenter passwd... @@ -91,8 +91,8 @@ IMPL_LINK_NOARG(PasswordDialog, OKHdl_Impl) if (m_pEDConfirmPassword->IsVisible() && bPasswdMismatch) { - MessageDialog aErrorBox(this, aPasswdMismatch); - aErrorBox.Execute(); + VclPtr<MessageDialog> aErrorBox(new MessageDialog(this, aPasswdMismatch)); + aErrorBox->Execute(); } else if (bValid) EndDialog( RET_OK ); |