LCOV - code coverage report
Current view: top level - accessibility/source/helper - acc_factory.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 65 117 55.6 %
Date: 2014-11-03 Functions: 18 36 50.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10