[Libreoffice-commits] core.git: Branch 'aoo/trunk' - accessibility/source

Jürgen Schmidt jsc at apache.org
Wed Jul 2 03:09:26 PDT 2014


 accessibility/source/standard/vclxaccessiblebox.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit efe87c0d84e5f76034378d48d0d1fc2025a37645
Author: Jürgen Schmidt <jsc at apache.org>
Date:   Wed Jul 2 08:19:37 2014 +0000

    #124856# correct return number of accessible actions for dropdown box
    
    Patch By: hanya
    Review By: jsc

diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx
index 00d8bc8..f09e1eb 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -182,7 +182,7 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
         case VCLEVENT_COMBOBOX_SELECT:
         {
                  VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
-                 if (pList != NULL)
+                 if (pList != NULL && m_xText.is())
                  {
                         Reference<XAccessibleText> xText (m_xText->getAccessibleContext(), UNO_QUERY);
                         if ( xText.is() )
@@ -416,7 +416,7 @@ sal_Int32 SAL_CALL VCLXAccessibleBox::getAccessibleActionCount (void)
 
     // There is one action for drop down boxes (toggle popup) and none for
     // the other boxes.
-    return m_bIsDropDownBox ? 0 : 1;
+    return m_bIsDropDownBox ? 1 : 0;
 }
 
 sal_Bool SAL_CALL VCLXAccessibleBox::doAccessibleAction (sal_Int32 nIndex)
@@ -463,11 +463,8 @@ sal_Bool SAL_CALL VCLXAccessibleBox::doAccessibleAction (sal_Int32 nIndex)
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
     if (nIndex<0 || nIndex>=getAccessibleActionCount())
         throw ::com::sun::star::lang::IndexOutOfBoundsException();
-    //Solution:When combo_box,it should not has action information.
-    //return TK_RES_STRING( RID_STR_ACC_ACTION_TOGGLEPOPUP);
-    if (m_aBoxType == LISTBOX)
-        return ::rtl::OUString();
-    return m_bIsDropDownBox?::rtl::OUString():TK_RES_STRING( RID_STR_ACC_ACTION_TOGGLEPOPUP);
+
+    return m_bIsDropDownBox ? TK_RES_STRING( RID_STR_ACC_ACTION_TOGGLEPOPUP) : ::rtl::OUString();
 }
 
 Reference< XAccessibleKeyBinding > VCLXAccessibleBox::getAccessibleActionKeyBinding( sal_Int32 nIndex )


More information about the Libreoffice-commits mailing list