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