summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-14 16:20:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-16 12:09:05 +0200
commit13c78ceb25151b971e28f64d2ab931016eea7408 (patch)
tree1269857b73a80fb2336152d9f989feff52a9d7e3 /starmath
parent899fbd617b32771bc8c14effc52a7153465adf5d (diff)
pass SfxMedium around by std::unique_ptr
Change-Id: Ibde7b68d9248f80d5304991390a80742265f37b3 Reviewed-on: https://gerrit.libreoffice.org/59031 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/view.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 6270bca09777..f817343dd5e0 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1953,15 +1953,15 @@ IMPL_LINK( SmViewShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, voi
if ( ERRCODE_NONE == _pFileDlg->GetError() )
{
- SfxMedium* pMedium = mpImpl->pDocInserter->CreateMedium();
+ std::unique_ptr<SfxMedium> pMedium = mpImpl->pDocInserter->CreateMedium();
- if ( pMedium != nullptr )
+ if ( pMedium )
{
if ( pMedium->IsStorage() )
Insert( *pMedium );
else
InsertFrom( *pMedium );
- delete pMedium;
+ pMedium.reset();
SmDocShell* pDoc = GetDoc();
pDoc->UpdateText();