summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-03 15:03:34 +0100
committerAndras Timar <andras.timar@collabora.com>2015-04-23 15:33:33 +0200
commitc4a346a2195c2d7d642d8c6f48723d4d854ae4e4 (patch)
tree9ada9021b5e3065cb1a6f368cb77f6aaa3021463 /accessibility
parent89b7410d6e000b847485f91be0c29db91d0e51a4 (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>
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 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);
}
}
}