lotuswordpro/inc/lwpchangemgr.hxx | 2 +- lotuswordpro/source/filter/lwpchangemgr.cxx | 4 ---- sd/source/ui/dlg/navigatr.cxx | 8 ++++---- sd/source/ui/inc/navigatr.hxx | 4 ++-- 4 files changed, 7 insertions(+), 11 deletions(-)
New commits: commit 14b306398463dbd4c1af511d38513eac05c3672f Author: Noel Grandin <[email protected]> Date: Fri Jun 22 13:39:10 2018 +0200 loplugin:useuniqueptr in LwpChangeMgr these should be held by rtl::Reference Change-Id: I135352dafc6ba0e274d344aec432fe4eabbafe97 Reviewed-on: https://gerrit.libreoffice.org/56333 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/lotuswordpro/inc/lwpchangemgr.hxx b/lotuswordpro/inc/lwpchangemgr.hxx index 914c6af91df6..bbf00ba1ad49 100644 --- a/lotuswordpro/inc/lwpchangemgr.hxx +++ b/lotuswordpro/inc/lwpchangemgr.hxx @@ -85,7 +85,7 @@ private: std::map<LwpFrib*,OUString>* m_pFribMap; std::map<LwpFrib*,OUString> m_DocFribMap; std::map<LwpFrib*,OUString> m_HeadFootFribMap; - std::vector<XFChangeRegion*> m_ChangeList; + std::vector<rtl::Reference<XFChangeRegion>> m_ChangeList; sal_uInt32 m_nCounter; }; diff --git a/lotuswordpro/source/filter/lwpchangemgr.cxx b/lotuswordpro/source/filter/lwpchangemgr.cxx index 1c2816fceba2..9fbfc1906201 100644 --- a/lotuswordpro/source/filter/lwpchangemgr.cxx +++ b/lotuswordpro/source/filter/lwpchangemgr.cxx @@ -146,10 +146,6 @@ void LwpChangeMgr::ConvertAllChange(IXFStream* pStream) pStream->EndElement("text:tracked-changes"); - for (auto const& elem : m_ChangeList) - { - delete elem; - } m_ChangeList.clear(); } void LwpChangeMgr::SetHeadFootFribMap(bool bFlag) commit 99d5312a56a4c12301f9c235b4d51b8a5cec3d71 Author: Noel Grandin <[email protected]> Date: Fri Jun 22 13:21:59 2018 +0200 loplugin:useuniqueptr in SdNavigatorWin Change-Id: Ib1005ab0a0a007d2bad956c8ca0c23c475736d5f Reviewed-on: https://gerrit.libreoffice.org/56332 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index e7a40b65a2e9..754a198caf82 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -106,8 +106,8 @@ SdNavigatorWin::SdNavigatorWin(vcl::Window* pParent, SfxBindings* pInBindings) void SdNavigatorWin::SetUpdateRequestFunctor(const UpdateRequestFunctor& rUpdateRequest) { - mpNavigatorCtrlItem = new SdNavigatorControllerItem(SID_NAVIGATOR_STATE, this, mpBindings, rUpdateRequest); - mpPageNameCtrlItem = new SdPageNameControllerItem(SID_NAVIGATOR_PAGENAME, this, mpBindings); + mpNavigatorCtrlItem.reset( new SdNavigatorControllerItem(SID_NAVIGATOR_STATE, this, mpBindings, rUpdateRequest) ); + mpPageNameCtrlItem.reset( new SdPageNameControllerItem(SID_NAVIGATOR_PAGENAME, this, mpBindings) ); // InitTlb; is initiated over Slot if (rUpdateRequest) @@ -121,8 +121,8 @@ SdNavigatorWin::~SdNavigatorWin() void SdNavigatorWin::dispose() { - DELETEZ(mpNavigatorCtrlItem); - DELETEZ(mpPageNameCtrlItem); + mpNavigatorCtrlItem.reset(); + mpPageNameCtrlItem.reset(); maToolbox.clear(); maTlbObjects.clear(); maLbDocs.clear(); diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx index 5a01453bdf95..a66e66878df0 100644 --- a/sd/source/ui/inc/navigatr.hxx +++ b/sd/source/ui/inc/navigatr.hxx @@ -120,8 +120,8 @@ private: NavigatorDragType meDragType; std::vector<NavDocInfo> maDocList; SfxBindings* mpBindings; - SdNavigatorControllerItem* mpNavigatorCtrlItem; - SdPageNameControllerItem* mpPageNameCtrlItem; + std::unique_ptr<SdNavigatorControllerItem> mpNavigatorCtrlItem; + std::unique_ptr<SdPageNameControllerItem> mpPageNameCtrlItem; /** This flag controls whether all shapes or only the named shapes are shown. _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
