diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-16 12:53:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-16 14:41:33 +0100 |
commit | 8b992d6f86298e115079a9d93e2569f7bef5b47e (patch) | |
tree | c81d61aa4d5d6eea138adf9ddc42e003270c4f9c /sd | |
parent | 2c6f3773f2ad3b1119593fd5d0c7fb6356da95b0 (diff) |
use more ScopedVclPtr to avoid missing dispose
follow on to
commit 315be3a276b01e88c794da1dbc6252a8b803d269
Author: Caolán McNamara <caolanm@redhat.com>
Date: Fri Jan 12 10:48:59 2018 +0000
VclPtr, missing dispose
Change-Id: Idfa4709f10928ef6d53ada93db0f5452e5d5c4eb
Reviewed-on: https://gerrit.libreoffice.org/47982
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/docshell/docshel2.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index 6ac506bb3d5e..1e02c6e8e4d7 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -284,9 +284,9 @@ bool DrawDocShell::CheckPageName (vcl::Window* pWin, OUString& rName ) { OUString aDesc( SdResId( STR_WARN_PAGE_EXISTS ) ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - VclPtr<AbstractSvxNameDialog> aNameDlg = pFact ? pFact->CreateSvxNameDialog( pWin, aStrForDlg, aDesc ) : nullptr; - if( aNameDlg ) + if( pFact ) { + ScopedVclPtr<AbstractSvxNameDialog> aNameDlg( pFact->CreateSvxNameDialog( pWin, aStrForDlg, aDesc ) ); aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE ); aNameDlg->SetCheckNameHdl( LINK( this, DrawDocShell, RenameSlideHdl ) ); @@ -300,7 +300,6 @@ bool DrawDocShell::CheckPageName (vcl::Window* pWin, OUString& rName ) aNameDlg->GetName( rName ); bIsNameValid = IsNewPageNameValid( rName ); } - aNameDlg.disposeAndClear(); } } |