summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-09 16:12:14 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-09 17:59:12 +0100
commit1b4d60268c05d7a30ce789c30597e6ae705590be (patch)
treef8cf92f59e56f822f47b1920f6de0a0757fc50fe /sd
parent0973922dbfb58d3794c8645fab215ddcf9e24fc2 (diff)
coverity#705627: fix memory leak
Change-Id: Id076550116de23aae982b15c5bf5e0b35bd9f04d
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/dlg/dlgass.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index c37a4ac3b764..784a88c4bbc1 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1556,9 +1556,9 @@ void AssistentDlgImpl::UpdatePreview( sal_Bool bDocPreview )
SfxErrorContext eEC(ERRCTX_SFX_LOADTEMPLATE,mpWindow);
- SfxItemSet* pSet = new SfxAllItemSet( pSfxApp->GetPool() );
if(IsOwnFormat(aDocFile))
{
+ SfxItemSet* pSet = new SfxAllItemSet( pSfxApp->GetPool() );
pSet->Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
if(bDocPreview)
pSet->Put( SfxBoolItem( SID_PREVIEW, sal_True ) );
@@ -1597,13 +1597,13 @@ void AssistentDlgImpl::UpdatePreview( sal_Bool bDocPreview )
// load layout template
SfxObjectShellLock xLayoutDocShell;
SfxErrorContext eEC(ERRCTX_SFX_LOADTEMPLATE,mpWindow);
- SfxItemSet* pSet = new SfxAllItemSet( pSfxApp->GetPool() );
::Window *pParent = Application::GetDefDialogParent();
Application::SetDefDialogParent( mpWindow );
if(IsOwnFormat(aLayoutFile))
{
+ SfxItemSet* pSet = new SfxAllItemSet( pSfxApp->GetPool() );
pSet->Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
pSet->Put( SfxBoolItem( SID_PREVIEW, sal_True ) );