summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-06 16:51:29 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-06 16:51:29 +0200
commit032aee2cb74e168ecf35ef698a84165cc74fad0a (patch)
tree973d4595c85326c8f298b638bcacf71b1ead8e44 /sw
parent0548f6205c0241e079eb3e17b6d6636dcf621f01 (diff)
loplugin:useuniqueptr
Change-Id: Icd2ff94d1fb9003e634b6f789d66011b1c94dd5b
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index f54a51d80f28..a0ee6b5e14eb 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -869,7 +869,7 @@ static void lcl_SaveDebugDoc( SfxObjectShell *xTargetDocShell,
// aTempFile is not deleted, but that seems to be intentional
utl::TempFile aTempFile( basename, true, &sExt, &sTempDirURL );
INetURLObject aTempFileURL( aTempFile.GetURL() );
- SfxMedium* pDstMed = new SfxMedium(
+ auto pDstMed = o3tl::make_unique<SfxMedium>(
aTempFileURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
StreamMode::STD_READWRITE );
bool bAnyError = !xTargetDocShell->DoSaveAs( *pDstMed );
@@ -879,7 +879,6 @@ static void lcl_SaveDebugDoc( SfxObjectShell *xTargetDocShell,
SAL_WARN( "sw.mailmerge", "Error saving: " << aTempFile.GetURL() );
else
SAL_INFO( "sw.mailmerge", "Saved doc as: " << aTempFile.GetURL() );
- delete pDstMed;
}
static bool lcl_SaveDoc(