[Libreoffice-commits] core.git: accessibility/inc accessibility/source
Noel Grandin
noel.grandin at collabora.co.uk
Mon Jan 16 07:19:48 UTC 2017
accessibility/inc/standard/vclxaccessiblelist.hxx | 4 ++--
accessibility/source/standard/vclxaccessiblelist.cxx | 8 +++-----
2 files changed, 5 insertions(+), 7 deletions(-)
New commits:
commit 7a507b578910674eeab3062d3dbf893e2d54e9de
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Jan 16 08:49:16 2017 +0200
new loplugin: useuniqueptr: accessibility
Change-Id: I0994bfcae23a2714c78e16c9baa7e0a018d46513
Reviewed-on: https://gerrit.libreoffice.org/33144
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/accessibility/inc/standard/vclxaccessiblelist.hxx b/accessibility/inc/standard/vclxaccessiblelist.hxx
index a8aa753..cd79888 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 e369ea3..d0f87d3 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();
}
More information about the Libreoffice-commits
mailing list