summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-16 16:05:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-24 07:57:19 +0100
commit9f3dccf5558915617d02c8cc0d795ec45e2532d1 (patch)
tree37c40b8787ab6ff5ef9e591beac71ca56499a0f0 /sfx2
parentec02714d6cd5be67d03e333efddb42ab572cae77 (diff)
loplugin:useuniqueptr in FileDialogHelper_Impl
Change-Id: I91f831be99284b61385cee42dc59efd0cf7f45ba Reviewed-on: https://gerrit.libreoffice.org/48406 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx4
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 738ab2564497..1ae72bddd3dc 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1141,7 +1141,7 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl()
Application::RemoveUserEvent( mnPostUserEventId );
mnPostUserEventId = nullptr;
- delete mpGraphicFilter;
+ mpGraphicFilter.reset();
if ( mbDeleteMatcher )
delete mpMatcher;
@@ -1841,7 +1841,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
return;
// create the list of filters
- mpGraphicFilter = new GraphicFilter;
+ mpGraphicFilter.reset( new GraphicFilter );
sal_uInt16 i, j, nCount = mpGraphicFilter->GetImportFormatCount();
// compute the extension string for all known import filters
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index b7aae374dfcd..38a894e0d42e 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -50,7 +50,7 @@ namespace sfx2
std::vector< css::beans::StringPair > maFilters;
SfxFilterMatcher* mpMatcher;
- GraphicFilter* mpGraphicFilter;
+ std::unique_ptr<GraphicFilter> mpGraphicFilter;
FileDialogHelper* mpAntiImpl;
VclPtr<vcl::Window> mpPreferredParentWindow;