1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_accessibility.hxx" 30*cdf0e10cSrcweir #include <accessibility/standard/vclxaccessiblebox.hxx> 31*cdf0e10cSrcweir #include <accessibility/standard/vclxaccessibletextfield.hxx> 32*cdf0e10cSrcweir #include <accessibility/standard/vclxaccessibleedit.hxx> 33*cdf0e10cSrcweir #include <accessibility/standard/vclxaccessiblelist.hxx> 34*cdf0e10cSrcweir #include <accessibility/helper/listboxhelper.hxx> 35*cdf0e10cSrcweir 36*cdf0e10cSrcweir #include <unotools/accessiblestatesethelper.hxx> 37*cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleStateType.hpp> 38*cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleEventId.hpp> 39*cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleRole.hpp> 40*cdf0e10cSrcweir #include <vcl/svapp.hxx> 41*cdf0e10cSrcweir #include <vcl/combobox.hxx> 42*cdf0e10cSrcweir #include <vcl/lstbox.hxx> 43*cdf0e10cSrcweir #include <accessibility/helper/accresmgr.hxx> 44*cdf0e10cSrcweir #include <accessibility/helper/accessiblestrings.hrc> 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir using namespace ::com::sun::star; 47*cdf0e10cSrcweir using namespace ::com::sun::star::uno; 48*cdf0e10cSrcweir using namespace ::com::sun::star::lang; 49*cdf0e10cSrcweir using namespace ::com::sun::star::beans; 50*cdf0e10cSrcweir using namespace ::com::sun::star::accessibility; 51*cdf0e10cSrcweir 52*cdf0e10cSrcweir VCLXAccessibleBox::VCLXAccessibleBox (VCLXWindow* pVCLWindow, BoxType aType, bool bIsDropDownBox) 53*cdf0e10cSrcweir : VCLXAccessibleComponent (pVCLWindow), 54*cdf0e10cSrcweir m_aBoxType (aType), 55*cdf0e10cSrcweir m_bIsDropDownBox (bIsDropDownBox), 56*cdf0e10cSrcweir m_nIndexInParent (DEFAULT_INDEX_IN_PARENT) 57*cdf0e10cSrcweir { 58*cdf0e10cSrcweir // Set up the flags that indicate which children this object has. 59*cdf0e10cSrcweir m_bHasListChild = true; 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir // A text field is not present for non drop down list boxes. 62*cdf0e10cSrcweir if ((m_aBoxType==LISTBOX) && ! m_bIsDropDownBox) 63*cdf0e10cSrcweir m_bHasTextChild = false; 64*cdf0e10cSrcweir else 65*cdf0e10cSrcweir m_bHasTextChild = true; 66*cdf0e10cSrcweir } 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir VCLXAccessibleBox::~VCLXAccessibleBox (void) 69*cdf0e10cSrcweir { 70*cdf0e10cSrcweir } 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir void VCLXAccessibleBox::ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) 73*cdf0e10cSrcweir { 74*cdf0e10cSrcweir uno::Any aOldValue, aNewValue; 75*cdf0e10cSrcweir uno::Reference<XAccessible> xAcc; 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir switch ( rVclWindowEvent.GetId() ) 78*cdf0e10cSrcweir { 79*cdf0e10cSrcweir case VCLEVENT_WINDOW_SHOW: 80*cdf0e10cSrcweir case VCLEVENT_WINDOW_HIDE: 81*cdf0e10cSrcweir { 82*cdf0e10cSrcweir Window* pChildWindow = (Window *) rVclWindowEvent.GetData(); 83*cdf0e10cSrcweir // Just compare to the combo box text field. All other children 84*cdf0e10cSrcweir // are identical to this object in which case this object will 85*cdf0e10cSrcweir // be removed in a short time. 86*cdf0e10cSrcweir if (m_aBoxType==COMBOBOX) 87*cdf0e10cSrcweir { 88*cdf0e10cSrcweir ComboBox* pComboBox = static_cast<ComboBox*>(GetWindow()); 89*cdf0e10cSrcweir if ( ( pComboBox != NULL ) && ( pChildWindow != NULL ) ) 90*cdf0e10cSrcweir if (pChildWindow == pComboBox->GetSubEdit()) 91*cdf0e10cSrcweir { 92*cdf0e10cSrcweir if (rVclWindowEvent.GetId() == VCLEVENT_WINDOW_SHOW) 93*cdf0e10cSrcweir { 94*cdf0e10cSrcweir // Instantiate text field. 95*cdf0e10cSrcweir getAccessibleChild (0); 96*cdf0e10cSrcweir aNewValue <<= m_xText; 97*cdf0e10cSrcweir } 98*cdf0e10cSrcweir else 99*cdf0e10cSrcweir { 100*cdf0e10cSrcweir // Release text field. 101*cdf0e10cSrcweir aOldValue <<= m_xText; 102*cdf0e10cSrcweir m_xText = NULL; 103*cdf0e10cSrcweir } 104*cdf0e10cSrcweir // Tell the listeners about the new/removed child. 105*cdf0e10cSrcweir NotifyAccessibleEvent ( 106*cdf0e10cSrcweir AccessibleEventId::CHILD, 107*cdf0e10cSrcweir aOldValue, aNewValue); 108*cdf0e10cSrcweir } 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir } 111*cdf0e10cSrcweir } 112*cdf0e10cSrcweir break; 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir default: 115*cdf0e10cSrcweir VCLXAccessibleComponent::ProcessWindowChildEvent (rVclWindowEvent); 116*cdf0e10cSrcweir } 117*cdf0e10cSrcweir } 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) 120*cdf0e10cSrcweir { 121*cdf0e10cSrcweir switch ( rVclWindowEvent.GetId() ) 122*cdf0e10cSrcweir { 123*cdf0e10cSrcweir case VCLEVENT_DROPDOWN_OPEN: 124*cdf0e10cSrcweir case VCLEVENT_DROPDOWN_CLOSE: 125*cdf0e10cSrcweir case VCLEVENT_LISTBOX_DOUBLECLICK: 126*cdf0e10cSrcweir case VCLEVENT_LISTBOX_SCROLLED: 127*cdf0e10cSrcweir case VCLEVENT_LISTBOX_SELECT: 128*cdf0e10cSrcweir case VCLEVENT_LISTBOX_ITEMADDED: 129*cdf0e10cSrcweir case VCLEVENT_LISTBOX_ITEMREMOVED: 130*cdf0e10cSrcweir case VCLEVENT_COMBOBOX_ITEMADDED: 131*cdf0e10cSrcweir case VCLEVENT_COMBOBOX_ITEMREMOVED: 132*cdf0e10cSrcweir case VCLEVENT_COMBOBOX_SCROLLED: 133*cdf0e10cSrcweir { 134*cdf0e10cSrcweir // Forward the call to the list child. 135*cdf0e10cSrcweir VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get()); 136*cdf0e10cSrcweir if ( pList == NULL ) 137*cdf0e10cSrcweir { 138*cdf0e10cSrcweir getAccessibleChild ( m_bHasTextChild ? 1 : 0 ); 139*cdf0e10cSrcweir pList = static_cast<VCLXAccessibleList*>(m_xList.get()); 140*cdf0e10cSrcweir } 141*cdf0e10cSrcweir if ( pList != NULL ) 142*cdf0e10cSrcweir pList->ProcessWindowEvent (rVclWindowEvent); 143*cdf0e10cSrcweir break; 144*cdf0e10cSrcweir } 145*cdf0e10cSrcweir 146*cdf0e10cSrcweir case VCLEVENT_COMBOBOX_SELECT: 147*cdf0e10cSrcweir case VCLEVENT_COMBOBOX_DESELECT: 148*cdf0e10cSrcweir { 149*cdf0e10cSrcweir // Selection is handled by VCLXAccessibleList which operates on 150*cdf0e10cSrcweir // the same VCL object as this box does. In case of the 151*cdf0e10cSrcweir // combobox, however, we have to help the list with providing 152*cdf0e10cSrcweir // the text of the currently selected item. 153*cdf0e10cSrcweir VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get()); 154*cdf0e10cSrcweir if (pList != NULL && m_xText.is()) 155*cdf0e10cSrcweir { 156*cdf0e10cSrcweir Reference<XAccessibleText> xText (m_xText->getAccessibleContext(), UNO_QUERY); 157*cdf0e10cSrcweir if ( xText.is() ) 158*cdf0e10cSrcweir { 159*cdf0e10cSrcweir ::rtl::OUString sText = xText->getSelectedText(); 160*cdf0e10cSrcweir if ( !sText.getLength() ) 161*cdf0e10cSrcweir sText = xText->getText(); 162*cdf0e10cSrcweir pList->UpdateSelection (sText); 163*cdf0e10cSrcweir } 164*cdf0e10cSrcweir } 165*cdf0e10cSrcweir break; 166*cdf0e10cSrcweir } 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir case VCLEVENT_EDIT_MODIFY: 169*cdf0e10cSrcweir case VCLEVENT_EDIT_SELECTIONCHANGED: 170*cdf0e10cSrcweir // Modify/Selection events are handled by the combo box instead of 171*cdf0e10cSrcweir // directly by the edit field (Why?). Therefore, delegate this 172*cdf0e10cSrcweir // call to the edit field. 173*cdf0e10cSrcweir if (m_aBoxType==COMBOBOX) 174*cdf0e10cSrcweir { 175*cdf0e10cSrcweir if (m_xText.is()) 176*cdf0e10cSrcweir { 177*cdf0e10cSrcweir Reference<XAccessibleContext> xContext = m_xText->getAccessibleContext(); 178*cdf0e10cSrcweir VCLXAccessibleEdit* pEdit = static_cast<VCLXAccessibleEdit*>(xContext.get()); 179*cdf0e10cSrcweir if (pEdit != NULL) 180*cdf0e10cSrcweir pEdit->ProcessWindowEvent (rVclWindowEvent); 181*cdf0e10cSrcweir } 182*cdf0e10cSrcweir } 183*cdf0e10cSrcweir break; 184*cdf0e10cSrcweir 185*cdf0e10cSrcweir default: 186*cdf0e10cSrcweir VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent ); 187*cdf0e10cSrcweir } 188*cdf0e10cSrcweir } 189*cdf0e10cSrcweir 190*cdf0e10cSrcweir IMPLEMENT_FORWARD_XINTERFACE2(VCLXAccessibleBox, VCLXAccessibleComponent, VCLXAccessibleBox_BASE) 191*cdf0e10cSrcweir IMPLEMENT_FORWARD_XTYPEPROVIDER2(VCLXAccessibleBox, VCLXAccessibleComponent, VCLXAccessibleBox_BASE) 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir //===== XAccessible ========================================================= 194*cdf0e10cSrcweir 195*cdf0e10cSrcweir Reference< XAccessibleContext > SAL_CALL VCLXAccessibleBox::getAccessibleContext( ) 196*cdf0e10cSrcweir throw (RuntimeException) 197*cdf0e10cSrcweir { 198*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir return this; 201*cdf0e10cSrcweir } 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir //===== XAccessibleContext ================================================== 204*cdf0e10cSrcweir 205*cdf0e10cSrcweir sal_Int32 SAL_CALL VCLXAccessibleBox::getAccessibleChildCount (void) 206*cdf0e10cSrcweir throw (RuntimeException) 207*cdf0e10cSrcweir { 208*cdf0e10cSrcweir vos::OGuard aSolarGuard( Application::GetSolarMutex() ); 209*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir // Usually a box has a text field and a list of items as its children. 212*cdf0e10cSrcweir // Non drop down list boxes have no text field. Additionally check 213*cdf0e10cSrcweir // whether the object is valid. 214*cdf0e10cSrcweir sal_Int32 nCount = 0; 215*cdf0e10cSrcweir if (IsValid()) 216*cdf0e10cSrcweir nCount += (m_bHasTextChild?1:0) + (m_bHasListChild?1:0); 217*cdf0e10cSrcweir else 218*cdf0e10cSrcweir { 219*cdf0e10cSrcweir // Object not valid anymore. Release references to children. 220*cdf0e10cSrcweir m_bHasTextChild = false; 221*cdf0e10cSrcweir m_xText = NULL; 222*cdf0e10cSrcweir m_bHasListChild = false; 223*cdf0e10cSrcweir m_xList = NULL; 224*cdf0e10cSrcweir } 225*cdf0e10cSrcweir 226*cdf0e10cSrcweir return nCount; 227*cdf0e10cSrcweir } 228*cdf0e10cSrcweir 229*cdf0e10cSrcweir Reference<XAccessible> SAL_CALL VCLXAccessibleBox::getAccessibleChild (sal_Int32 i) 230*cdf0e10cSrcweir throw (IndexOutOfBoundsException, RuntimeException) 231*cdf0e10cSrcweir { 232*cdf0e10cSrcweir vos::OGuard aSolarGuard( Application::GetSolarMutex() ); 233*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); 234*cdf0e10cSrcweir 235*cdf0e10cSrcweir if (i<0 || i>=getAccessibleChildCount()) 236*cdf0e10cSrcweir throw IndexOutOfBoundsException(); 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir Reference< XAccessible > xChild; 239*cdf0e10cSrcweir if (IsValid()) 240*cdf0e10cSrcweir { 241*cdf0e10cSrcweir if (i==1 || ! m_bHasTextChild) 242*cdf0e10cSrcweir { 243*cdf0e10cSrcweir // List. 244*cdf0e10cSrcweir if ( ! m_xList.is()) 245*cdf0e10cSrcweir { 246*cdf0e10cSrcweir VCLXAccessibleList* pList = new VCLXAccessibleList ( GetVCLXWindow(), 247*cdf0e10cSrcweir (m_aBoxType == LISTBOX ? VCLXAccessibleList::LISTBOX : VCLXAccessibleList::COMBOBOX), 248*cdf0e10cSrcweir this); 249*cdf0e10cSrcweir pList->SetIndexInParent (i); 250*cdf0e10cSrcweir m_xList = pList; 251*cdf0e10cSrcweir } 252*cdf0e10cSrcweir xChild = m_xList; 253*cdf0e10cSrcweir } 254*cdf0e10cSrcweir else 255*cdf0e10cSrcweir { 256*cdf0e10cSrcweir // Text Field. 257*cdf0e10cSrcweir if ( ! m_xText.is()) 258*cdf0e10cSrcweir { 259*cdf0e10cSrcweir if (m_aBoxType==COMBOBOX) 260*cdf0e10cSrcweir { 261*cdf0e10cSrcweir ComboBox* pComboBox = static_cast<ComboBox*>(GetWindow()); 262*cdf0e10cSrcweir if (pComboBox!=NULL && pComboBox->GetSubEdit()!=NULL) 263*cdf0e10cSrcweir m_xText = pComboBox->GetSubEdit()->GetAccessible(); 264*cdf0e10cSrcweir } 265*cdf0e10cSrcweir else if (m_bIsDropDownBox) 266*cdf0e10cSrcweir m_xText = new VCLXAccessibleTextField (GetVCLXWindow(),this); 267*cdf0e10cSrcweir } 268*cdf0e10cSrcweir xChild = m_xText; 269*cdf0e10cSrcweir } 270*cdf0e10cSrcweir } 271*cdf0e10cSrcweir 272*cdf0e10cSrcweir return xChild; 273*cdf0e10cSrcweir } 274*cdf0e10cSrcweir 275*cdf0e10cSrcweir sal_Int16 SAL_CALL VCLXAccessibleBox::getAccessibleRole (void) throw (RuntimeException) 276*cdf0e10cSrcweir { 277*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); 278*cdf0e10cSrcweir 279*cdf0e10cSrcweir // Return the role <const>COMBO_BOX</const> for both VCL combo boxes and 280*cdf0e10cSrcweir // VCL list boxes in DropDown-Mode else <const>PANEL</const>. 281*cdf0e10cSrcweir // This way the Java bridge has not to handle both independently. 282*cdf0e10cSrcweir return m_bIsDropDownBox ? AccessibleRole::COMBO_BOX : AccessibleRole::PANEL; 283*cdf0e10cSrcweir } 284*cdf0e10cSrcweir 285*cdf0e10cSrcweir sal_Int32 SAL_CALL VCLXAccessibleBox::getAccessibleIndexInParent (void) 286*cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException) 287*cdf0e10cSrcweir { 288*cdf0e10cSrcweir if (m_nIndexInParent != DEFAULT_INDEX_IN_PARENT) 289*cdf0e10cSrcweir return m_nIndexInParent; 290*cdf0e10cSrcweir else 291*cdf0e10cSrcweir return VCLXAccessibleComponent::getAccessibleIndexInParent(); 292*cdf0e10cSrcweir } 293*cdf0e10cSrcweir 294*cdf0e10cSrcweir //===== XAccessibleAction =================================================== 295*cdf0e10cSrcweir 296*cdf0e10cSrcweir sal_Int32 SAL_CALL VCLXAccessibleBox::getAccessibleActionCount (void) 297*cdf0e10cSrcweir throw (RuntimeException) 298*cdf0e10cSrcweir { 299*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex> aGuard (GetMutex()); 300*cdf0e10cSrcweir 301*cdf0e10cSrcweir // There is one action for drop down boxes (toggle popup) and none for 302*cdf0e10cSrcweir // the other boxes. 303*cdf0e10cSrcweir return m_bIsDropDownBox ? 1 : 0; 304*cdf0e10cSrcweir } 305*cdf0e10cSrcweir 306*cdf0e10cSrcweir sal_Bool SAL_CALL VCLXAccessibleBox::doAccessibleAction (sal_Int32 nIndex) 307*cdf0e10cSrcweir throw (IndexOutOfBoundsException, RuntimeException) 308*cdf0e10cSrcweir { 309*cdf0e10cSrcweir sal_Bool bNotify = sal_False; 310*cdf0e10cSrcweir 311*cdf0e10cSrcweir { 312*cdf0e10cSrcweir vos::OGuard aSolarGuard( Application::GetSolarMutex() ); 313*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir if (nIndex<0 || nIndex>=getAccessibleActionCount()) 316*cdf0e10cSrcweir throw ::com::sun::star::lang::IndexOutOfBoundsException(); 317*cdf0e10cSrcweir 318*cdf0e10cSrcweir if (m_aBoxType == COMBOBOX) 319*cdf0e10cSrcweir { 320*cdf0e10cSrcweir ComboBox* pComboBox = static_cast< ComboBox* >( GetWindow() ); 321*cdf0e10cSrcweir if (pComboBox != NULL) 322*cdf0e10cSrcweir { 323*cdf0e10cSrcweir pComboBox->ToggleDropDown(); 324*cdf0e10cSrcweir bNotify = sal_True; 325*cdf0e10cSrcweir } 326*cdf0e10cSrcweir } 327*cdf0e10cSrcweir else if (m_aBoxType == LISTBOX) 328*cdf0e10cSrcweir { 329*cdf0e10cSrcweir ListBox* pListBox = static_cast< ListBox* >( GetWindow() ); 330*cdf0e10cSrcweir if (pListBox != NULL) 331*cdf0e10cSrcweir { 332*cdf0e10cSrcweir pListBox->ToggleDropDown(); 333*cdf0e10cSrcweir bNotify = sal_True; 334*cdf0e10cSrcweir } 335*cdf0e10cSrcweir } 336*cdf0e10cSrcweir } 337*cdf0e10cSrcweir 338*cdf0e10cSrcweir if (bNotify) 339*cdf0e10cSrcweir NotifyAccessibleEvent (AccessibleEventId::ACTION_CHANGED, Any(), Any()); 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir return bNotify; 342*cdf0e10cSrcweir } 343*cdf0e10cSrcweir 344*cdf0e10cSrcweir ::rtl::OUString SAL_CALL VCLXAccessibleBox::getAccessibleActionDescription (sal_Int32 nIndex) 345*cdf0e10cSrcweir throw (IndexOutOfBoundsException, RuntimeException) 346*cdf0e10cSrcweir { 347*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); 348*cdf0e10cSrcweir if (nIndex<0 || nIndex>=getAccessibleActionCount()) 349*cdf0e10cSrcweir throw ::com::sun::star::lang::IndexOutOfBoundsException(); 350*cdf0e10cSrcweir return TK_RES_STRING( RID_STR_ACC_ACTION_TOGGLEPOPUP); 351*cdf0e10cSrcweir } 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir Reference< XAccessibleKeyBinding > VCLXAccessibleBox::getAccessibleActionKeyBinding( sal_Int32 nIndex ) 354*cdf0e10cSrcweir throw (IndexOutOfBoundsException, RuntimeException) 355*cdf0e10cSrcweir { 356*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() ); 357*cdf0e10cSrcweir 358*cdf0e10cSrcweir Reference< XAccessibleKeyBinding > xRet; 359*cdf0e10cSrcweir 360*cdf0e10cSrcweir if (nIndex<0 || nIndex>=getAccessibleActionCount()) 361*cdf0e10cSrcweir throw ::com::sun::star::lang::IndexOutOfBoundsException(); 362*cdf0e10cSrcweir 363*cdf0e10cSrcweir // ... which key? 364*cdf0e10cSrcweir return xRet; 365*cdf0e10cSrcweir } 366*cdf0e10cSrcweir 367*cdf0e10cSrcweir //===== XComponent ========================================================== 368*cdf0e10cSrcweir 369*cdf0e10cSrcweir void SAL_CALL VCLXAccessibleBox::disposing (void) 370*cdf0e10cSrcweir { 371*cdf0e10cSrcweir VCLXAccessibleComponent::disposing(); 372*cdf0e10cSrcweir } 373*cdf0e10cSrcweir 374