summaryrefslogtreecommitdiffstats
path: root/accessibility
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/inc/standard/vclxaccessiblelist.hxx2
-rw-r--r--accessibility/source/standard/vclxaccessiblelist.cxx10
2 files changed, 9 insertions, 3 deletions
diff --git a/accessibility/inc/standard/vclxaccessiblelist.hxx b/accessibility/inc/standard/vclxaccessiblelist.hxx
index f668e75d7c..7bfb83c7e3 100644
--- a/accessibility/inc/standard/vclxaccessiblelist.hxx
+++ b/accessibility/inc/standard/vclxaccessiblelist.hxx
@@ -136,6 +136,8 @@ private:
*/
virtual void SAL_CALL disposing() override;
+ void disposeChildren();
+
/** This method adds the states
AccessibleStateType::FOCUSABLE and possibly
AccessibleStateType::MULTI_SELECTABLE to the state set
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index 36573dcbb3..00a4258f60 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -108,6 +108,12 @@ void SAL_CALL VCLXAccessibleList::disposing()
{
VCLXAccessibleComponent::disposing();
+ disposeChildren();
+ m_pListBoxHelper.reset();
+}
+
+void VCLXAccessibleList::disposeChildren()
+{
// Dispose all items in the list.
for (rtl::Reference<VCLXAccessibleListItem>& rxChild : m_aAccessibleChildren)
{
@@ -116,8 +122,6 @@ void SAL_CALL VCLXAccessibleList::disposing()
}
m_aAccessibleChildren.clear();
-
- m_pListBoxHelper.reset();
}
@@ -515,7 +519,7 @@ rtl::Reference<VCLXAccessibleListItem> VCLXAccessibleList::CreateChild(sal_Int32
void VCLXAccessibleList::HandleChangedItemList()
{
- m_aAccessibleChildren.clear();
+ disposeChildren();
NotifyAccessibleEvent (
AccessibleEventId::INVALIDATE_ALL_CHILDREN,
Any(), Any());