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