Kaydet (Commit) 979293ca authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in FontNameBox

Change-Id: Icb362d46b34010dbfc97014d76a364b720c73b02
Reviewed-on: https://gerrit.libreoffice.org/53595Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 89f47075
......@@ -283,7 +283,7 @@ inline void LineListBox::SetNone( const OUString& sNone )
class SVT_DLLPUBLIC FontNameBox : public ComboBox
{
private:
ImplFontList* mpFontList;
std::unique_ptr<ImplFontList> mpFontList;
bool mbWYSIWYG;
OUString maFontMRUEntriesFile;
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment