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

new loplugin: useuniqueptr: accessibility

Change-Id: I0994bfcae23a2714c78e16c9baa7e0a018d46513
Reviewed-on: https://gerrit.libreoffice.org/33144Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 5de98da7
......@@ -135,10 +135,10 @@ public:
void UpdateFocus_Impl_Acc ( sal_Int32 nPos, bool b_IsDropDownList) ;
static void NotifyListItem(css::uno::Any& val);
::accessibility::IComboListBoxHelper* getListBoxHelper() { return m_pListBoxHelper; }
::accessibility::IComboListBoxHelper* getListBoxHelper() { return m_pListBoxHelper.get(); }
protected:
BoxType m_aBoxType;
::accessibility::IComboListBoxHelper* m_pListBoxHelper;
std::unique_ptr<::accessibility::IComboListBoxHelper> m_pListBoxHelper;
ListItems m_aAccessibleChildren;
sal_Int32 m_nVisibleLineCount;
/// Index in parent. This is settable from the outside.
......
......@@ -74,7 +74,7 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType
{
VclPtr< ComboBox > pBox = GetAs< ComboBox >();
if ( pBox )
m_pListBoxHelper = new VCLListBoxHelper<ComboBox> (*pBox);
m_pListBoxHelper.reset( new VCLListBoxHelper<ComboBox> (*pBox) );
break;
}
......@@ -82,7 +82,7 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType
{
VclPtr< ListBox > pBox = GetAs< ListBox >();
if ( pBox )
m_pListBoxHelper = new VCLListBoxHelper<ListBox> (*pBox);
m_pListBoxHelper.reset( new VCLListBoxHelper<ListBox> (*pBox) );
break;
}
}
......@@ -98,7 +98,6 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType
VCLXAccessibleList::~VCLXAccessibleList()
{
delete m_pListBoxHelper;
}
......@@ -115,8 +114,7 @@ void SAL_CALL VCLXAccessibleList::disposing()
// Dispose all items in the list.
clearItems();
delete m_pListBoxHelper;
m_pListBoxHelper = nullptr;
m_pListBoxHelper.reset();
}
......
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