summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appopen.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-12-18 08:25:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-12-18 10:27:47 +0100
commit574678cf92d50abf456ebbb56b9ea6cc5ca5ecf6 (patch)
tree98418aa4599b57e2fd3f3982e69680ea9a28596d /sfx2/source/appl/appopen.cxx
parent7f2d0dc559e24d861d72cf03a451b0aa4d275d91 (diff)
use unique_ptr in FileOpenDialog_Impl
Change-Id: I530d26a489a130c9fdfa105b3891d21cbfeb3379 Reviewed-on: https://gerrit.libreoffice.org/65305 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/appl/appopen.cxx')
-rw-r--r--sfx2/source/appl/appopen.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index c54b3e58580b..a4ff9c8fe23f 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -594,7 +594,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// get FileName from dialog
std::vector<OUString> aURLList;
OUString aFilter;
- SfxItemSet* pSet = nullptr;
+ std::unique_ptr<SfxItemSet> pSet;
OUString aPath;
const SfxStringItem* pFolderNameItem = rReq.GetArg<SfxStringItem>(SID_PATH);
if ( pFolderNameItem )
@@ -648,12 +648,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
return;
}
- rReq.SetArgs( *static_cast<SfxAllItemSet*>(pSet) );
+ rReq.SetArgs( *static_cast<SfxAllItemSet*>(pSet.get()) );
if ( !aFilter.isEmpty() )
rReq.AppendItem( SfxStringItem( SID_FILTER_NAME, aFilter ) );
rReq.AppendItem( SfxStringItem( SID_TARGETNAME, "_default" ) );
rReq.AppendItem( SfxStringItem( SID_REFERER, "private:user" ) );
- delete pSet;
+ pSet.reset();
if(!aURLList.empty())
{