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