You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by js...@apache.org on 2014/07/02 10:19:37 UTC

svn commit: r1607279 - /openoffice/trunk/main/accessibility/source/standard/vclxaccessiblebox.cxx

Author: jsc
Date: Wed Jul  2 08:19:37 2014
New Revision: 1607279

URL: http://svn.apache.org/r1607279
Log:
#124856# correct return number of accessible actions for dropdown box

Patch By: hanya
Review By: jsc

Modified:
    openoffice/trunk/main/accessibility/source/standard/vclxaccessiblebox.cxx

Modified: openoffice/trunk/main/accessibility/source/standard/vclxaccessiblebox.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/accessibility/source/standard/vclxaccessiblebox.cxx?rev=1607279&r1=1607278&r2=1607279&view=diff
==============================================================================
--- openoffice/trunk/main/accessibility/source/standard/vclxaccessiblebox.cxx (original)
+++ openoffice/trunk/main/accessibility/source/standard/vclxaccessiblebox.cxx Wed Jul  2 08:19:37 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 )