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