summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-16 08:49:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-16 07:19:26 +0000
commit7a507b578910674eeab3062d3dbf893e2d54e9de (patch)
tree47b7360d266849873dbc900117235cf518ec2b7d /accessibility
parent5de98da7e01b08f59b6f26daa82f3090bd6a4f42 (diff)
new loplugin: useuniqueptr: accessibility
Change-Id: I0994bfcae23a2714c78e16c9baa7e0a018d46513 Reviewed-on: https://gerrit.libreoffice.org/33144 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/inc/standard/vclxaccessiblelist.hxx4
-rw-r--r--accessibility/source/standard/vclxaccessiblelist.cxx8
2 files changed, 5 insertions, 7 deletions
diff --git a/accessibility/inc/standard/vclxaccessiblelist.hxx b/accessibility/inc/standard/vclxaccessiblelist.hxx
index a8aa753ca479..cd79888f8922 100644
--- a/accessibility/inc/standard/vclxaccessiblelist.hxx
+++ b/accessibility/inc/standard/vclxaccessiblelist.hxx
@@ -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.
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index e369ea329aa0..d0f87d3e9335 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -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();
}