summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/dialogs/srchxtra.cxx7
-rw-r--r--cui/source/inc/srchxtra.hxx2
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;