summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-24 13:42:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-29 17:03:46 +0200
commit979293ca138ccfb22ff1282b9055ae18b775fed8 (patch)
treee12dee56ff9d432771cfa3c9ac6fba968be8dd16 /svtools/source
parent89f470752d0ecc2a389aa8f630800a195a341a6d (diff)
loplugin:useuniqueptr in FontNameBox
Change-Id: Icb362d46b34010dbfc97014d76a364b720c73b02 Reviewed-on: https://gerrit.libreoffice.org/53595 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/control/ctrlbox.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 82cd893e9710..5704f3e9d977 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -669,7 +669,6 @@ void LineListBox::DataChanged( const DataChangedEvent& rDCEvt )
FontNameBox::FontNameBox( vcl::Window* pParent, WinBits nWinStyle ) :
ComboBox( pParent, nWinStyle )
{
- mpFontList = nullptr;
mbWYSIWYG = false;
InitFontMRUEntriesFile();
}
@@ -759,8 +758,7 @@ void FontNameBox::InitFontMRUEntriesFile()
void FontNameBox::ImplDestroyFontList()
{
- delete mpFontList;
- mpFontList = nullptr;
+ mpFontList.reset();
}
void FontNameBox::Fill( const FontList* pList )
@@ -772,7 +770,7 @@ void FontNameBox::Fill( const FontList* pList )
Clear();
ImplDestroyFontList();
- mpFontList = new ImplFontList;
+ mpFontList.reset(new ImplFontList);
// insert fonts
sal_uInt16 nFontCount = pList->GetFontNameCount();