diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-16 16:50:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-17 12:30:51 +0200 |
commit | a97411b061a382dc09423d04c633dc9b7d24a737 (patch) | |
tree | 985683f1a56441245a9746bd02f4f8d4c7effd64 /sc/source/ui/dbgui/pfiltdlg.cxx | |
parent | 011c6c719f77181f042c68ba92e38847e39c8ca1 (diff) |
loplugin:useuniqueptr in ScPivotFilterDlg
Change-Id: Iffd5b18048117f59443fc63f137cd468e7e22750
Reviewed-on: https://gerrit.libreoffice.org/57525
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/dbgui/pfiltdlg.cxx')
-rw-r--r-- | sc/source/ui/dbgui/pfiltdlg.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
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; } |