[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - accessibility/source

Caolán McNamara caolanm at redhat.com
Mon Apr 20 03:19:41 PDT 2015


 accessibility/source/standard/vclxaccessiblelist.cxx |   56 +++++--------------
 1 file changed, 16 insertions(+), 40 deletions(-)

New commits:
commit 6adab4507858fc1606c8e426151d3d8ec6353bd0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 3 15:03:34 2015 +0100

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index 5311dd1..9e2725b 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);
         }
     }
 }


More information about the Libreoffice-commits mailing list