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/helper/acc_factory.hxx>
31 
32 #include <toolkit/awt/vclxwindows.hxx>
33 #include <accessibility/standard/vclxaccessiblebutton.hxx>
34 #include <accessibility/standard/vclxaccessiblecheckbox.hxx>
35 #include <accessibility/standard/vclxaccessibledropdowncombobox.hxx>
36 #include <accessibility/standard/vclxaccessiblecombobox.hxx>
37 #include <accessibility/standard/vclxaccessibledropdownlistbox.hxx>
38 #include <accessibility/standard/vclxaccessibleedit.hxx>
39 #include <accessibility/standard/vclxaccessiblefixedhyperlink.hxx>
40 #include <accessibility/standard/vclxaccessiblefixedtext.hxx>
41 #include <accessibility/standard/vclxaccessiblelistbox.hxx>
42 #include <accessibility/standard/vclxaccessiblemenu.hxx>
43 #include <accessibility/standard/vclxaccessibleradiobutton.hxx>
44 #include <accessibility/standard/vclxaccessiblescrollbar.hxx>
45 #include <accessibility/standard/vclxaccessibletextcomponent.hxx>
46 #include <accessibility/standard/vclxaccessibletoolbox.hxx>
47 #include <toolkit/awt/vclxaccessiblecomponent.hxx>
48 #include <accessibility/standard/vclxaccessiblestatusbar.hxx>
49 #include <accessibility/standard/vclxaccessibletabcontrol.hxx>
50 #include <accessibility/standard/vclxaccessibletabpagewindow.hxx>
51 #include <accessibility/standard/vclxaccessiblemenubar.hxx>
52 #include <accessibility/standard/vclxaccessiblepopupmenu.hxx>
53 #include <accessibility/extended/accessibletablistbox.hxx>
54 #include <accessibility/extended/AccessibleBrowseBox.hxx>
55 #include <accessibility/extended/accessibleiconchoicectrl.hxx>
56 #include <accessibility/extended/accessibletabbar.hxx>
57 #include <accessibility/extended/accessiblelistbox.hxx>
58 #include <accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx>
59 #include <accessibility/extended/textwindowaccessibility.hxx>
60 #include <accessibility/extended/AccessibleBrowseBoxTableCell.hxx>
61 #include <accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx>
62 #include <accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx>
63 #include <accessibility/extended/accessibleeditbrowseboxcell.hxx>
64 #include <accessibility/extended/AccessibleToolPanelDeck.hxx>
65 #include <accessibility/extended/AccessibleToolPanelDeckTabBar.hxx>
66 #include <accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx>
67 #include <vcl/lstbox.hxx>
68 #include <vcl/combobox.hxx>
69 #include <accessibility/extended/AccessibleGridControl.hxx>
70 #include <svtools/accessibletable.hxx>
71 #include <vcl/popupmenuwindow.hxx>
72 #include <cppuhelper/implbase1.hxx>
73 
74 #include "floatingwindowaccessible.hxx"
75 
76 //........................................................................
77 namespace accessibility
78 {
79 
80 inline bool hasFloatingChild(Window *pWindow)
81 {
82     Window * pChild = pWindow->GetAccessibleChildWindow(0);
83     if( pChild && WINDOW_FLOATINGWINDOW == pChild->GetType() )
84         return true;
85 
86     return false;
87 }
88 
89 //........................................................................
90 
91     using namespace ::com::sun::star::uno;
92     using namespace ::com::sun::star::awt;
93     using namespace ::com::sun::star::accessibility;
94     using namespace ::svt;
95 	using namespace ::svt::table;
96 
97     //================================================================
98 	//= IAccessibleFactory
99 	//================================================================
100     class AccessibleFactory :public ::toolkit::IAccessibleFactory
101                             ,public ::svt::IAccessibleFactory
102     {
103     private:
104         oslInterlockedCount m_refCount;
105 
106     public:
107         AccessibleFactory();
108 
109         // IReference
110 	    virtual oslInterlockedCount SAL_CALL acquire();
111 	    virtual oslInterlockedCount SAL_CALL release();
112 
113         // ::toolkit::IAccessibleFactory
114         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
115             createAccessibleContext( VCLXButton* _pXWindow );
116         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
117             createAccessibleContext( VCLXCheckBox* _pXWindow );
118         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
119             createAccessibleContext( VCLXRadioButton* _pXWindow );
120         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
121             createAccessibleContext( VCLXListBox* _pXWindow );
122         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
123             createAccessibleContext( VCLXFixedText* _pXWindow );
124         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
125             createAccessibleContext( VCLXFixedHyperlink* _pXWindow );
126         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
127             createAccessibleContext( VCLXScrollBar* _pXWindow );
128         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
129             createAccessibleContext( VCLXEdit* _pXWindow );
130         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
131             createAccessibleContext( VCLXComboBox* _pXWindow );
132         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
133             createAccessibleContext( VCLXToolBox* _pXWindow );
134         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
135             createAccessibleContext( VCLXWindow* _pXWindow );
136         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
137             createAccessible( Menu* _pMenu, sal_Bool _bIsMenuBar );
138 
139         // ::svt::IAccessibleFactory
140         virtual IAccessibleTabListBox*
141             createAccessibleTabListBox(
142 		        const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
143 		        SvHeaderTabListBox& rBox
144             ) const;
145 
146         virtual IAccessibleBrowseBox*
147             createAccessibleBrowseBox(
148                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
149                 IAccessibleTableProvider& _rBrowseBox
150 		    ) const;
151 
152 		virtual IAccessibleTableControl*
153             createAccessibleTableControl(
154                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
155 				IAccessibleTable& _rTable
156 		    ) const;
157 
158         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
159 		    createAccessibleIconChoiceCtrl(
160                 SvtIconChoiceCtrl& _rIconCtrl,
161                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent
162 		    ) const;
163 
164         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
165 		    createAccessibleTabBar(
166                 TabBar& _rTabBar
167 		    ) const;
168 
169         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
170 		    createAccessibleTextWindowContext(
171                 VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView, bool bCompoundControlChild
172 		    ) const;
173 
174         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
175             createAccessibleTreeListBox(
176                 SvTreeListBox& _rListBox,
177 				const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent
178 		    ) const;
179 
180         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
181             createAccessibleBrowseBoxHeaderBar(
182                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
183                 IAccessibleTableProvider& _rOwningTable,
184                 AccessibleBrowseBoxObjType _eObjType
185             ) const;
186 
187         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
188             createAccessibleBrowseBoxTableCell(
189                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
190 				IAccessibleTableProvider& _rBrowseBox,
191 				const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
192 				sal_Int32 _nRowId,
193 				sal_uInt16 _nColId,
194                 sal_Int32 _nOffset
195             ) const;
196 
197         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
198             createAccessibleBrowseBoxHeaderCell(
199                 sal_Int32 _nColumnRowId,
200 				const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent,
201 				IAccessibleTableProvider& _rBrowseBox,
202 				const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
203 				AccessibleBrowseBoxObjType  _eObjType
204             ) const;
205 
206         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
207             createAccessibleCheckBoxCell(
208                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
209 				IAccessibleTableProvider& _rBrowseBox,
210 				const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
211 				sal_Int32 _nRowPos,
212 				sal_uInt16 _nColPos,
213 				const TriState& _eState,
214 				sal_Bool _bEnabled,
215 				sal_Bool _bIsTriState
216             ) const;
217 
218         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
219             createEditBrowseBoxTableCellAccess(
220 			    const ::com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible >& _rxParent,
221 			    const ::com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible >& _rxControlAccessible,
222 			    const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _rxFocusWindow,
223                 IAccessibleTableProvider& _rBrowseBox,
224 			    sal_Int32 _nRowPos,
225 			    sal_uInt16 _nColPos
226 		    ) const;
227 
228         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
229             createAccessibleToolPanelDeck(
230                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent,
231                 ::svt::ToolPanelDeck& i_rPanelDeck
232             );
233         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
234             createAccessibleToolPanelTabBar(
235                 const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent,
236                 ::svt::IToolPanelDeck& i_rPanelDeck,
237                 ::svt::PanelTabBar& i_rTabBar
238             );
239 
240     protected:
241         virtual ~AccessibleFactory();
242     };
243 
244 
245 	//--------------------------------------------------------------------
246     AccessibleFactory::AccessibleFactory()
247         :m_refCount( 0 )
248     {
249     }
250 
251 	//--------------------------------------------------------------------
252     AccessibleFactory::~AccessibleFactory()
253     {
254     }
255 
256     //--------------------------------------------------------------------
257 	oslInterlockedCount SAL_CALL AccessibleFactory::acquire()
258     {
259         return osl_incrementInterlockedCount( &m_refCount );
260     }
261 
262 	//--------------------------------------------------------------------
263 	oslInterlockedCount SAL_CALL AccessibleFactory::release()
264     {
265         if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
266         {
267             delete this;
268             return 0;
269         }
270         return m_refCount;
271     }
272 
273 	//--------------------------------------------------------------------
274     Reference< XAccessible > AccessibleFactory::createAccessible( Menu* _pMenu, sal_Bool _bIsMenuBar )
275     {
276 		OAccessibleMenuBaseComponent* pAccessible;
277         if ( _bIsMenuBar )
278             pAccessible = new VCLXAccessibleMenuBar( _pMenu );
279         else
280             pAccessible = new VCLXAccessiblePopupMenu( _pMenu );
281 		pAccessible->SetStates();
282 		return pAccessible;
283     }
284 
285 	//--------------------------------------------------------------------
286     Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXButton* _pXWindow )
287     {
288         return new VCLXAccessibleButton( _pXWindow );
289     }
290 
291 	//--------------------------------------------------------------------
292     Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXCheckBox* _pXWindow )
293     {
294 	    return new VCLXAccessibleCheckBox( _pXWindow );
295     }
296 
297 	//--------------------------------------------------------------------
298     Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXRadioButton* _pXWindow )
299     {
300 	    return new VCLXAccessibleRadioButton( _pXWindow );
301     }
302 
303 	//--------------------------------------------------------------------
304     Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXListBox* _pXWindow )
305     {
306 	    sal_Bool bIsDropDownBox = sal_False;
307 	    ListBox* pBox = static_cast< ListBox* >( _pXWindow->GetWindow() );
308 	    if ( pBox )
309 		    bIsDropDownBox = ( ( pBox->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN );
310 
311 	    if ( bIsDropDownBox )
312 		    return new VCLXAccessibleDropDownListBox( _pXWindow );
313 	    else
314 		    return new VCLXAccessibleListBox( _pXWindow );
315     }
316 
317     //--------------------------------------------------------------------
318     Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXFixedText* _pXWindow )
319     {
320         return new VCLXAccessibleFixedText( _pXWindow );
321     }
322 
323     //--------------------------------------------------------------------
324     Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXFixedHyperlink* _pXWindow )
325     {
326         return new VCLXAccessibleFixedHyperlink( _pXWindow );
327     }
328 
329 	//--------------------------------------------------------------------
330     Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXScrollBar* _pXWindow )
331     {
332 	    return new VCLXAccessibleScrollBar( _pXWindow );
333     }
334 
335 	//--------------------------------------------------------------------
336     Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXEdit* _pXWindow )
337     {
338 	    return new VCLXAccessibleEdit( _pXWindow );
339     }
340 
341 	//--------------------------------------------------------------------
342     Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXComboBox* _pXWindow )
343     {
344 	    sal_Bool bIsDropDownBox = sal_False;
345 	    ComboBox* pBox = static_cast< ComboBox* >( _pXWindow->GetWindow() );
346 	    if ( pBox )
347 		    bIsDropDownBox = ( ( pBox->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN );
348 
349 	    if ( bIsDropDownBox )
350 		    return new VCLXAccessibleDropDownComboBox( _pXWindow );
351 	    else
352 		    return new VCLXAccessibleComboBox( _pXWindow );
353     }
354 
355 	//--------------------------------------------------------------------
356     Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXWindow* _pXWindow )
357     {
358         Reference< XAccessibleContext > xContext;
359 
360         Window* pWindow = _pXWindow->GetWindow();
361         if ( pWindow )
362         {
363             WindowType nType = pWindow->GetType();
364 
365             if ( nType == WINDOW_MENUBARWINDOW || pWindow->IsMenuFloatingWindow() || pWindow->IsToolbarFloatingWindow() )
366             {
367                 Reference< XAccessible > xAcc( pWindow->GetAccessible() );
368                 if ( xAcc.is() )
369                 {
370                     Reference< XAccessibleContext > xCont( xAcc->getAccessibleContext() );
371                     if ( pWindow->GetType() == WINDOW_MENUBARWINDOW ||
372                         ( xCont.is() && xCont->getAccessibleRole() == AccessibleRole::POPUP_MENU ) )
373                     {
374                         xContext = xCont;
375                     }
376                 }
377             }
378             else if ( nType == WINDOW_STATUSBAR )
379             {
380                 xContext = (XAccessibleContext*) new VCLXAccessibleStatusBar( _pXWindow );
381             }
382             else if ( nType == WINDOW_TABCONTROL )
383             {
384                 xContext = (XAccessibleContext*) new VCLXAccessibleTabControl( _pXWindow );
385             }
386             else if ( nType == WINDOW_TABPAGE && pWindow->GetAccessibleParentWindow() && pWindow->GetAccessibleParentWindow()->GetType() == WINDOW_TABCONTROL )
387             {
388                 xContext = new VCLXAccessibleTabPageWindow( _pXWindow );
389             }
390             else if ( nType == WINDOW_FLOATINGWINDOW )
391             {
392                 xContext = new FloatingWindowAccessible( _pXWindow );
393             }
394             else if ( nType == WINDOW_BORDERWINDOW && hasFloatingChild( pWindow ) )
395             {
396                 PopupMenuFloatingWindow* pChild = dynamic_cast<PopupMenuFloatingWindow*>(
397                     pWindow->GetAccessibleChildWindow(0));
398                 if ( pChild && pChild->IsPopupMenu() )
399                 {
400                     // Get the accessible context from the child window.
401                     Reference<XAccessible> xAccessible = pChild->CreateAccessible();
402                     if (xAccessible.is())
403                         xContext = xAccessible->getAccessibleContext();
404                 }
405                 else
406                     xContext = new FloatingWindowAccessible( _pXWindow );
407             }
408             else if ( ( nType == WINDOW_HELPTEXTWINDOW ) || ( nType == WINDOW_FIXEDLINE ) )
409             {
410                xContext = (accessibility::XAccessibleContext*) new VCLXAccessibleFixedText( _pXWindow );
411             }
412             else
413             {
414                xContext = (accessibility::XAccessibleContext*) new VCLXAccessibleComponent( _pXWindow );
415             }
416         }
417 
418         return xContext;
419     }
420 
421 	//--------------------------------------------------------------------
422     Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXToolBox* _pXWindow )
423     {
424 	    return new VCLXAccessibleToolBox( _pXWindow );
425     }
426 
427 	//--------------------------------------------------------------------
428     IAccessibleTabListBox* AccessibleFactory::createAccessibleTabListBox(
429         const Reference< XAccessible >& rxParent, SvHeaderTabListBox& rBox ) const
430     {
431         return new AccessibleTabListBox( rxParent, rBox );
432     }
433 
434 	//--------------------------------------------------------------------
435     IAccessibleBrowseBox* AccessibleFactory::createAccessibleBrowseBox(
436         const Reference< XAccessible >& _rxParent, IAccessibleTableProvider& _rBrowseBox ) const
437     {
438         return new AccessibleBrowseBoxAccess( _rxParent, _rBrowseBox );
439     }
440 
441 	//--------------------------------------------------------------------
442     IAccessibleTableControl* AccessibleFactory::createAccessibleTableControl(
443         const Reference< XAccessible >& _rxParent, IAccessibleTable& _rTable ) const
444     {
445 		return new AccessibleGridControlAccess( _rxParent, _rTable );
446     }
447 
448 	//--------------------------------------------------------------------
449     Reference< XAccessible > AccessibleFactory::createAccessibleIconChoiceCtrl(
450         SvtIconChoiceCtrl& _rIconCtrl, const Reference< XAccessible >& _xParent ) const
451     {
452         return new AccessibleIconChoiceCtrl( _rIconCtrl, _xParent );
453     }
454 
455 	//--------------------------------------------------------------------
456     Reference< XAccessible > AccessibleFactory::createAccessibleTabBar( TabBar& _rTabBar ) const
457     {
458         return new AccessibleTabBar( &_rTabBar );
459     }
460 
461 	//--------------------------------------------------------------------
462     Reference< XAccessibleContext > AccessibleFactory::createAccessibleTextWindowContext(
463         VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView, bool bCompoundControlChild ) const
464     {
465         return new Document( pVclXWindow, rEngine, rView, bCompoundControlChild );
466     }
467 
468 	//--------------------------------------------------------------------
469     Reference< XAccessible > AccessibleFactory::createAccessibleTreeListBox(
470         SvTreeListBox& _rListBox, const Reference< XAccessible >& _xParent ) const
471     {
472         return new AccessibleListBox( _rListBox, _xParent );
473     }
474 
475 	//--------------------------------------------------------------------
476     Reference< XAccessible > AccessibleFactory::createAccessibleBrowseBoxHeaderBar(
477         const Reference< XAccessible >& rxParent, IAccessibleTableProvider& _rOwningTable,
478         AccessibleBrowseBoxObjType _eObjType ) const
479     {
480         return new AccessibleBrowseBoxHeaderBar( rxParent, _rOwningTable, _eObjType );
481     }
482 
483 	//--------------------------------------------------------------------
484     Reference< XAccessible > AccessibleFactory::createAccessibleBrowseBoxTableCell(
485         const Reference< XAccessible >& _rxParent, IAccessibleTableProvider& _rBrowseBox,
486         const Reference< XWindow >& _xFocusWindow, sal_Int32 _nRowId, sal_uInt16 _nColId, sal_Int32 _nOffset ) const
487     {
488         return new AccessibleBrowseBoxTableCell( _rxParent, _rBrowseBox, _xFocusWindow,
489             _nRowId, _nColId, _nOffset );
490     }
491 
492 	//--------------------------------------------------------------------
493     Reference< XAccessible > AccessibleFactory::createAccessibleBrowseBoxHeaderCell(
494         sal_Int32 _nColumnRowId, const Reference< XAccessible >& rxParent, IAccessibleTableProvider& _rBrowseBox,
495         const Reference< XWindow >& _xFocusWindow, AccessibleBrowseBoxObjType  _eObjType ) const
496     {
497         return new AccessibleBrowseBoxHeaderCell( _nColumnRowId, rxParent, _rBrowseBox,
498             _xFocusWindow, _eObjType );
499     }
500 
501 	//--------------------------------------------------------------------
502     Reference< XAccessible > AccessibleFactory::createAccessibleCheckBoxCell(
503         const Reference< XAccessible >& _rxParent, IAccessibleTableProvider& _rBrowseBox,
504         const Reference< XWindow >& _xFocusWindow, sal_Int32 _nRowPos, sal_uInt16 _nColPos,
505         const TriState& _eState, sal_Bool _bEnabled, sal_Bool _bIsTriState ) const
506     {
507         return new AccessibleCheckBoxCell( _rxParent, _rBrowseBox, _xFocusWindow,
508             _nRowPos, _nColPos, _eState, _bEnabled, _bIsTriState );
509     }
510 
511 	//--------------------------------------------------------------------
512     Reference< XAccessible > AccessibleFactory::createEditBrowseBoxTableCellAccess(
513 	    const Reference< XAccessible >& _rxParent, const Reference< XAccessible >& _rxControlAccessible,
514         const Reference< XWindow >& _rxFocusWindow, IAccessibleTableProvider& _rBrowseBox,
515         sal_Int32 _nRowPos, sal_uInt16 _nColPos ) const
516     {
517         return new EditBrowseBoxTableCellAccess( _rxParent, _rxControlAccessible,
518             _rxFocusWindow, _rBrowseBox, _nRowPos, _nColPos );
519     }
520 
521 	//--------------------------------------------------------------------
522     Reference< XAccessibleContext > AccessibleFactory::createAccessibleToolPanelDeck(
523             const Reference< XAccessible >& i_rAccessibleParent, ::svt::ToolPanelDeck& i_rPanelDeck )
524     {
525         return new AccessibleToolPanelDeck( i_rAccessibleParent, i_rPanelDeck );
526     }
527 
528 	//--------------------------------------------------------------------
529     Reference< XAccessibleContext > AccessibleFactory::createAccessibleToolPanelTabBar(
530         const Reference< XAccessible >& i_rAccessibleParent, ::svt::IToolPanelDeck& i_rPanelDeck, ::svt::PanelTabBar& i_rTabBar )
531     {
532         return new AccessibleToolPanelTabBar( i_rAccessibleParent, i_rPanelDeck, i_rTabBar );
533     }
534 
535 //........................................................................
536 }   // namespace accessibility
537 //........................................................................
538 
539 //========================================================================
540 extern "C" void* SAL_CALL getStandardAccessibleFactory()
541 {
542     ::toolkit::IAccessibleFactory* pFactory = new ::accessibility::AccessibleFactory;
543 	pFactory->acquire();
544 	return pFactory;
545 }
546 
547 extern "C" void* SAL_CALL getSvtAccessibilityComponentFactory()
548 {
549     ::svt::IAccessibleFactory* pFactory = new ::accessibility::AccessibleFactory;
550 	pFactory->acquire();
551 	return pFactory;
552 }
553