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_accessibility.hxx"
30 #include "accessibility/extended/AccessibleBrowseBoxBase.hxx"
31 #include <svtools/accessibletableprovider.hxx>
32 #include <rtl/uuid.h>
33 //
34 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
35 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
36 #include <unotools/accessiblerelationsethelper.hxx>
37 
38 // ============================================================================
39 
40 using ::rtl::OUString;
41 
42 using ::com::sun::star::uno::Reference;
43 using ::com::sun::star::uno::Sequence;
44 using ::com::sun::star::uno::Any;
45 
46 using namespace ::com::sun::star;
47 using namespace ::com::sun::star::accessibility;
48 using namespace ::comphelper;
49 using namespace ::svt;
50 
51 
52 // ============================================================================
53 
54 namespace accessibility {
55 
56 using namespace com::sun::star::accessibility::AccessibleStateType;
57 // ============================================================================
58 
59 // Ctor/Dtor/disposing --------------------------------------------------------
60 
61 DBG_NAME( AccessibleBrowseBoxBase )
62 
63 AccessibleBrowseBoxBase::AccessibleBrowseBoxBase(
64         const Reference< XAccessible >& rxParent,
65         IAccessibleTableProvider&                      rBrowseBox,
66 		const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
67         AccessibleBrowseBoxObjType      eObjType ) :
68     AccessibleBrowseBoxImplHelper( m_aMutex ),
69     mxParent( rxParent ),
70     mpBrowseBox( &rBrowseBox ),
71     m_xFocusWindow(_xFocusWindow),
72     maName( rBrowseBox.GetAccessibleObjectName( eObjType ) ),
73     maDescription( rBrowseBox.GetAccessibleObjectDescription( eObjType ) ),
74     meObjType( eObjType ),
75 	m_aClientId(0)
76 {
77     DBG_CTOR( AccessibleBrowseBoxBase, NULL );
78 	if ( m_xFocusWindow.is() )
79 		m_xFocusWindow->addFocusListener( this );
80 }
81 
82 AccessibleBrowseBoxBase::AccessibleBrowseBoxBase(
83         const Reference< XAccessible >& rxParent,
84         IAccessibleTableProvider&                      rBrowseBox,
85 		const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
86         AccessibleBrowseBoxObjType      eObjType,
87         const ::rtl::OUString&          rName,
88         const ::rtl::OUString&          rDescription ) :
89     AccessibleBrowseBoxImplHelper( m_aMutex ),
90     mxParent( rxParent ),
91     mpBrowseBox( &rBrowseBox ),
92     m_xFocusWindow(_xFocusWindow),
93     maName( rName ),
94     maDescription( rDescription ),
95     meObjType( eObjType ),
96 	m_aClientId(0)
97 {
98     DBG_CTOR( AccessibleBrowseBoxBase, NULL );
99 	if ( m_xFocusWindow.is() )
100 		m_xFocusWindow->addFocusListener( this );
101 }
102 
103 AccessibleBrowseBoxBase::~AccessibleBrowseBoxBase()
104 {
105     DBG_DTOR( AccessibleBrowseBoxBase, NULL );
106 
107     if( isAlive() )
108     {
109         // increment ref count to prevent double call of Dtor
110         osl_incrementInterlockedCount( &m_refCount );
111         dispose();
112     }
113 }
114 
115 void SAL_CALL AccessibleBrowseBoxBase::disposing()
116 {
117     ::osl::MutexGuard aGuard( getOslMutex() );
118 	if ( m_xFocusWindow.is() )
119 	{
120 		BBSolarGuard aSolarGuard;
121 		m_xFocusWindow->removeFocusListener( this );
122 	}
123 
124 	if ( getClientId( ) )
125 	{
126 		AccessibleEventNotifier::TClientId nId( getClientId( ) );
127 	    setClientId( 0 );
128 	    AccessibleEventNotifier::revokeClientNotifyDisposing( nId, *this );
129 	}
130 
131     mxParent = NULL;
132     mpBrowseBox = NULL;
133 }
134 
135 // XAccessibleContext ---------------------------------------------------------
136 
137 Reference< XAccessible > SAL_CALL AccessibleBrowseBoxBase::getAccessibleParent()
138     throw ( uno::RuntimeException )
139 {
140     ::osl::MutexGuard aGuard( getOslMutex() );
141     ensureIsAlive();
142     return mxParent;
143 }
144 
145 sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getAccessibleIndexInParent()
146     throw ( uno::RuntimeException )
147 {
148     ::osl::MutexGuard aGuard( getOslMutex() );
149     ensureIsAlive();
150 
151     // -1 for child not found/no parent (according to specification)
152     sal_Int32 nRet = -1;
153 
154 	Reference< uno::XInterface > xMeMyselfAndI( static_cast< XAccessibleContext* >( this ), uno::UNO_QUERY );
155 
156     //  iterate over parent's children and search for this object
157     if( mxParent.is() )
158     {
159         Reference< XAccessibleContext >
160             xParentContext( mxParent->getAccessibleContext() );
161         if( xParentContext.is() )
162         {
163 			Reference< uno::XInterface > xChild;
164 
165             sal_Int32 nChildCount = xParentContext->getAccessibleChildCount();
166             for( sal_Int32 nChild = 0; nChild < nChildCount; ++nChild )
167             {
168 				xChild = xChild.query( xParentContext->getAccessibleChild( nChild ) );
169 
170 				if ( xMeMyselfAndI.get() == xChild.get() )
171 				{
172                     nRet = nChild;
173 					break;
174 				}
175             }
176         }
177    }
178    return nRet;
179 }
180 
181 OUString SAL_CALL AccessibleBrowseBoxBase::getAccessibleDescription()
182     throw ( uno::RuntimeException )
183 {
184     ::osl::MutexGuard aGuard( getOslMutex() );
185     ensureIsAlive();
186     return maDescription;
187 }
188 
189 OUString SAL_CALL AccessibleBrowseBoxBase::getAccessibleName()
190     throw ( uno::RuntimeException )
191 {
192     ::osl::MutexGuard aGuard( getOslMutex() );
193     ensureIsAlive();
194     return maName;
195 }
196 
197 Reference< XAccessibleRelationSet > SAL_CALL
198 AccessibleBrowseBoxBase::getAccessibleRelationSet()
199     throw ( uno::RuntimeException )
200 {
201     ensureIsAlive();
202     // BrowseBox does not have relations.
203    	return new utl::AccessibleRelationSetHelper;
204 }
205 
206 Reference< XAccessibleStateSet > SAL_CALL
207 AccessibleBrowseBoxBase::getAccessibleStateSet()
208     throw ( uno::RuntimeException )
209 {
210     BBSolarGuard aSolarGuard;
211     ::osl::MutexGuard aGuard( getOslMutex() );
212     // don't check whether alive -> StateSet may contain DEFUNC
213     return implCreateStateSetHelper();
214 }
215 
216 lang::Locale SAL_CALL AccessibleBrowseBoxBase::getLocale()
217     throw ( IllegalAccessibleComponentStateException, uno::RuntimeException )
218 {
219     ::osl::MutexGuard aGuard( getOslMutex() );
220     ensureIsAlive();
221 	if( mxParent.is() )
222     {
223         Reference< XAccessibleContext >
224             xParentContext( mxParent->getAccessibleContext() );
225         if( xParentContext.is() )
226 	    	return xParentContext->getLocale();
227     }
228     throw IllegalAccessibleComponentStateException();
229 }
230 
231 // XAccessibleComponent -------------------------------------------------------
232 
233 sal_Bool SAL_CALL AccessibleBrowseBoxBase::containsPoint( const awt::Point& rPoint )
234     throw ( uno::RuntimeException )
235 {
236     return Rectangle( Point(), getBoundingBox().GetSize() ).IsInside( VCLPoint( rPoint ) );
237 }
238 
239 awt::Rectangle SAL_CALL AccessibleBrowseBoxBase::getBounds()
240     throw ( uno::RuntimeException )
241 {
242     return AWTRectangle( getBoundingBox() );
243 }
244 
245 awt::Point SAL_CALL AccessibleBrowseBoxBase::getLocation()
246     throw ( uno::RuntimeException )
247 {
248     return AWTPoint( getBoundingBox().TopLeft() );
249 }
250 
251 awt::Point SAL_CALL AccessibleBrowseBoxBase::getLocationOnScreen()
252     throw ( uno::RuntimeException )
253 {
254     return AWTPoint( getBoundingBoxOnScreen().TopLeft() );
255 }
256 
257 awt::Size SAL_CALL AccessibleBrowseBoxBase::getSize()
258     throw ( uno::RuntimeException )
259 {
260     return AWTSize( getBoundingBox().GetSize() );
261 }
262 
263 sal_Bool SAL_CALL AccessibleBrowseBoxBase::isShowing()
264     throw ( uno::RuntimeException )
265 {
266     BBSolarGuard aSolarGuard;
267     ::osl::MutexGuard aGuard( getOslMutex() );
268     ensureIsAlive();
269     return implIsShowing();
270 }
271 
272 sal_Bool SAL_CALL AccessibleBrowseBoxBase::isVisible()
273     throw ( uno::RuntimeException )
274 {
275     Reference< XAccessibleStateSet > xStateSet = getAccessibleStateSet();
276     return xStateSet.is() ?
277         xStateSet->contains( AccessibleStateType::VISIBLE ) : sal_False;
278 }
279 
280 sal_Bool SAL_CALL AccessibleBrowseBoxBase::isFocusTraversable()
281     throw ( uno::RuntimeException )
282 {
283     Reference< XAccessibleStateSet > xStateSet = getAccessibleStateSet();
284     return xStateSet.is() ?
285         xStateSet->contains( AccessibleStateType::FOCUSABLE ) : sal_False;
286 }
287 
288 void SAL_CALL AccessibleBrowseBoxBase::focusGained( const ::com::sun::star::awt::FocusEvent& ) throw (::com::sun::star::uno::RuntimeException)
289 {
290 	com::sun::star::uno::Any aFocused;
291 	com::sun::star::uno::Any aEmpty;
292 	aFocused <<= FOCUSED;
293 
294 	commitEvent(AccessibleEventId::STATE_CHANGED,aFocused,aEmpty);
295 }
296 // -----------------------------------------------------------------------------
297 
298 void SAL_CALL AccessibleBrowseBoxBase::focusLost( const ::com::sun::star::awt::FocusEvent& ) throw (::com::sun::star::uno::RuntimeException)
299 {
300 	com::sun::star::uno::Any aFocused;
301 	com::sun::star::uno::Any aEmpty;
302 	aFocused <<= FOCUSED;
303 
304 	commitEvent(AccessibleEventId::STATE_CHANGED,aEmpty,aFocused);
305 }
306 // XAccessibleEventBroadcaster ------------------------------------------------
307 
308 void SAL_CALL AccessibleBrowseBoxBase::addEventListener(
309         const Reference< XAccessibleEventListener>& _rxListener )
310     throw ( uno::RuntimeException )
311 {
312 	if ( _rxListener.is() )
313 	{
314 		::osl::MutexGuard aGuard( getOslMutex() );
315 		if ( !getClientId( ) )
316 			setClientId( AccessibleEventNotifier::registerClient( ) );
317 
318 		AccessibleEventNotifier::addEventListener( getClientId( ), _rxListener );
319 	}
320 }
321 
322 void SAL_CALL AccessibleBrowseBoxBase::removeEventListener(
323         const Reference< XAccessibleEventListener>& _rxListener )
324     throw ( uno::RuntimeException )
325 {
326     if( _rxListener.is() && getClientId( ) )
327     {
328 		::osl::MutexGuard aGuard( getOslMutex() );
329         sal_Int32 nListenerCount = AccessibleEventNotifier::removeEventListener( getClientId( ), _rxListener );
330 		if ( !nListenerCount )
331 		{
332 			// no listeners anymore
333 			// -> revoke ourself. This may lead to the notifier thread dying (if we were the last client),
334 			// and at least to us not firing any events anymore, in case somebody calls
335 			// NotifyAccessibleEvent, again
336 
337 			AccessibleEventNotifier::TClientId nId( getClientId( ) );
338 			setClientId( 0 );
339 			AccessibleEventNotifier::revokeClient( nId );
340 		}
341     }
342 }
343 
344 // XTypeProvider --------------------------------------------------------------
345 
346 Sequence< sal_Int8 > SAL_CALL AccessibleBrowseBoxBase::getImplementationId()
347     throw ( uno::RuntimeException )
348 {
349     ::osl::MutexGuard aGuard( getOslGlobalMutex() );
350     static Sequence< sal_Int8 > aId;
351     implCreateUuid( aId );
352 	return aId;
353 }
354 
355 // XServiceInfo ---------------------------------------------------------------
356 
357 sal_Bool SAL_CALL AccessibleBrowseBoxBase::supportsService(
358         const OUString& rServiceName )
359     throw ( uno::RuntimeException )
360 {
361     ::osl::MutexGuard aGuard( getOslMutex() );
362 
363     Sequence< OUString > aSupportedServices( getSupportedServiceNames() );
364     const OUString* pArrBegin = aSupportedServices.getConstArray();
365     const OUString* pArrEnd = pArrBegin + aSupportedServices.getLength();
366     const OUString* pString = pArrBegin;
367 
368     for( ; ( pString != pArrEnd ) && ( rServiceName != *pString ); ++pString )
369 		;
370 
371     return pString != pArrEnd;
372 }
373 
374 Sequence< OUString > SAL_CALL AccessibleBrowseBoxBase::getSupportedServiceNames()
375     throw ( uno::RuntimeException )
376 {
377     const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.accessibility.AccessibleContext" ) );
378     return Sequence< OUString >( &aServiceName, 1 );
379 }
380 
381 // other public methods -------------------------------------------------------
382 
383 void AccessibleBrowseBoxBase::setAccessibleName( const OUString& rName )
384 {
385     ::osl::ClearableMutexGuard aGuard( getOslMutex() );
386     Any aOld;
387     aOld <<= maName;
388     maName = rName;
389 
390     aGuard.clear();
391 
392     commitEvent(
393         AccessibleEventId::NAME_CHANGED,
394         uno::makeAny( maName ),
395         aOld );
396 }
397 
398 void AccessibleBrowseBoxBase::setAccessibleDescription( const OUString& rDescription )
399 {
400     ::osl::ClearableMutexGuard aGuard( getOslMutex() );
401     Any aOld;
402     aOld <<= maDescription;
403     maDescription = rDescription;
404 
405     aGuard.clear();
406 
407     commitEvent(
408         AccessibleEventId::DESCRIPTION_CHANGED,
409         uno::makeAny( maDescription ),
410         aOld );
411 }
412 
413 // internal virtual methods ---------------------------------------------------
414 
415 sal_Bool AccessibleBrowseBoxBase::implIsShowing()
416 {
417     sal_Bool bShowing = sal_False;
418     if( mxParent.is() )
419     {
420         Reference< XAccessibleComponent >
421             xParentComp( mxParent->getAccessibleContext(), uno::UNO_QUERY );
422         if( xParentComp.is() )
423             bShowing = implGetBoundingBox().IsOver(
424                 VCLRectangle( xParentComp->getBounds() ) );
425     }
426 	return bShowing;
427 }
428 
429 ::utl::AccessibleStateSetHelper* AccessibleBrowseBoxBase::implCreateStateSetHelper()
430 {
431     ::utl::AccessibleStateSetHelper*
432         pStateSetHelper = new ::utl::AccessibleStateSetHelper;
433 
434     if( isAlive() )
435 	{
436         // SHOWING done with mxParent
437         if( implIsShowing() )
438 			pStateSetHelper->AddState( AccessibleStateType::SHOWING );
439         // BrowseBox fills StateSet with states depending on object type
440         mpBrowseBox->FillAccessibleStateSet( *pStateSetHelper, getType() );
441 	}
442 	else
443 		pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
444 
445 	return pStateSetHelper;
446 }
447 
448 // internal helper methods ----------------------------------------------------
449 
450 sal_Bool AccessibleBrowseBoxBase::isAlive() const
451 {
452     return !rBHelper.bDisposed && !rBHelper.bInDispose && mpBrowseBox;
453 }
454 
455 void AccessibleBrowseBoxBase::ensureIsAlive() const
456     throw ( lang::DisposedException )
457 {
458     if( !isAlive() )
459         throw lang::DisposedException();
460 }
461 
462 Rectangle AccessibleBrowseBoxBase::getBoundingBox()
463     throw ( lang::DisposedException )
464 {
465     BBSolarGuard aSolarGuard;
466     ::osl::MutexGuard aGuard( getOslMutex() );
467     ensureIsAlive();
468 	Rectangle aRect = implGetBoundingBox();
469 	if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() )
470 	{
471 		DBG_ERRORFILE( "shit" );
472 	}
473     return aRect;
474 }
475 
476 Rectangle AccessibleBrowseBoxBase::getBoundingBoxOnScreen()
477     throw ( lang::DisposedException )
478 {
479     BBSolarGuard aSolarGuard;
480     ::osl::MutexGuard aGuard( getOslMutex() );
481     ensureIsAlive();
482 	Rectangle aRect = implGetBoundingBoxOnScreen();
483 	if ( 0 == aRect.Left() && 0 == aRect.Top() && 0 == aRect.Right() && 0 == aRect.Bottom() )
484 	{
485 		DBG_ERRORFILE( "shit" );
486 	}
487     return aRect;
488 }
489 
490 void AccessibleBrowseBoxBase::commitEvent(
491         sal_Int16 _nEventId, const Any& _rNewValue, const Any& _rOldValue )
492 {
493     ::osl::ClearableMutexGuard aGuard( getOslMutex() );
494 	if ( !getClientId( ) )
495 	        // if we don't have a client id for the notifier, then we don't have listeners, then
496 	        // we don't need to notify anything
497 	        return;
498 
499 	// build an event object
500 	AccessibleEventObject aEvent;
501 	aEvent.Source = *this;
502 	aEvent.EventId = _nEventId;
503 	aEvent.OldValue = _rOldValue;
504 	aEvent.NewValue = _rNewValue;
505 
506 	// let the notifier handle this event
507 
508 	AccessibleEventNotifier::addEvent( getClientId( ), aEvent );
509 }
510 // -----------------------------------------------------------------------------
511 
512 void AccessibleBrowseBoxBase::implCreateUuid( Sequence< sal_Int8 >& rId )
513 {
514     if( !rId.hasElements() )
515 	{
516         rId.realloc( 16 );
517         rtl_createUuid( reinterpret_cast< sal_uInt8* >( rId.getArray() ), 0, sal_True );
518 	}
519 }
520 // -----------------------------------------------------------------------------
521 sal_Int16 SAL_CALL AccessibleBrowseBoxBase::getAccessibleRole()
522     throw ( uno::RuntimeException )
523 {
524     ensureIsAlive();
525 	sal_Int16 nRole = AccessibleRole::UNKNOWN;
526 	switch ( meObjType )
527 	{
528         case BBTYPE_ROWHEADERCELL:
529 			nRole = AccessibleRole::ROW_HEADER;
530 			break;
531 		case BBTYPE_COLUMNHEADERCELL:
532 			nRole = AccessibleRole::COLUMN_HEADER;
533 			break;
534 		case BBTYPE_COLUMNHEADERBAR:
535 		case BBTYPE_ROWHEADERBAR:
536 		case BBTYPE_TABLE:
537 			nRole = AccessibleRole::TABLE;
538 			break;
539 		case BBTYPE_TABLECELL:
540 			nRole = AccessibleRole::TABLE_CELL;
541 			break;
542 		case BBTYPE_BROWSEBOX:
543 			nRole = AccessibleRole::PANEL;
544 			break;
545         case BBTYPE_CHECKBOXCELL:
546             nRole = AccessibleRole::CHECK_BOX;
547             break;
548 	}
549     return nRole;
550 }
551 // -----------------------------------------------------------------------------
552 Any SAL_CALL AccessibleBrowseBoxBase::getAccessibleKeyBinding()
553         throw ( uno::RuntimeException )
554 {
555 	return Any();
556 }
557 // -----------------------------------------------------------------------------
558 Reference<XAccessible > SAL_CALL AccessibleBrowseBoxBase::getAccessibleAtPoint( const ::com::sun::star::awt::Point& )
559         throw ( uno::RuntimeException )
560 {
561 	return NULL;
562 }
563 // -----------------------------------------------------------------------------
564 void SAL_CALL AccessibleBrowseBoxBase::disposing( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
565 {
566 	m_xFocusWindow = NULL;
567 }
568 // -----------------------------------------------------------------------------
569 sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getForeground(  ) throw (::com::sun::star::uno::RuntimeException)
570 {
571 	BBSolarGuard aSolarGuard;
572     ::osl::MutexGuard aGuard( getOslMutex() );
573     ensureIsAlive();
574 
575 	sal_Int32 nColor = 0;
576     Window* pInst = mpBrowseBox->GetWindowInstance();
577     if ( pInst )
578 	{
579         if ( pInst->IsControlForeground() )
580             nColor = pInst->GetControlForeground().GetColor();
581 		else
582 		{
583 			Font aFont;
584             if ( pInst->IsControlFont() )
585                 aFont = pInst->GetControlFont();
586 			else
587                 aFont = pInst->GetFont();
588 			nColor = aFont.GetColor().GetColor();
589 		}
590 	}
591 
592 	return nColor;
593 }
594 // -----------------------------------------------------------------------------
595 sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getBackground(  ) throw (::com::sun::star::uno::RuntimeException)
596 {
597 	BBSolarGuard aSolarGuard;
598     ::osl::MutexGuard aGuard( getOslMutex() );
599     ensureIsAlive();
600 	sal_Int32 nColor = 0;
601     Window* pInst = mpBrowseBox->GetWindowInstance();
602     if ( pInst )
603 	{
604         if ( pInst->IsControlBackground() )
605             nColor = pInst->GetControlBackground().GetColor();
606 		else
607             nColor = pInst->GetBackground().GetColor().GetColor();
608 	}
609 
610 	return nColor;
611 }
612 
613 // ============================================================================
614 DBG_NAME( BrowseBoxAccessibleElement )
615 
616 // XInterface -----------------------------------------------------------------
617 IMPLEMENT_FORWARD_XINTERFACE2( BrowseBoxAccessibleElement, AccessibleBrowseBoxBase, BrowseBoxAccessibleElement_Base )
618 
619 // XTypeProvider --------------------------------------------------------------
620 IMPLEMENT_FORWARD_XTYPEPROVIDER2( BrowseBoxAccessibleElement, AccessibleBrowseBoxBase, BrowseBoxAccessibleElement_Base )
621 
622 // XAccessible ----------------------------------------------------------------
623 
624 Reference< XAccessibleContext > SAL_CALL BrowseBoxAccessibleElement::getAccessibleContext() throw ( uno::RuntimeException )
625 {
626     ensureIsAlive();
627 	return this;
628 }
629 
630 // ----------------------------------------------------------------------------
631 BrowseBoxAccessibleElement::BrowseBoxAccessibleElement( const Reference< XAccessible >& rxParent, IAccessibleTableProvider& rBrowseBox,
632 		const Reference< awt::XWindow >& _xFocusWindow, AccessibleBrowseBoxObjType  eObjType )
633 	:AccessibleBrowseBoxBase( rxParent, rBrowseBox, _xFocusWindow, eObjType )
634 {
635 	DBG_CTOR( BrowseBoxAccessibleElement, NULL );
636 }
637 
638 // ----------------------------------------------------------------------------
639 BrowseBoxAccessibleElement::BrowseBoxAccessibleElement( const Reference< XAccessible >& rxParent, IAccessibleTableProvider& rBrowseBox,
640 		const Reference< awt::XWindow >& _xFocusWindow, AccessibleBrowseBoxObjType  eObjType,
641 		const ::rtl::OUString& rName, const ::rtl::OUString& rDescription )
642 	:AccessibleBrowseBoxBase( rxParent, rBrowseBox, _xFocusWindow, eObjType, rName, rDescription )
643 {
644 	DBG_CTOR( BrowseBoxAccessibleElement, NULL );
645 }
646 
647 // ----------------------------------------------------------------------------
648 BrowseBoxAccessibleElement::~BrowseBoxAccessibleElement( )
649 {
650 	DBG_DTOR( BrowseBoxAccessibleElement, NULL );
651 }
652 
653 // ============================================================================
654 
655 } // namespace accessibility
656 
657 // ============================================================================
658 
659