Author: jsc
Date: Wed Jul  2 08:26:40 2014
New Revision: 1607286

URL: http://svn.apache.org/r1607286
Log:
#124856# merge fix frrom trunk, correct number of accessible actions for 
dropdown box

Modified:
    
openoffice/branches/AOO410/main/accessibility/source/standard/vclxaccessiblebox.cxx

Modified: 
openoffice/branches/AOO410/main/accessibility/source/standard/vclxaccessiblebox.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/accessibility/source/standard/vclxaccessiblebox.cxx?rev=1607286&r1=1607285&r2=1607286&view=diff
==============================================================================
--- 
openoffice/branches/AOO410/main/accessibility/source/standard/vclxaccessiblebox.cxx
 (original)
+++ 
openoffice/branches/AOO410/main/accessibility/source/standard/vclxaccessiblebox.cxx
 Wed Jul  2 08:26:40 2014
@@ -182,7 +182,7 @@ void VCLXAccessibleBox::ProcessWindowEve
                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::ge
 
     // 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::doA
        ::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 )


Reply via email to