sc/source/ui/dbgui/pfiltdlg.cxx | 5 ++--- sc/source/ui/inc/pfiltdlg.hxx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit a97411b061a382dc09423d04c633dc9b7d24a737 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Jul 16 16:50:15 2018 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jul 17 12:30:51 2018 +0200 loplugin:useuniqueptr in ScPivotFilterDlg Change-Id: Iffd5b18048117f59443fc63f137cd468e7e22750 Reviewed-on: https://gerrit.libreoffice.org/57525 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index 757cde2abed9..cdd761e8fdc7 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -85,7 +85,7 @@ void ScPivotFilterDlg::dispose() { for (auto& a : m_pEntryLists) a.reset(); - delete pOutItem; + pOutItem.reset(); m_pLbField1.clear(); m_pLbCond1.clear(); m_pEdVal1.clear(); @@ -413,8 +413,7 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem() theParam.bCaseSens = m_pBtnCase->IsChecked(); theParam.eSearchType = m_pBtnRegExp->IsChecked() ? utl::SearchParam::SearchType::Regexp : utl::SearchParam::SearchType::Normal; - if ( pOutItem ) DELETEZ( pOutItem ); - pOutItem = new ScQueryItem( nWhichQuery, &theParam ); + pOutItem.reset( new ScQueryItem( nWhichQuery, &theParam ) ); return *pOutItem; } diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx index a0a33356e5e0..07f2ab565bcc 100644 --- a/sc/source/ui/inc/pfiltdlg.hxx +++ b/sc/source/ui/inc/pfiltdlg.hxx @@ -73,7 +73,7 @@ private: const sal_uInt16 nWhichQuery; const ScQueryParam theQueryData; - ScQueryItem* pOutItem; + std::unique_ptr<ScQueryItem> pOutItem; ScViewData* pViewData; ScDocument* pDoc; SCTAB nSrcTab; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits