xref: /aoo42x/main/svtools/source/brwbox/brwbox3.cxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_svtools.hxx"
30 #include <svtools/brwbox.hxx>
31 #include <svtools/AccessibleBrowseBoxObjType.hxx>
32 #include <tools/debug.hxx>
33 #include <tools/multisel.hxx>
34 #include "datwin.hxx"
35 #include "brwimpl.hxx"
36 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
37 #include <com/sun/star/accessibility/AccessibleRole.hpp>
38 #include <toolkit/helper/vclunohelper.hxx>
39 
40 // Accessibility ==============================================================
41 
42 using ::rtl::OUString;
43 using namespace ::com::sun::star::uno;
44 using ::com::sun::star::accessibility::XAccessible;
45 using namespace ::com::sun::star::accessibility;
46 
47 // ============================================================================
48 namespace svt
49 {
50 	using namespace ::com::sun::star::lang;
51 	using namespace utl;
52 
53 	Reference< XAccessible > getHeaderCell(	BrowseBoxImpl::THeaderCellMap& _raHeaderCells,
54 											sal_Int32 _nPos,
55 											AccessibleBrowseBoxObjType _eType,
56 											const Reference< XAccessible >& _rParent,
57 											BrowseBox& _rBrowseBox,
58                                             IAccessibleFactory& rFactory
59                                           )
60 	{
61 		Reference< XAccessible > xRet;
62 		BrowseBoxImpl::THeaderCellMap::iterator aFind = _raHeaderCells.find( _nPos );
63 		if ( aFind == _raHeaderCells.end() )
64 		{
65             Reference< XAccessible > xAccessible = rFactory.createAccessibleBrowseBoxHeaderCell(
66 			    _nPos,
67 				_rParent,
68 				_rBrowseBox,
69 				NULL,
70 				_eType
71             );
72 			aFind = _raHeaderCells.insert( BrowseBoxImpl::THeaderCellMap::value_type( _nPos, xAccessible ) ).first;
73 		}
74 		if ( aFind != _raHeaderCells.end() )
75 			xRet = aFind->second;
76 		return xRet;
77 	}
78 
79     // ============================================================================
80     // ----------------------------------------------------------------------------
81     Reference< XAccessible > BrowseBoxImpl::getAccessibleHeaderBar( AccessibleBrowseBoxObjType _eObjType )
82     {
83         if ( m_pAccessible && m_pAccessible->isAlive() )
84 		    return m_pAccessible->getHeaderBar( _eObjType );
85         return NULL;
86     }
87 
88     // ----------------------------------------------------------------------------
89     Reference< XAccessible > BrowseBoxImpl::getAccessibleTable( )
90     {
91         if ( m_pAccessible && m_pAccessible->isAlive() )
92 		    return m_pAccessible->getTable( );
93         return NULL;
94     }
95 }
96 
97 // ============================================================================
98 
99 Reference< XAccessible > BrowseBox::CreateAccessible()
100 {
101     Window* pParent = GetAccessibleParentWindow();
102     DBG_ASSERT( pParent, "BrowseBox::CreateAccessible - parent not found" );
103 
104     if( pParent && !m_pImpl->m_pAccessible)
105     {
106         Reference< XAccessible > xAccParent = pParent->GetAccessible();
107         if( xAccParent.is() )
108 		{
109             m_pImpl->m_pAccessible = getAccessibleFactory().createAccessibleBrowseBox(
110                 xAccParent, *this
111             );
112 		}
113 	}
114 
115     Reference< XAccessible > xAccessible;
116     if ( m_pImpl->m_pAccessible )
117         xAccessible = m_pImpl->m_pAccessible->getMyself();
118 
119     return xAccessible;
120 }
121 // -----------------------------------------------------------------------------
122 
123 // Children -------------------------------------------------------------------
124 
125 Reference< XAccessible > BrowseBox::CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos )
126 {
127 	// BBINDEX_TABLE must be the table
128 	OSL_ENSURE(m_pImpl->m_pAccessible,"Invalid call: Accessible is null");
129 
130     return m_pImpl->m_aFactoryAccess.getFactory().createAccessibleBrowseBoxTableCell(
131         m_pImpl->getAccessibleTable(),
132         *this,
133         NULL,
134         _nRow,
135         _nColumnPos,
136         OFFSET_DEFAULT
137     );
138 }
139 // -----------------------------------------------------------------------------
140 
141 Reference< XAccessible > BrowseBox::CreateAccessibleRowHeader( sal_Int32 _nRow )
142 {
143 	return svt::getHeaderCell(
144 		m_pImpl->m_aRowHeaderCellMap,
145 		_nRow,
146 		svt::BBTYPE_ROWHEADERCELL,
147 		m_pImpl->getAccessibleHeaderBar(svt::BBTYPE_ROWHEADERBAR),
148 		*this,
149         m_pImpl->m_aFactoryAccess.getFactory()
150     );
151 }
152 // -----------------------------------------------------------------------------
153 
154 Reference< XAccessible > BrowseBox::CreateAccessibleColumnHeader( sal_uInt16 _nColumnPos )
155 {
156 	return svt::getHeaderCell(
157 			m_pImpl->m_aColHeaderCellMap,
158 			_nColumnPos,
159 			svt::BBTYPE_COLUMNHEADERCELL,
160 			m_pImpl->getAccessibleHeaderBar(svt::BBTYPE_COLUMNHEADERBAR),
161 			*this,
162             m_pImpl->m_aFactoryAccess.getFactory()
163     );
164 }
165 // -----------------------------------------------------------------------------
166 
167 sal_Int32 BrowseBox::GetAccessibleControlCount() const
168 {
169     return 0;
170 }
171 // -----------------------------------------------------------------------------
172 
173 Reference< XAccessible > BrowseBox::CreateAccessibleControl( sal_Int32 )
174 {
175 	DBG_ASSERT( sal_False, "BrowseBox::CreateAccessibleControl: to be overwritten!" );
176     return NULL;
177 }
178 // -----------------------------------------------------------------------------
179 
180 // Conversions ----------------------------------------------------------------
181 
182 sal_Bool BrowseBox::ConvertPointToCellAddress(
183         sal_Int32& rnRow, sal_uInt16& rnColumnPos, const Point& rPoint )
184 {
185     //! TODO has to be checked
186 	rnRow = GetRowAtYPosPixel(rPoint.Y());
187 	rnColumnPos = GetColumnAtXPosPixel(rPoint.X());
188     return rnRow != BROWSER_INVALIDID && rnColumnPos != BROWSER_INVALIDID;
189 }
190 // -----------------------------------------------------------------------------
191 
192 sal_Bool BrowseBox::ConvertPointToRowHeader( sal_Int32& rnRow, const Point& rPoint )
193 {
194     rnRow = GetRowAtYPosPixel(rPoint.Y());
195 	//	sal_uInt16 nColumnId = GetColumnAtXPosPixel(rPoint.X());
196     return rnRow != BROWSER_INVALIDID;// && nColumnId == 0;
197 }
198 // -----------------------------------------------------------------------------
199 
200 sal_Bool BrowseBox::ConvertPointToColumnHeader( sal_uInt16& _rnColumnPos, const Point& _rPoint )
201 {
202 	_rnColumnPos = GetColumnAtXPosPixel(_rPoint.X());
203     return _rnColumnPos != BROWSER_INVALIDID;
204 }
205 // -----------------------------------------------------------------------------
206 
207 sal_Bool BrowseBox::ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint )
208 {
209     //! TODO has to be checked
210 	sal_Int32 nRow = 0;
211 	sal_uInt16 nColumn = 0;
212 	sal_Bool bRet = ConvertPointToCellAddress(nRow,nColumn,_rPoint);
213 	if ( bRet )
214 		_rnIndex = nRow * ColCount() + nColumn;
215 
216     return bRet;
217 }
218 // -----------------------------------------------------------------------------
219 
220 // Object data and state ------------------------------------------------------
221 
222 OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 ) const
223 {
224     OUString aRetText;
225     switch( eObjType )
226     {
227         case ::svt::BBTYPE_BROWSEBOX:
228             aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "BrowseBox" ) );
229 			break;
230         case ::svt::BBTYPE_TABLE:
231 			aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "Table" ) );
232 			break;
233         case ::svt::BBTYPE_ROWHEADERBAR:
234 			aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "RowHeaderBar" ) );
235 			break;
236         case ::svt::BBTYPE_COLUMNHEADERBAR:
237 			aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderBar" ) );
238 			break;
239         case ::svt::BBTYPE_TABLECELL:
240             aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "TableCell" ) );
241 #if OSL_DEBUG_LEVEL > 1
242             aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( " [" ) );
243 			aRetText += OUString::valueOf(sal_Int32(GetCurRow()));
244 			aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( "," ) );
245 			aRetText += OUString::valueOf(sal_Int32(GetCurColumnId()));
246 			aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( "]" ) );
247 #endif
248 			break;
249         case ::svt::BBTYPE_ROWHEADERCELL:
250 			aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "RowHeaderCell" ) );
251 #if OSL_DEBUG_LEVEL > 1
252             aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( " [" ) );
253 			aRetText += OUString::valueOf(sal_Int32(GetCurRow()));
254 			aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( "," ) );
255 			aRetText += OUString::valueOf(sal_Int32(GetCurColumnId()));
256 			aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( "]" ) );
257 #endif
258 			break;
259         case ::svt::BBTYPE_COLUMNHEADERCELL:
260 			aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderCell" ) );
261 #if OSL_DEBUG_LEVEL > 1
262             aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( " [" ) );
263 			aRetText += OUString::valueOf(sal_Int32(GetCurRow()));
264 			aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( "," ) );
265 			aRetText += OUString::valueOf(sal_Int32(GetCurColumnId()));
266 			aRetText += OUString( RTL_CONSTASCII_USTRINGPARAM( "]" ) );
267 #endif
268 			break;
269 		default:
270 			OSL_ENSURE(0,"BrowseBox::GetAccessibleName: invalid enum!");
271     }
272     return aRetText;
273 }
274 // -----------------------------------------------------------------------------
275 
276 OUString BrowseBox::GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 ) const
277 {
278     OUString aRetText;
279     switch( eObjType )
280     {
281         case ::svt::BBTYPE_BROWSEBOX:
282             aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "BrowseBox description" ) );
283 			break;
284         case ::svt::BBTYPE_TABLE:
285 			//	aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "TABLE description" ) );
286 			break;
287         case ::svt::BBTYPE_ROWHEADERBAR:
288 			//	aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "ROWHEADERBAR description" ) );
289 			break;
290         case ::svt::BBTYPE_COLUMNHEADERBAR:
291 			//	aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "COLUMNHEADERBAR description" ) );
292 			break;
293         case ::svt::BBTYPE_TABLECELL:
294 			//	aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "TABLECELL description" ) );
295 			break;
296         case ::svt::BBTYPE_ROWHEADERCELL:
297 			//	aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "ROWHEADERCELL description" ) );
298 			break;
299         case ::svt::BBTYPE_COLUMNHEADERCELL:
300 			//	aRetText = OUString( RTL_CONSTASCII_USTRINGPARAM( "COLUMNHEADERCELL description" ) );
301 			break;
302         case ::svt::BBTYPE_CHECKBOXCELL:
303             break;
304     }
305     return aRetText;
306 }
307 // -----------------------------------------------------------------------------
308 
309 OUString BrowseBox::GetRowDescription( sal_Int32 ) const
310 {
311     return OUString();
312 }
313 // -----------------------------------------------------------------------------
314 
315 OUString BrowseBox::GetColumnDescription( sal_uInt16 _nColumn ) const
316 {
317     return OUString( GetColumnTitle( GetColumnId( _nColumn ) ) );
318 }
319 
320 // -----------------------------------------------------------------------------
321 
322 void BrowseBox::FillAccessibleStateSet(
323         ::utl::AccessibleStateSetHelper& rStateSet,
324         ::svt::AccessibleBrowseBoxObjType eObjType ) const
325 {
326 	switch( eObjType )
327     {
328         case ::svt::BBTYPE_BROWSEBOX:
329 		case ::svt::BBTYPE_TABLE:
330 
331 			rStateSet.AddState( AccessibleStateType::FOCUSABLE );
332 			if ( HasFocus() )
333 				rStateSet.AddState( AccessibleStateType::FOCUSED );
334 			if ( IsActive() )
335 				rStateSet.AddState( AccessibleStateType::ACTIVE );
336 			if ( GetUpdateMode() )
337 				rStateSet.AddState( AccessibleStateType::EDITABLE );
338 			if ( IsEnabled() )
339             {
340 				rStateSet.AddState( AccessibleStateType::ENABLED );
341                 rStateSet.AddState( AccessibleStateType::SENSITIVE );
342             }
343 			if ( IsReallyVisible() )
344 				rStateSet.AddState( AccessibleStateType::VISIBLE );
345 			if ( eObjType == ::svt::BBTYPE_TABLE )
346 				rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
347 
348 			break;
349         case ::svt::BBTYPE_ROWHEADERBAR:
350 			rStateSet.AddState( AccessibleStateType::FOCUSABLE );
351 			rStateSet.AddState( AccessibleStateType::VISIBLE );
352 			if ( GetSelectRowCount() )
353 				rStateSet.AddState( AccessibleStateType::FOCUSED );
354 			rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
355 			break;
356         case ::svt::BBTYPE_COLUMNHEADERBAR:
357 			rStateSet.AddState( AccessibleStateType::FOCUSABLE );
358 			rStateSet.AddState( AccessibleStateType::VISIBLE );
359 			if ( GetSelectColumnCount() )
360 				rStateSet.AddState( AccessibleStateType::FOCUSED );
361 			rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
362 			break;
363         case ::svt::BBTYPE_TABLECELL:
364 			{
365 				sal_Int32 nRow = GetCurRow();
366 				sal_uInt16 nColumn = GetCurColumnId();
367 				if ( IsFieldVisible(nRow,nColumn) )
368 					rStateSet.AddState( AccessibleStateType::VISIBLE );
369 				if ( !IsFrozen( nColumn ) )
370 					rStateSet.AddState( AccessibleStateType::FOCUSABLE );
371 				rStateSet.AddState( AccessibleStateType::TRANSIENT );
372 			}
373 			break;
374         case ::svt::BBTYPE_ROWHEADERCELL:
375 		case ::svt::BBTYPE_COLUMNHEADERCELL:
376         case ::svt::BBTYPE_CHECKBOXCELL:
377 			OSL_ENSURE(0,"Illegal call here!");
378 			break;
379     }
380 }
381 // -----------------------------------------------------------------------
382 void BrowseBox::FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet,
383 											   sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const
384 {
385 	//! TODO check if the state is valid for table cells
386 	if ( IsCellVisible( _nRow, _nColumnPos ) )
387 		_rStateSet.AddState( AccessibleStateType::VISIBLE );
388 	if ( GetCurrRow() == _nRow && GetCurrColumn() == _nColumnPos )
389 		_rStateSet.AddState( AccessibleStateType::FOCUSED );
390 	else // only transient when column is not focused
391 		_rStateSet.AddState( AccessibleStateType::TRANSIENT );
392 }
393 // -----------------------------------------------------------------------------
394 
395 void BrowseBox::GrabTableFocus()
396 {
397     GrabFocus();
398 }
399 // -----------------------------------------------------------------------------
400 String BrowseBox::GetCellText(long, sal_uInt16 ) const
401 {
402 	DBG_ASSERT(0,"This method has to be implemented by the derived classes! BUG!!");
403 	return String();
404 }
405 
406 // -----------------------------------------------------------------------------
407 void BrowseBox::commitHeaderBarEvent(sal_Int16 nEventId,
408         const Any& rNewValue, const Any& rOldValue, sal_Bool _bColumnHeaderBar )
409 {
410     if ( isAccessibleAlive() )
411 	    m_pImpl->m_pAccessible->commitHeaderBarEvent( nEventId,
412             rNewValue, rOldValue, _bColumnHeaderBar );
413 }
414 
415 // -----------------------------------------------------------------------------
416 void BrowseBox::commitTableEvent( sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue )
417 {
418     if ( isAccessibleAlive() )
419 	    m_pImpl->m_pAccessible->commitTableEvent( _nEventId, _rNewValue, _rOldValue );
420 }
421 // -----------------------------------------------------------------------------
422 void BrowseBox::commitBrowseBoxEvent( sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue )
423 {
424     if ( isAccessibleAlive() )
425 	    m_pImpl->m_pAccessible->commitEvent( _nEventId, _rNewValue, _rOldValue);
426 }
427 
428 // -----------------------------------------------------------------------------
429 ::svt::IAccessibleFactory& BrowseBox::getAccessibleFactory()
430 {
431     return m_pImpl->m_aFactoryAccess.getFactory();
432 }
433 
434 // -----------------------------------------------------------------------------
435 sal_Bool BrowseBox::isAccessibleAlive( ) const
436 {
437     return ( NULL != m_pImpl->m_pAccessible ) && m_pImpl->m_pAccessible->isAlive();
438 }
439 // -----------------------------------------------------------------------------
440 // IAccessibleTableProvider
441 // -----------------------------------------------------------------------------
442 sal_Int32 BrowseBox::GetCurrRow() const
443 {
444 	return GetCurRow();
445 }
446 // -----------------------------------------------------------------------------
447 sal_uInt16 BrowseBox::GetCurrColumn() const
448 {
449 	return GetColumnPos( GetCurColumnId() );
450 }
451 // -----------------------------------------------------------------------------
452 sal_Bool BrowseBox::HasRowHeader() const
453 {
454     return ( GetColumnId( 0 ) == 0 ); // HandleColumn == RowHeader
455 }
456 // -----------------------------------------------------------------------------
457 sal_Bool BrowseBox::IsCellFocusable() const
458 {
459 	return sal_True;
460 }
461 // -----------------------------------------------------------------------------
462 sal_Bool BrowseBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
463 {
464 	return GoToRowColumnId( _nRow, GetColumnId( _nColumn ) );
465 }
466 // -----------------------------------------------------------------------------
467 void BrowseBox::SelectColumn( sal_uInt16 _nColumn, sal_Bool _bSelect )
468 {
469 	SelectColumnPos( _nColumn, _bSelect );
470 }
471 // -----------------------------------------------------------------------------
472 sal_Bool BrowseBox::IsColumnSelected( long _nColumn ) const
473 {
474     return ( pColSel && (0 <= _nColumn) && (_nColumn <= 0xFFF) ) ?
475         pColSel->IsSelected( static_cast< sal_uInt16 >( _nColumn ) ) :
476         sal_False;
477 }
478 // -----------------------------------------------------------------------------
479 sal_Int32 BrowseBox::GetSelectedRowCount() const
480 {
481 	return GetSelectRowCount();
482 }
483 // -----------------------------------------------------------------------------
484 sal_Int32 BrowseBox::GetSelectedColumnCount() const
485 {
486     const MultiSelection* pColumnSel = GetColumnSelection();
487     return pColumnSel ? pColumnSel->GetSelectCount() : 0;
488 }
489 // -----------------------------------------------------------------------------
490 void BrowseBox::GetAllSelectedRows( ::com::sun::star::uno::Sequence< sal_Int32 >& _rRows ) const
491 {
492     sal_Int32 nCount = GetSelectRowCount();
493     if( nCount )
494     {
495         _rRows.realloc( nCount );
496         _rRows[ 0 ] = const_cast< BrowseBox* >( this )->FirstSelectedRow();
497         for( sal_Int32 nIndex = 1; nIndex < nCount; ++nIndex )
498             _rRows[ nIndex ] = const_cast< BrowseBox* >( this )->NextSelectedRow();
499         DBG_ASSERT( const_cast< BrowseBox* >( this )->NextSelectedRow() == BROWSER_ENDOFSELECTION,
500 					"BrowseBox::GetAllSelectedRows - too many selected rows found" );
501     }
502 }
503 // -----------------------------------------------------------------------------
504 void BrowseBox::GetAllSelectedColumns( ::com::sun::star::uno::Sequence< sal_Int32 >& _rColumns ) const
505 {
506     const MultiSelection* pColumnSel = GetColumnSelection();
507     sal_Int32 nCount = GetSelectedColumnCount();
508     if( pColumnSel && nCount )
509     {
510         _rColumns.realloc( nCount );
511 
512         sal_Int32 nIndex = 0;
513         sal_uInt32 nRangeCount = pColumnSel->GetRangeCount();
514         for( sal_uInt32 nRange = 0; nRange < nRangeCount; ++nRange )
515         {
516             const Range& rRange = pColumnSel->GetRange( nRange );
517             // loop has to include aRange.Max()
518             for( sal_Int32 nCol = rRange.Min(); nCol <= rRange.Max(); ++nCol )
519             {
520                 DBG_ASSERT( nIndex < nCount,
521                     "GetAllSelectedColumns - range overflow" );
522                 _rColumns[ nIndex ] = nCol;
523                 ++nIndex;
524             }
525         }
526     }
527 }
528 // -----------------------------------------------------------------------------
529 sal_Bool BrowseBox::IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const
530 {
531 	return IsFieldVisible( _nRow, GetColumnId( _nColumnPos ) );
532 }
533 // -----------------------------------------------------------------------------
534 String BrowseBox::GetAccessibleCellText(long _nRow, sal_uInt16 _nColPos) const
535 {
536     return GetCellText( _nRow, GetColumnId( _nColPos ) );
537 }
538 
539 // -----------------------------------------------------------------------------
540 sal_Bool BrowseBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
541 {
542 	return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, nBase, rVector );
543 }
544 // -----------------------------------------------------------------------------
545 Rectangle BrowseBox::GetWindowExtentsRelative( Window *pRelativeWindow ) const
546 {
547 	return Control::GetWindowExtentsRelative( pRelativeWindow );
548 }
549 // -----------------------------------------------------------------------------
550 void BrowseBox::GrabFocus()
551 {
552 	Control::GrabFocus();
553 }
554 // -----------------------------------------------------------------------------
555 Reference< XAccessible > BrowseBox::GetAccessible( sal_Bool bCreate )
556 {
557 	return Control::GetAccessible( bCreate );
558 }
559 // -----------------------------------------------------------------------------
560 Window* BrowseBox::GetAccessibleParentWindow() const
561 {
562 	return Control::GetAccessibleParentWindow();
563 }
564 // -----------------------------------------------------------------------------
565 Window* BrowseBox::GetWindowInstance()
566 {
567 	return this;
568 }
569