1*0841af79SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*0841af79SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*0841af79SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*0841af79SAndrew Rist * distributed with this work for additional information 6*0841af79SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*0841af79SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*0841af79SAndrew Rist * "License"); you may not use this file except in compliance 9*0841af79SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*0841af79SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*0841af79SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*0841af79SAndrew Rist * software distributed under the License is distributed on an 15*0841af79SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*0841af79SAndrew Rist * KIND, either express or implied. See the License for the 17*0841af79SAndrew Rist * specific language governing permissions and limitations 18*0841af79SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*0841af79SAndrew Rist *************************************************************/ 21*0841af79SAndrew Rist 22*0841af79SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_accessibility.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "accessibility/extended/AccessibleBrowseBoxTableCell.hxx" 28cdf0e10cSrcweir #include <svtools/accessibletableprovider.hxx> 29cdf0e10cSrcweir #include "accessibility/extended/AccessibleBrowseBox.hxx" 30cdf0e10cSrcweir #include <tools/gen.hxx> 31cdf0e10cSrcweir #include <toolkit/helper/vclunohelper.hxx> 32cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleEventId.hpp> 33cdf0e10cSrcweir 34cdf0e10cSrcweir namespace accessibility 35cdf0e10cSrcweir { 36cdf0e10cSrcweir namespace 37cdf0e10cSrcweir { checkIndex_Impl(sal_Int32 _nIndex,const::rtl::OUString & _sText)38cdf0e10cSrcweir void checkIndex_Impl( sal_Int32 _nIndex, const ::rtl::OUString& _sText ) throw (::com::sun::star::lang::IndexOutOfBoundsException) 39cdf0e10cSrcweir { 40cdf0e10cSrcweir if ( _nIndex >= _sText.getLength() ) 41cdf0e10cSrcweir throw ::com::sun::star::lang::IndexOutOfBoundsException(); 42cdf0e10cSrcweir } 43cdf0e10cSrcweir getIndex_Impl(sal_Int32 _nRow,sal_uInt16 _nColumn,sal_uInt16 _nColumnCount)44cdf0e10cSrcweir sal_Int32 getIndex_Impl( sal_Int32 _nRow, sal_uInt16 _nColumn, sal_uInt16 _nColumnCount ) 45cdf0e10cSrcweir { 46cdf0e10cSrcweir return _nRow * _nColumnCount + _nColumn; 47cdf0e10cSrcweir } 48cdf0e10cSrcweir } 49cdf0e10cSrcweir using namespace ::com::sun::star::lang; 50cdf0e10cSrcweir using namespace utl; 51cdf0e10cSrcweir using namespace comphelper; 52cdf0e10cSrcweir using ::rtl::OUString; 53cdf0e10cSrcweir using ::accessibility::AccessibleBrowseBox; 54cdf0e10cSrcweir using namespace ::com::sun::star::uno; 55cdf0e10cSrcweir using ::com::sun::star::accessibility::XAccessible; 56cdf0e10cSrcweir using namespace ::com::sun::star::accessibility; 57cdf0e10cSrcweir using namespace ::svt; 58cdf0e10cSrcweir 59cdf0e10cSrcweir 60cdf0e10cSrcweir // implementation of a table cell implGetText()61cdf0e10cSrcweir ::rtl::OUString AccessibleBrowseBoxTableCell::implGetText() 62cdf0e10cSrcweir { 63cdf0e10cSrcweir ensureIsAlive(); 64cdf0e10cSrcweir return mpBrowseBox->GetAccessibleCellText( getRowPos(), static_cast< sal_uInt16 >( getColumnPos() ) ); 65cdf0e10cSrcweir } 66cdf0e10cSrcweir implGetLocale()67cdf0e10cSrcweir ::com::sun::star::lang::Locale AccessibleBrowseBoxTableCell::implGetLocale() 68cdf0e10cSrcweir { 69cdf0e10cSrcweir ensureIsAlive(); 70cdf0e10cSrcweir return mpBrowseBox->GetAccessible()->getAccessibleContext()->getLocale(); 71cdf0e10cSrcweir } 72cdf0e10cSrcweir implGetSelection(sal_Int32 & nStartIndex,sal_Int32 & nEndIndex)73cdf0e10cSrcweir void AccessibleBrowseBoxTableCell::implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) 74cdf0e10cSrcweir { 75cdf0e10cSrcweir nStartIndex = 0; 76cdf0e10cSrcweir nEndIndex = 0; 77cdf0e10cSrcweir } 78cdf0e10cSrcweir AccessibleBrowseBoxTableCell(const Reference<XAccessible> & _rxParent,IAccessibleTableProvider & _rBrowseBox,const::com::sun::star::uno::Reference<::com::sun::star::awt::XWindow> & _xFocusWindow,sal_Int32 _nRowPos,sal_uInt16 _nColPos,sal_Int32 _nOffset)79cdf0e10cSrcweir AccessibleBrowseBoxTableCell::AccessibleBrowseBoxTableCell(const Reference<XAccessible >& _rxParent, 80cdf0e10cSrcweir IAccessibleTableProvider& _rBrowseBox, 81cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow, 82cdf0e10cSrcweir sal_Int32 _nRowPos, 83cdf0e10cSrcweir sal_uInt16 _nColPos, 84cdf0e10cSrcweir sal_Int32 _nOffset ) 85cdf0e10cSrcweir :AccessibleBrowseBoxCell( _rxParent, _rBrowseBox, _xFocusWindow, _nRowPos, _nColPos ) 86cdf0e10cSrcweir { 87cdf0e10cSrcweir m_nOffset = ( OFFSET_DEFAULT == _nOffset ) ? (sal_Int32)BBINDEX_FIRSTCONTROL : _nOffset; 88cdf0e10cSrcweir sal_Int32 nIndex = getIndex_Impl( _nRowPos, _nColPos, _rBrowseBox.GetColumnCount() ); 89cdf0e10cSrcweir setAccessibleName( _rBrowseBox.GetAccessibleObjectName( BBTYPE_TABLECELL, nIndex ) ); 90cdf0e10cSrcweir setAccessibleDescription( _rBrowseBox.GetAccessibleObjectDescription( BBTYPE_TABLECELL, nIndex ) ); 91cdf0e10cSrcweir // Need to register as event listener 92cdf0e10cSrcweir Reference< XComponent > xComponent(_rxParent, UNO_QUERY); 93cdf0e10cSrcweir if( xComponent.is() ) 94cdf0e10cSrcweir xComponent->addEventListener(static_cast< XEventListener *> (this)); 95cdf0e10cSrcweir } 96cdf0e10cSrcweir nameChanged(const::rtl::OUString & rNewName,const::rtl::OUString & rOldName)97cdf0e10cSrcweir void AccessibleBrowseBoxTableCell::nameChanged( const ::rtl::OUString& rNewName, const ::rtl::OUString& rOldName ) 98cdf0e10cSrcweir { 99cdf0e10cSrcweir implSetName( rNewName ); 100cdf0e10cSrcweir Any aOldValue, aNewValue; 101cdf0e10cSrcweir aOldValue <<= rOldName; 102cdf0e10cSrcweir aNewValue <<= rNewName; 103cdf0e10cSrcweir commitEvent( AccessibleEventId::NAME_CHANGED, aOldValue, aNewValue ); 104cdf0e10cSrcweir } 105cdf0e10cSrcweir 106cdf0e10cSrcweir // XInterface ------------------------------------------------------------- 107cdf0e10cSrcweir 108cdf0e10cSrcweir /** Queries for a new interface. */ queryInterface(const::com::sun::star::uno::Type & rType)109cdf0e10cSrcweir ::com::sun::star::uno::Any SAL_CALL AccessibleBrowseBoxTableCell::queryInterface( 110cdf0e10cSrcweir const ::com::sun::star::uno::Type& rType ) 111cdf0e10cSrcweir throw ( ::com::sun::star::uno::RuntimeException ) 112cdf0e10cSrcweir { 113cdf0e10cSrcweir Any aRet = AccessibleBrowseBoxCell::queryInterface(rType); 114cdf0e10cSrcweir if ( !aRet.hasValue() ) 115cdf0e10cSrcweir aRet = AccessibleTextHelper_BASE::queryInterface(rType); 116cdf0e10cSrcweir return aRet; 117cdf0e10cSrcweir } 118cdf0e10cSrcweir 119cdf0e10cSrcweir /** Aquires the object (calls acquire() on base class). */ acquire()120cdf0e10cSrcweir void SAL_CALL AccessibleBrowseBoxTableCell::acquire() throw () 121cdf0e10cSrcweir { 122cdf0e10cSrcweir AccessibleBrowseBoxCell::acquire(); 123cdf0e10cSrcweir } 124cdf0e10cSrcweir 125cdf0e10cSrcweir /** Releases the object (calls release() on base class). */ release()126cdf0e10cSrcweir void SAL_CALL AccessibleBrowseBoxTableCell::release() throw () 127cdf0e10cSrcweir { 128cdf0e10cSrcweir AccessibleBrowseBoxCell::release(); 129cdf0e10cSrcweir } 130cdf0e10cSrcweir getCharacterBounds(sal_Int32 nIndex)131cdf0e10cSrcweir ::com::sun::star::awt::Rectangle SAL_CALL AccessibleBrowseBoxTableCell::getCharacterBounds( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) 132cdf0e10cSrcweir { 133cdf0e10cSrcweir BBSolarGuard aSolarGuard; 134cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 135cdf0e10cSrcweir 136cdf0e10cSrcweir ensureIsAlive(); 137cdf0e10cSrcweir if ( !implIsValidIndex( nIndex, implGetText().getLength() ) ) 138cdf0e10cSrcweir throw IndexOutOfBoundsException(); 139cdf0e10cSrcweir 140cdf0e10cSrcweir ::com::sun::star::awt::Rectangle aRect; 141cdf0e10cSrcweir 142cdf0e10cSrcweir if ( mpBrowseBox ) 143cdf0e10cSrcweir { 144cdf0e10cSrcweir aRect = AWTRectangle( mpBrowseBox->GetFieldCharacterBounds( getRowPos(), getColumnPos(), nIndex ) ); 145cdf0e10cSrcweir } 146cdf0e10cSrcweir 147cdf0e10cSrcweir return aRect; 148cdf0e10cSrcweir } 149cdf0e10cSrcweir getIndexAtPoint(const::com::sun::star::awt::Point & _aPoint)150cdf0e10cSrcweir sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getIndexAtPoint( const ::com::sun::star::awt::Point& _aPoint ) throw (RuntimeException) 151cdf0e10cSrcweir { 152cdf0e10cSrcweir //! TODO CTL bidi 153cdf0e10cSrcweir // DBG_ASSERT(0,"Need to be done by base class!"); 154cdf0e10cSrcweir BBSolarGuard aSolarGuard; 155cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 156cdf0e10cSrcweir ensureIsAlive(); 157cdf0e10cSrcweir 158cdf0e10cSrcweir return mpBrowseBox->GetFieldIndexAtPoint( getRowPos(), getColumnPos(), VCLPoint( _aPoint ) ); 159cdf0e10cSrcweir } 160cdf0e10cSrcweir 161cdf0e10cSrcweir /** @return 162cdf0e10cSrcweir The name of this class. 163cdf0e10cSrcweir */ getImplementationName()164cdf0e10cSrcweir ::rtl::OUString SAL_CALL AccessibleBrowseBoxTableCell::getImplementationName() 165cdf0e10cSrcweir throw ( ::com::sun::star::uno::RuntimeException ) 166cdf0e10cSrcweir { 167cdf0e10cSrcweir return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.AccessibleBrowseBoxTableCell" ) ); 168cdf0e10cSrcweir } 169cdf0e10cSrcweir 170cdf0e10cSrcweir /** @return The count of visible children. */ getAccessibleChildCount()171cdf0e10cSrcweir sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getAccessibleChildCount() 172cdf0e10cSrcweir throw ( ::com::sun::star::uno::RuntimeException ) 173cdf0e10cSrcweir { 174cdf0e10cSrcweir return 0; 175cdf0e10cSrcweir } 176cdf0e10cSrcweir 177cdf0e10cSrcweir /** @return The XAccessible interface of the specified child. */ 178cdf0e10cSrcweir ::com::sun::star::uno::Reference< 179cdf0e10cSrcweir ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int32)180cdf0e10cSrcweir AccessibleBrowseBoxTableCell::getAccessibleChild( sal_Int32 ) 181cdf0e10cSrcweir throw ( ::com::sun::star::lang::IndexOutOfBoundsException, 182cdf0e10cSrcweir ::com::sun::star::uno::RuntimeException ) 183cdf0e10cSrcweir { 184cdf0e10cSrcweir throw ::com::sun::star::lang::IndexOutOfBoundsException(); 185cdf0e10cSrcweir } 186cdf0e10cSrcweir 187cdf0e10cSrcweir /** Creates a new AccessibleStateSetHelper and fills it with states of the 188cdf0e10cSrcweir current object. 189cdf0e10cSrcweir @return 190cdf0e10cSrcweir A filled AccessibleStateSetHelper. 191cdf0e10cSrcweir */ implCreateStateSetHelper()192cdf0e10cSrcweir ::utl::AccessibleStateSetHelper* AccessibleBrowseBoxTableCell::implCreateStateSetHelper() 193cdf0e10cSrcweir { 194cdf0e10cSrcweir BBSolarGuard aSolarGuard; 195cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 196cdf0e10cSrcweir 197cdf0e10cSrcweir ::utl::AccessibleStateSetHelper* pStateSetHelper = new ::utl::AccessibleStateSetHelper; 198cdf0e10cSrcweir 199cdf0e10cSrcweir if( isAlive() ) 200cdf0e10cSrcweir { 201cdf0e10cSrcweir // SHOWING done with mxParent 202cdf0e10cSrcweir if( implIsShowing() ) 203cdf0e10cSrcweir pStateSetHelper->AddState( AccessibleStateType::SHOWING ); 204cdf0e10cSrcweir 205cdf0e10cSrcweir mpBrowseBox->FillAccessibleStateSetForCell( *pStateSetHelper, getRowPos(), static_cast< sal_uInt16 >( getColumnPos() ) ); 206cdf0e10cSrcweir } 207cdf0e10cSrcweir else 208cdf0e10cSrcweir pStateSetHelper->AddState( AccessibleStateType::DEFUNC ); 209cdf0e10cSrcweir 210cdf0e10cSrcweir return pStateSetHelper; 211cdf0e10cSrcweir } 212cdf0e10cSrcweir 213cdf0e10cSrcweir 214cdf0e10cSrcweir // XAccessible ------------------------------------------------------------ 215cdf0e10cSrcweir 216cdf0e10cSrcweir /** @return The XAccessibleContext interface of this object. */ getAccessibleContext()217cdf0e10cSrcweir Reference< XAccessibleContext > SAL_CALL AccessibleBrowseBoxTableCell::getAccessibleContext() throw ( RuntimeException ) 218cdf0e10cSrcweir { 219cdf0e10cSrcweir ensureIsAlive(); 220cdf0e10cSrcweir return this; 221cdf0e10cSrcweir } 222cdf0e10cSrcweir 223cdf0e10cSrcweir // XAccessibleContext ----------------------------------------------------- 224cdf0e10cSrcweir getAccessibleIndexInParent()225cdf0e10cSrcweir sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getAccessibleIndexInParent() 226cdf0e10cSrcweir throw ( ::com::sun::star::uno::RuntimeException ) 227cdf0e10cSrcweir { 228cdf0e10cSrcweir BBSolarGuard aSolarGuard; 229cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 230cdf0e10cSrcweir ensureIsAlive(); 231cdf0e10cSrcweir 232cdf0e10cSrcweir return /*BBINDEX_FIRSTCONTROL*/ m_nOffset + ( getRowPos() * mpBrowseBox->GetColumnCount() ) + getColumnPos(); 233cdf0e10cSrcweir } 234cdf0e10cSrcweir getCaretPosition()235cdf0e10cSrcweir sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getCaretPosition( ) throw (::com::sun::star::uno::RuntimeException) 236cdf0e10cSrcweir { 237cdf0e10cSrcweir return -1; 238cdf0e10cSrcweir } setCaretPosition(sal_Int32 nIndex)239cdf0e10cSrcweir sal_Bool SAL_CALL AccessibleBrowseBoxTableCell::setCaretPosition ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) 240cdf0e10cSrcweir { 241cdf0e10cSrcweir BBSolarGuard aSolarGuard; 242cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 243cdf0e10cSrcweir 244cdf0e10cSrcweir if ( !implIsValidRange( nIndex, nIndex, implGetText().getLength() ) ) 245cdf0e10cSrcweir throw IndexOutOfBoundsException(); 246cdf0e10cSrcweir 247cdf0e10cSrcweir return sal_False; 248cdf0e10cSrcweir } getCharacter(sal_Int32 nIndex)249cdf0e10cSrcweir sal_Unicode SAL_CALL AccessibleBrowseBoxTableCell::getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) 250cdf0e10cSrcweir { 251cdf0e10cSrcweir BBSolarGuard aSolarGuard; 252cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 253cdf0e10cSrcweir return OCommonAccessibleText::getCharacter( nIndex ); 254cdf0e10cSrcweir } getCharacterAttributes(sal_Int32 nIndex,const::com::sun::star::uno::Sequence<::rtl::OUString> &)255cdf0e10cSrcweir ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL AccessibleBrowseBoxTableCell::getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) 256cdf0e10cSrcweir { 257cdf0e10cSrcweir BBSolarGuard aSolarGuard; 258cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 259cdf0e10cSrcweir 260cdf0e10cSrcweir ::rtl::OUString sText( implGetText() ); 261cdf0e10cSrcweir 262cdf0e10cSrcweir if ( !implIsValidIndex( nIndex, sText.getLength() ) ) 263cdf0e10cSrcweir throw IndexOutOfBoundsException(); 264cdf0e10cSrcweir 265cdf0e10cSrcweir return ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >(); 266cdf0e10cSrcweir } getCharacterCount()267cdf0e10cSrcweir sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getCharacterCount( ) throw (::com::sun::star::uno::RuntimeException) 268cdf0e10cSrcweir { 269cdf0e10cSrcweir BBSolarGuard aSolarGuard; 270cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 271cdf0e10cSrcweir return OCommonAccessibleText::getCharacterCount( ); 272cdf0e10cSrcweir } 273cdf0e10cSrcweir getSelectedText()274cdf0e10cSrcweir ::rtl::OUString SAL_CALL AccessibleBrowseBoxTableCell::getSelectedText( ) throw (::com::sun::star::uno::RuntimeException) 275cdf0e10cSrcweir { 276cdf0e10cSrcweir BBSolarGuard aSolarGuard; 277cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 278cdf0e10cSrcweir return OCommonAccessibleText::getSelectedText( ); 279cdf0e10cSrcweir } getSelectionStart()280cdf0e10cSrcweir sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getSelectionStart( ) throw (::com::sun::star::uno::RuntimeException) 281cdf0e10cSrcweir { 282cdf0e10cSrcweir BBSolarGuard aSolarGuard; 283cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 284cdf0e10cSrcweir return OCommonAccessibleText::getSelectionStart( ); 285cdf0e10cSrcweir } getSelectionEnd()286cdf0e10cSrcweir sal_Int32 SAL_CALL AccessibleBrowseBoxTableCell::getSelectionEnd( ) throw (::com::sun::star::uno::RuntimeException) 287cdf0e10cSrcweir { 288cdf0e10cSrcweir BBSolarGuard aSolarGuard; 289cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 290cdf0e10cSrcweir return OCommonAccessibleText::getSelectionEnd( ); 291cdf0e10cSrcweir } setSelection(sal_Int32 nStartIndex,sal_Int32 nEndIndex)292cdf0e10cSrcweir sal_Bool SAL_CALL AccessibleBrowseBoxTableCell::setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) 293cdf0e10cSrcweir { 294cdf0e10cSrcweir BBSolarGuard aSolarGuard; 295cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 296cdf0e10cSrcweir if ( !implIsValidRange( nStartIndex, nEndIndex, implGetText().getLength() ) ) 297cdf0e10cSrcweir throw IndexOutOfBoundsException(); 298cdf0e10cSrcweir 299cdf0e10cSrcweir return sal_False; 300cdf0e10cSrcweir } getText()301cdf0e10cSrcweir ::rtl::OUString SAL_CALL AccessibleBrowseBoxTableCell::getText( ) throw (::com::sun::star::uno::RuntimeException) 302cdf0e10cSrcweir { 303cdf0e10cSrcweir BBSolarGuard aSolarGuard; 304cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 305cdf0e10cSrcweir return OCommonAccessibleText::getText( ); 306cdf0e10cSrcweir } getTextRange(sal_Int32 nStartIndex,sal_Int32 nEndIndex)307cdf0e10cSrcweir ::rtl::OUString SAL_CALL AccessibleBrowseBoxTableCell::getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) 308cdf0e10cSrcweir { 309cdf0e10cSrcweir BBSolarGuard aSolarGuard; 310cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 311cdf0e10cSrcweir return OCommonAccessibleText::getTextRange( nStartIndex, nEndIndex ); 312cdf0e10cSrcweir } getTextAtIndex(sal_Int32 nIndex,sal_Int16 aTextType)313cdf0e10cSrcweir ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleBrowseBoxTableCell::getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) 314cdf0e10cSrcweir { 315cdf0e10cSrcweir BBSolarGuard aSolarGuard; 316cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 317cdf0e10cSrcweir return OCommonAccessibleText::getTextAtIndex( nIndex ,aTextType); 318cdf0e10cSrcweir } getTextBeforeIndex(sal_Int32 nIndex,sal_Int16 aTextType)319cdf0e10cSrcweir ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleBrowseBoxTableCell::getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) 320cdf0e10cSrcweir { 321cdf0e10cSrcweir BBSolarGuard aSolarGuard; 322cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 323cdf0e10cSrcweir return OCommonAccessibleText::getTextBeforeIndex( nIndex ,aTextType); 324cdf0e10cSrcweir } getTextBehindIndex(sal_Int32 nIndex,sal_Int16 aTextType)325cdf0e10cSrcweir ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleBrowseBoxTableCell::getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) 326cdf0e10cSrcweir { 327cdf0e10cSrcweir BBSolarGuard aSolarGuard; 328cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 329cdf0e10cSrcweir return OCommonAccessibleText::getTextBehindIndex( nIndex ,aTextType); 330cdf0e10cSrcweir } copyText(sal_Int32 nStartIndex,sal_Int32 nEndIndex)331cdf0e10cSrcweir sal_Bool SAL_CALL AccessibleBrowseBoxTableCell::copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) 332cdf0e10cSrcweir { 333cdf0e10cSrcweir BBSolarGuard aSolarGuard; 334cdf0e10cSrcweir ::osl::MutexGuard aGuard( getOslMutex() ); 335cdf0e10cSrcweir ::rtl::OUString sText = implGetText(); 336cdf0e10cSrcweir checkIndex_Impl( nStartIndex, sText ); 337cdf0e10cSrcweir checkIndex_Impl( nEndIndex, sText ); 338cdf0e10cSrcweir 339cdf0e10cSrcweir //!!! don't know how to put a string into the clipboard 340cdf0e10cSrcweir return sal_False; 341cdf0e10cSrcweir } disposing(const EventObject & _rSource)342cdf0e10cSrcweir void AccessibleBrowseBoxTableCell::disposing( const EventObject& _rSource ) throw (RuntimeException) 343cdf0e10cSrcweir { 344cdf0e10cSrcweir if ( _rSource.Source == mxParent ) 345cdf0e10cSrcweir { 346cdf0e10cSrcweir dispose(); 347cdf0e10cSrcweir } 348cdf0e10cSrcweir } 349cdf0e10cSrcweir 350cdf0e10cSrcweir } 351