diff options
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/view/viewimp.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 6 |
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) |