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

loplugin:useuniqueptr in SvxIconChoiceCtrl_Impl

Change-Id: I01524abe1059e79a77c54c8b00c7f43a8575283f
Reviewed-on: https://gerrit.libreoffice.org/53600Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst db41d661
...@@ -173,7 +173,7 @@ class SvxIconChoiceCtrl_Impl ...@@ -173,7 +173,7 @@ class SvxIconChoiceCtrl_Impl
long nMaxVirtWidth; // max. width aVirtOutputSize for ALIGN_TOP long nMaxVirtWidth; // max. width aVirtOutputSize for ALIGN_TOP
long nMaxVirtHeight; // max. height aVirtOutputSize for ALIGN_LEFT long nMaxVirtHeight; // max. height aVirtOutputSize for ALIGN_LEFT
std::unique_ptr<SvxIconChoiceCtrlEntryList_impl> pZOrderList; std::unique_ptr<SvxIconChoiceCtrlEntryList_impl> pZOrderList;
SvxIconChoiceCtrlColumnInfoMap* m_pColumns; std::unique_ptr<SvxIconChoiceCtrlColumnInfoMap> m_pColumns;
VclPtr<IcnViewEdit_Impl> pEdit; VclPtr<IcnViewEdit_Impl> pEdit;
WinBits nWinBits; WinBits nWinBits;
long nMaxBoundHeight; // height of highest BoundRects long nMaxBoundHeight; // height of highest BoundRects
......
...@@ -3294,17 +3294,13 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) ...@@ -3294,17 +3294,13 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
void SvxIconChoiceCtrl_Impl::ClearColumnList() void SvxIconChoiceCtrl_Impl::ClearColumnList()
{ {
if (!m_pColumns) m_pColumns.reset();
return;
m_pColumns->clear();
DELETEZ(m_pColumns);
} }
void SvxIconChoiceCtrl_Impl::SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& rInfo) void SvxIconChoiceCtrl_Impl::SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& rInfo)
{ {
if (!m_pColumns) if (!m_pColumns)
m_pColumns = new SvxIconChoiceCtrlColumnInfoMap; m_pColumns.reset(new SvxIconChoiceCtrlColumnInfoMap);
SvxIconChoiceCtrlColumnInfo* pInfo = new SvxIconChoiceCtrlColumnInfo( rInfo ); SvxIconChoiceCtrlColumnInfo* pInfo = new SvxIconChoiceCtrlColumnInfo( rInfo );
m_pColumns->insert(std::make_pair(nIndex, std::unique_ptr<SvxIconChoiceCtrlColumnInfo>(pInfo))); m_pColumns->insert(std::make_pair(nIndex, std::unique_ptr<SvxIconChoiceCtrlColumnInfo>(pInfo)));
......
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