summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-03 15:03:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-03 15:03:44 +0100
commit74e673b49fdf8daa3365961de5fb0c9c6d831279 (patch)
tree816bef96272657d786a8795ab4ca5a665d30c7f9 /accessibility
parentda907c7b7a328d29d5ede8d43f539811856417f9 (diff)
Resolves: tdf#82998 no object:active descendant changed emitted
for listboxes in WB_DROPDOWN mode which means the dropdown exists, but when the drop down is not activated. I think it's plausible that there was confusion around "b_IsDropDownList" and that the meaning taken by the author was the the dropdown is active if b_IsDropDownList is set, so renamed that to bHasDropDownList and take the old "b_IsDropDownList" path when "b_IsDropDownList && ..IsInDropDown()" Folded the then both equal code paths of the LISTBOX code together. No idea if there should be an additional equivalent AccessibleEventId::SELECTION_CHANGED for LISTBOXES like COMBOBOX instead of AccessibleEventId::ACTIVE_DESCENDANT_CHANGED in the dropdown not active case. Change-Id: I6db3ec21b392b7bf1b488235464202bb326f2535
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/standard/vclxaccessiblelist.cxx56
1 files changed, 16 insertions, 40 deletions
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index 31217a2e9dbe..7fc060ba89e2 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -205,7 +205,7 @@ void VCLXAccessibleList::UpdateSelection_Acc (const ::rtl::OUString& sTextOfSele
}
-void VCLXAccessibleList::UpdateSelection_Impl_Acc(bool b_IsDropDownList)
+void VCLXAccessibleList::UpdateSelection_Impl_Acc(bool bHasDropDownList)
{
uno::Any aOldValue, aNewValue;
@@ -261,22 +261,18 @@ void VCLXAccessibleList::UpdateSelection_Impl_Acc(bool b_IsDropDownList)
if (m_aBoxType == COMBOBOX)
{
- if (b_IsDropDownList)
+ //VCLXAccessibleDropDownComboBox
+ //when in list is dropped down, xText = NULL
+ if (bHasDropDownList && m_pListBoxHelper && m_pListBoxHelper->IsInDropDown())
{
- //VCLXAccessibleDropDownComboBox
- //when in list is dropped down, xText = NULL
- if (m_pListBoxHelper && m_pListBoxHelper->IsInDropDown())
+ if ( aNewValue.hasValue() || aOldValue.hasValue() )
{
- if ( aNewValue.hasValue() || aOldValue.hasValue() )
- {
- NotifyAccessibleEvent(
- AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
- aOldValue,
- aNewValue );
-
- NotifyListItem(aNewValue);
+ NotifyAccessibleEvent(
+ AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
+ aOldValue,
+ aNewValue );
- }
+ NotifyListItem(aNewValue);
}
}
else
@@ -287,34 +283,14 @@ void VCLXAccessibleList::UpdateSelection_Impl_Acc(bool b_IsDropDownList)
}
else if (m_aBoxType == LISTBOX)
{
- if (b_IsDropDownList)
+ if ( aNewValue.hasValue() || aOldValue.hasValue() )
{
- //VCLXAccessibleDropdownListBox
- //when in list is dropped down, xText = NULL
- if (m_pListBoxHelper && m_pListBoxHelper->IsInDropDown())
- {
- if ( aNewValue.hasValue() || aOldValue.hasValue() )
- {
- NotifyAccessibleEvent(
- AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
- aOldValue,
- aNewValue );
+ NotifyAccessibleEvent(
+ AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
+ aOldValue,
+ aNewValue );
- NotifyListItem(aNewValue);
- }
- }
- }
- else
- {
- if ( aNewValue.hasValue() || aOldValue.hasValue() )
- {
- NotifyAccessibleEvent(
- AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
- aOldValue,
- aNewValue );
-
- NotifyListItem(aNewValue);
- }
+ NotifyListItem(aNewValue);
}
}
}