diff options
Diffstat (limited to 'accessibility/source/extended/accessibletablistbox.cxx')
-rw-r--r-- | accessibility/source/extended/accessibletablistbox.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/accessibility/source/extended/accessibletablistbox.cxx b/accessibility/source/extended/accessibletablistbox.cxx index 42fba56981e5..2912056827b4 100644 --- a/accessibility/source/extended/accessibletablistbox.cxx +++ b/accessibility/source/extended/accessibletablistbox.cxx @@ -107,7 +107,7 @@ namespace accessibility sal_Int32 SAL_CALL AccessibleTabListBox::getAccessibleChildCount() throw ( uno::RuntimeException ) { - return 1; // no header, only table + return 2; // header and table } // ----------------------------------------------------------------------------- @@ -125,11 +125,17 @@ namespace accessibility ::osl::MutexGuard aGuard( getOslMutex() ); ensureIsAlive(); - if ( nChildIndex != 0 ) - // only one child + if ( nChildIndex < 0 || nChildIndex > 1 ) throw IndexOutOfBoundsException(); - Reference< XAccessible > xRet = implGetFixedChild( ::svt::BBINDEX_TABLE ); + Reference< XAccessible > xRet; + if (nChildIndex == 0) + { + //! so far the actual implementation object only supports column headers + xRet = implGetFixedChild( ::svt::BBINDEX_COLUMNHEADERBAR ); + } + else if (nChildIndex == 1) + xRet = implGetFixedChild( ::svt::BBINDEX_TABLE ); if ( !xRet.is() ) throw RuntimeException(); |