summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-08 14:22:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-14 11:10:42 +0200
commit943e12e73dfa7ec9c09e97be5bdaf851277c25a6 (patch)
tree40e2c8ef43b20292ba745946fb2562a00d1b4a8b /sfx2/source
parent981943837313777d1d96ab82068878dc5d87a5db (diff)
loplugin:useuniqueptr in SfxViewShell_Impl
Change-Id: Ie9efff0d4872d5b3353b765d00e56593e151ff83 Reviewed-on: https://gerrit.libreoffice.org/54173 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/view/viewimp.hxx2
-rw-r--r--sfx2/source/view/viewsh.cxx6
2 files changed, 3 insertions, 5 deletions
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index 2bb7cffb8a95..864c266f7398 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -51,7 +51,7 @@ struct SfxViewShell_Impl
::rtl::Reference< SfxClipboardChangeListener > xClipboardListener;
std::shared_ptr< vcl::PrinterController > m_xPrinterController;
- mutable std::vector<SfxInPlaceClient*>* mpIPClients;
+ mutable std::unique_ptr<std::vector<SfxInPlaceClient*>> mpIPClients;
LibreOfficeKitCallback m_pLibreOfficeKitViewCallback;
void* m_pLibreOfficeKitViewData;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 681b24258a58..0e9f1a0d4e68 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -222,7 +222,6 @@ SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags)
, m_bIsShowView(!(nFlags & SfxViewShellFlags::NO_SHOW))
, m_nFamily(0xFFFF) // undefined, default set by TemplateDialog
, m_pController(nullptr)
-, mpIPClients(nullptr)
, m_pLibreOfficeKitViewCallback(nullptr)
, m_pLibreOfficeKitViewData(nullptr)
, m_bTiledSearching(false)
@@ -231,14 +230,13 @@ SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags)
SfxViewShell_Impl::~SfxViewShell_Impl()
{
- DELETEZ(mpIPClients);
}
std::vector< SfxInPlaceClient* > *SfxViewShell_Impl::GetIPClients_Impl( bool bCreate ) const
{
if (!mpIPClients && bCreate)
- mpIPClients = new std::vector< SfxInPlaceClient* >;
- return mpIPClients;
+ mpIPClients.reset(new std::vector< SfxInPlaceClient* >);
+ return mpIPClients.get();
}
SFX_IMPL_SUPERCLASS_INTERFACE(SfxViewShell,SfxShell)