diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-20 11:27:10 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 12:37:44 +0100 |
commit | 61b224f392eb856bf4cfa0c04c68202a463cbdbf (patch) | |
tree | 77a28e38763bc5f9d95e2c278601d31dc6fbf65d /uui | |
parent | f1d9eef4163e88a3cb6360178b52ce441e65d8ae (diff) |
vclwidget: fixup locally allocated vcl::Window objects
They need to be wrapped in ScopedVclPtr in order to be disposed properly.
Change-Id: Ib64dba353774f54711e4de7f5d15d859c6a4dc7e
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/iahndl.cxx | 6 | ||||
-rw-r--r-- | uui/source/masterpasscrtdlg.cxx | 2 | ||||
-rw-r--r-- | uui/source/masterpassworddlg.cxx | 2 | ||||
-rw-r--r-- | uui/source/nameclashdlg.cxx | 2 | ||||
-rw-r--r-- | uui/source/passworddlg.cxx | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 64e18d87fd71..ba0608021c35 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -1024,7 +1024,7 @@ executeMessageBox( { SolarMutexGuard aGuard; - VclPtr<MessBox> xBox(new MessBox(pParent, nButtonMask, rTitle, rMessage)); + ScopedVclPtr<MessBox> xBox(new MessBox(pParent, nButtonMask, rTitle, rMessage)); sal_uInt16 aResult = xBox->Execute(); switch( aResult ) @@ -1059,7 +1059,7 @@ NameClashResolveDialogResult executeSimpleNameClashResolveDialog( vcl::Window *p if ( !xManager.get() ) return ABORT; - VclPtr<NameClashDialog> aDialog(new NameClashDialog(pParent, xManager.get(), rTargetFolderURL, + ScopedVclPtr<NameClashDialog> aDialog(new NameClashDialog(pParent, xManager.get(), rTargetFolderURL, rClashingName, rProposedNewName, bAllowOverwrite) ); NameClashResolveDialogResult eResult = (NameClashResolveDialogResult) aDialog->Execute(); @@ -1207,7 +1207,7 @@ UUIInteractionHelper::handleMacroConfirmRequest( if ( pResMgr.get() ) { bool bShowSignatures = aSignInfo.getLength() > 0; - VclPtr<MacroWarning> aWarning(new MacroWarning( + ScopedVclPtr<MacroWarning> aWarning(new MacroWarning( getParentProperty(), bShowSignatures, *pResMgr.get()) ); aWarning->SetDocumentURL( aDocumentURL ); diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx index 91f918673e14..1dd9205c6525 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 )); - VclPtr<MessageDialog> aErrorBox(new MessageDialog(this, aErrorMsg)); + ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(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 98dfad1dc61a..46d4b7ebbbdb 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 )); - VclPtr<MessageDialog> aErrorBox(new MessageDialog(pParent, aErrorMsg)); + ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(pParent, aErrorMsg)); aErrorBox->Execute(); } diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx index 032e6e7f2ecd..8e11603b278d 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() ) { - VclPtr<MessageDialog> aError(new MessageDialog(NULL, maSameName)); + ScopedVclPtr<MessageDialog> aError(new MessageDialog(NULL, maSameName)); aError->Execute(); return 1; } diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index c855226e5037..b5f3e99d519a 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()); - VclPtr<MessageDialog> aErrorBox(new MessageDialog(GetParent(), aErrorMsg)); + ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(GetParent(), aErrorMsg)); aErrorBox->Execute(); } @@ -106,7 +106,7 @@ IMPL_LINK_NOARG(PasswordDialog, OKHdl_Impl) if (m_pEDConfirmPassword->IsVisible() && bPasswdMismatch) { - VclPtr<MessageDialog> aErrorBox(new MessageDialog(this, aPasswdMismatch)); + ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(this, aPasswdMismatch)); aErrorBox->Execute(); } else if (bValid) |