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

loplugin:useuniqueptr in SvxToolbarEntriesListBox

Change-Id: Ied01f97a09d34c43f786c030fbdd256bcf849f04
Reviewed-on: https://gerrit.libreoffice.org/55535Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst d630a53e
......@@ -889,9 +889,9 @@ SvxToolbarEntriesListBox::SvxToolbarEntriesListBox(vcl::Window* pParent, SvxTool
: SvxMenuEntriesListBox(pParent, pPg)
, pPage(pPg)
{
m_pButtonData = new SvLBoxButtonData( this );
BuildCheckBoxButtonImages( m_pButtonData );
EnableCheckButton( m_pButtonData );
m_pButtonData.reset(new SvLBoxButtonData( this ));
BuildCheckBoxButtonImages( m_pButtonData.get() );
EnableCheckButton( m_pButtonData.get() );
}
SvxToolbarEntriesListBox::~SvxToolbarEntriesListBox()
......@@ -901,8 +901,7 @@ SvxToolbarEntriesListBox::~SvxToolbarEntriesListBox()
void SvxToolbarEntriesListBox::dispose()
{
delete m_pButtonData;
m_pButtonData = nullptr;
m_pButtonData.reset();
pPage.clear();
SvxMenuEntriesListBox::dispose();
......@@ -971,7 +970,7 @@ void SvxToolbarEntriesListBox::DataChanged( const DataChangedEvent& rDCEvt )
if (( rDCEvt.GetType() == DataChangedEventType::SETTINGS ) &&
( rDCEvt.GetFlags() & AllSettingsFlags::STYLE ))
{
BuildCheckBoxButtonImages( m_pButtonData );
BuildCheckBoxButtonImages( m_pButtonData.get() );
Invalidate();
}
}
......
......@@ -92,7 +92,7 @@ public:
class SvxToolbarEntriesListBox final : public SvxMenuEntriesListBox
{
Size m_aCheckBoxImageSizePixel;
SvLBoxButtonData* m_pButtonData;
std::unique_ptr<SvLBoxButtonData> m_pButtonData;
VclPtr<SvxConfigPage> pPage;
void ChangeVisibility( SvTreeListEntry* pEntry );
......
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