sw/source/ui/index/cnttab.cxx | 8 ++++---- sw/source/uibase/inc/swuicnttab.hxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 466d6d77f08a46f7801ba3b9771c25c2eb2a7902 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jul 27 08:57:34 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Jul 30 08:21:27 2018 +0200 loplugin:useuniqueptr in SwTOXSelectTabPage Change-Id: Idfc3298ef74a3bdde55f2091dc035c5133413dd2 Reviewed-on: https://gerrit.libreoffice.org/58241 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 48517308463e..5680a394e160 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -816,7 +816,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r get(m_pLanguageLB, "lang"); get(m_pSortAlgorithmLB, "keytype"); - pIndexEntryWrapper = new IndexEntrySupplierWrapper(); + pIndexEntryWrapper.reset(new IndexEntrySupplierWrapper()); m_pLanguageLB->SetLanguageList( SvxLanguageListFlags::ALL | SvxLanguageListFlags::ONLY_KNOWN, false ); @@ -877,8 +877,8 @@ SwTOXSelectTabPage::~SwTOXSelectTabPage() void SwTOXSelectTabPage::dispose() { - delete pIndexRes; - delete pIndexEntryWrapper; + pIndexRes.reset(); + pIndexEntryWrapper.reset(); m_pTitleED.clear(); m_pTypeFT.clear(); m_pTypeLB.clear(); @@ -1416,7 +1416,7 @@ void SwTOXSelectTabPage::LanguageHdl( ListBox const * pBox ) Sequence< OUString > aSeq = pIndexEntryWrapper->GetAlgorithmList( aLcl ); if( !pIndexRes ) - pIndexRes = new IndexEntryResource(); + pIndexRes.reset(new IndexEntryResource()); OUString sOldString; void* pUserData; diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 0941e1bab00c..522a0a1298c4 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -190,7 +190,7 @@ class SwTOXSelectTabPage : public SfxTabPage VclPtr<SvxLanguageBox> m_pLanguageLB; VclPtr<ListBox> m_pSortAlgorithmLB; - IndexEntryResource* pIndexRes; + std::unique_ptr<IndexEntryResource> pIndexRes; OUString aStyleArr[MAXLEVEL]; OUString sAutoMarkURL; @@ -198,7 +198,7 @@ class SwTOXSelectTabPage : public SfxTabPage OUString sAddStyleUser; OUString sAddStyleContent; - const IndexEntrySupplierWrapper* pIndexEntryWrapper; + std::unique_ptr<const IndexEntrySupplierWrapper> pIndexEntryWrapper; bool m_bWaitingInitialSettings; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits