summaryrefslogtreecommitdiff
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-20 10:17:41 +0000
commit6adab4507858fc1606c8e426151d3d8ec6353bd0 (patch)
tree8d6ef8bd7eae7e5e1d9de801334902586e75e847
parent0bf980c174040474178b308425dc894ad26c3533 (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 (cherry picked from commit 74e673b49fdf8daa3365961de5fb0c9c6d831279) Reviewed-on: https://gerrit.libreoffice.org/15389 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-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 5311dd14e243..9e2725b5a0c1 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);
}
}
}