diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-11 15:21:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-20 14:46:49 +0200 |
commit | d791fe853c47832aa766310947a89599b4f754e7 (patch) | |
tree | 79329eeb415ddc9f1937e6acb462243329a33bbe /cui | |
parent | 6349cee07b9b11098a4174f8d2c4363b38b2b990 (diff) |
loplugin:useuniqueptr in SvxSearchFormatDialog
Change-Id: Ie7da9255e27734f93f7a7758ca9ec25108c0e547
Reviewed-on: https://gerrit.libreoffice.org/56104
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/srchxtra.cxx | 7 | ||||
-rw-r--r-- | cui/source/inc/srchxtra.hxx | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx index b47330756056..9e4ba7cfbfb4 100644 --- a/cui/source/dialogs/srchxtra.cxx +++ b/cui/source/dialogs/srchxtra.cxx @@ -65,8 +65,7 @@ SvxSearchFormatDialog::~SvxSearchFormatDialog() void SvxSearchFormatDialog::dispose() { - delete m_pFontList; - m_pFontList = nullptr; + m_pFontList.reset(); SfxTabDialog::dispose(); } @@ -90,8 +89,8 @@ void SvxSearchFormatDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) if ( !pList ) { if ( !m_pFontList ) - m_pFontList = new FontList( this ); - pList = m_pFontList; + m_pFontList.reset( new FontList( this ) ); + pList = m_pFontList.get(); } if ( pList ) diff --git a/cui/source/inc/srchxtra.hxx b/cui/source/inc/srchxtra.hxx index 0e8442d39c71..23ca743016ba 100644 --- a/cui/source/inc/srchxtra.hxx +++ b/cui/source/inc/srchxtra.hxx @@ -38,7 +38,7 @@ protected: virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override; private: - FontList* m_pFontList; + std::unique_ptr<FontList> m_pFontList; sal_uInt16 m_nNamePageId; sal_uInt16 m_nParaStdPageId; sal_uInt16 m_nParaAlignPageId; |