Kaydet (Commit) 9f3dccf5 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in FileDialogHelper_Impl

Change-Id: I91f831be99284b61385cee42dc59efd0cf7f45ba
Reviewed-on: https://gerrit.libreoffice.org/48406Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ec02714d
...@@ -1141,7 +1141,7 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl() ...@@ -1141,7 +1141,7 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl()
Application::RemoveUserEvent( mnPostUserEventId ); Application::RemoveUserEvent( mnPostUserEventId );
mnPostUserEventId = nullptr; mnPostUserEventId = nullptr;
delete mpGraphicFilter; mpGraphicFilter.reset();
if ( mbDeleteMatcher ) if ( mbDeleteMatcher )
delete mpMatcher; delete mpMatcher;
...@@ -1841,7 +1841,7 @@ void FileDialogHelper_Impl::addGraphicFilter() ...@@ -1841,7 +1841,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
return; return;
// create the list of filters // create the list of filters
mpGraphicFilter = new GraphicFilter; mpGraphicFilter.reset( new GraphicFilter );
sal_uInt16 i, j, nCount = mpGraphicFilter->GetImportFormatCount(); sal_uInt16 i, j, nCount = mpGraphicFilter->GetImportFormatCount();
// compute the extension string for all known import filters // compute the extension string for all known import filters
......
...@@ -50,7 +50,7 @@ namespace sfx2 ...@@ -50,7 +50,7 @@ namespace sfx2
std::vector< css::beans::StringPair > maFilters; std::vector< css::beans::StringPair > maFilters;
SfxFilterMatcher* mpMatcher; SfxFilterMatcher* mpMatcher;
GraphicFilter* mpGraphicFilter; std::unique_ptr<GraphicFilter> mpGraphicFilter;
FileDialogHelper* mpAntiImpl; FileDialogHelper* mpAntiImpl;
VclPtr<vcl::Window> mpPreferredParentWindow; VclPtr<vcl::Window> mpPreferredParentWindow;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment