diff options
Diffstat (limited to 'accessibility/source/helper')
-rw-r--r-- | accessibility/source/helper/acc_factory.cxx | 555 | ||||
-rw-r--r-- | accessibility/source/helper/accessiblestrings.src | 76 | ||||
-rw-r--r-- | accessibility/source/helper/accresmgr.cxx | 83 | ||||
-rw-r--r-- | accessibility/source/helper/characterattributeshelper.cxx | 114 | ||||
-rw-r--r-- | accessibility/source/helper/makefile.mk | 53 |
5 files changed, 0 insertions, 881 deletions
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx deleted file mode 100644 index 0c0bf172e..000000000 --- a/accessibility/source/helper/acc_factory.cxx +++ /dev/null @@ -1,555 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_accessibility.hxx" -#include <accessibility/helper/acc_factory.hxx> - -#include <toolkit/awt/vclxwindows.hxx> -#include <accessibility/standard/vclxaccessiblebutton.hxx> -#include <accessibility/standard/vclxaccessiblecheckbox.hxx> -#include <accessibility/standard/vclxaccessibledropdowncombobox.hxx> -#include <accessibility/standard/vclxaccessiblecombobox.hxx> -#include <accessibility/standard/vclxaccessibledropdownlistbox.hxx> -#include <accessibility/standard/vclxaccessibleedit.hxx> -#include <accessibility/standard/vclxaccessiblefixedhyperlink.hxx> -#include <accessibility/standard/vclxaccessiblefixedtext.hxx> -#include <accessibility/standard/vclxaccessiblelistbox.hxx> -#include <accessibility/standard/vclxaccessiblemenu.hxx> -#include <accessibility/standard/vclxaccessibleradiobutton.hxx> -#include <accessibility/standard/vclxaccessiblescrollbar.hxx> -#include <accessibility/standard/vclxaccessibletextcomponent.hxx> -#include <accessibility/standard/vclxaccessibletoolbox.hxx> -#include <toolkit/awt/vclxaccessiblecomponent.hxx> -#include <accessibility/standard/vclxaccessiblestatusbar.hxx> -#include <accessibility/standard/vclxaccessibletabcontrol.hxx> -#include <accessibility/standard/vclxaccessibletabpagewindow.hxx> -#include <accessibility/standard/vclxaccessiblemenubar.hxx> -#include <accessibility/standard/vclxaccessiblepopupmenu.hxx> -#include <accessibility/extended/accessibletablistbox.hxx> -#include <accessibility/extended/AccessibleBrowseBox.hxx> -#include <accessibility/extended/accessibleiconchoicectrl.hxx> -#include <accessibility/extended/accessibletabbar.hxx> -#include <accessibility/extended/accessiblelistbox.hxx> -#include <accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx> -#include <accessibility/extended/textwindowaccessibility.hxx> -#include <accessibility/extended/AccessibleBrowseBoxTableCell.hxx> -#include <accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx> -#include <accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx> -#include <accessibility/extended/accessibleeditbrowseboxcell.hxx> -#include <accessibility/extended/AccessibleToolPanelDeck.hxx> -#include <accessibility/extended/AccessibleToolPanelDeckTabBar.hxx> -#include <accessibility/extended/AccessibleToolPanelDeckTabBarItem.hxx> -#include <vcl/lstbox.hxx> -#include <vcl/combobox.hxx> -#include <accessibility/extended/AccessibleGridControl.hxx> -#include <svtools/accessibletable.hxx> -#include <vcl/popupmenuwindow.hxx> -#include <cppuhelper/implbase1.hxx> - -#include "floatingwindowaccessible.hxx" - -//........................................................................ -namespace accessibility -{ - -inline bool hasFloatingChild(Window *pWindow) -{ - Window * pChild = pWindow->GetAccessibleChildWindow(0); - if( pChild && WINDOW_FLOATINGWINDOW == pChild->GetType() ) - return true; - - return false; -} - -//........................................................................ - - using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::awt; - using namespace ::com::sun::star::accessibility; - using namespace ::svt; - using namespace ::svt::table; - - //================================================================ - //= IAccessibleFactory - //================================================================ - class AccessibleFactory :public ::toolkit::IAccessibleFactory - ,public ::svt::IAccessibleFactory - { - private: - oslInterlockedCount m_refCount; - - public: - AccessibleFactory(); - - // IReference - virtual oslInterlockedCount SAL_CALL acquire(); - virtual oslInterlockedCount SAL_CALL release(); - - // ::toolkit::IAccessibleFactory - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleContext( VCLXButton* _pXWindow ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleContext( VCLXCheckBox* _pXWindow ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleContext( VCLXRadioButton* _pXWindow ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleContext( VCLXListBox* _pXWindow ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleContext( VCLXFixedText* _pXWindow ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleContext( VCLXFixedHyperlink* _pXWindow ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleContext( VCLXScrollBar* _pXWindow ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleContext( VCLXEdit* _pXWindow ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleContext( VCLXComboBox* _pXWindow ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleContext( VCLXToolBox* _pXWindow ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleContext( VCLXWindow* _pXWindow ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - createAccessible( Menu* _pMenu, sal_Bool _bIsMenuBar ); - - // ::svt::IAccessibleFactory - virtual IAccessibleTabListBox* - createAccessibleTabListBox( - const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent, - SvHeaderTabListBox& rBox - ) const; - - virtual IAccessibleBrowseBox* - createAccessibleBrowseBox( - const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent, - IAccessibleTableProvider& _rBrowseBox - ) const; - - virtual IAccessibleTableControl* - createAccessibleTableControl( - const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent, - IAccessibleTable& _rTable - ) const; - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - createAccessibleIconChoiceCtrl( - SvtIconChoiceCtrl& _rIconCtrl, - const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent - ) const; - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - createAccessibleTabBar( - TabBar& _rTabBar - ) const; - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleTextWindowContext( - VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView, bool bCompoundControlChild - ) const; - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - createAccessibleTreeListBox( - SvTreeListBox& _rListBox, - const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _xParent - ) const; - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - createAccessibleBrowseBoxHeaderBar( - const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent, - IAccessibleTableProvider& _rOwningTable, - AccessibleBrowseBoxObjType _eObjType - ) const; - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - createAccessibleBrowseBoxTableCell( - const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent, - IAccessibleTableProvider& _rBrowseBox, - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow, - sal_Int32 _nRowId, - sal_uInt16 _nColId, - sal_Int32 _nOffset - ) const; - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - createAccessibleBrowseBoxHeaderCell( - sal_Int32 _nColumnRowId, - const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxParent, - IAccessibleTableProvider& _rBrowseBox, - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow, - AccessibleBrowseBoxObjType _eObjType - ) const; - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - createAccessibleCheckBoxCell( - const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent, - IAccessibleTableProvider& _rBrowseBox, - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow, - sal_Int32 _nRowPos, - sal_uInt16 _nColPos, - const TriState& _eState, - sal_Bool _bEnabled, - sal_Bool _bIsTriState - ) const; - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - createEditBrowseBoxTableCellAccess( - const ::com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible >& _rxParent, - const ::com::sun::star::uno::Reference< com::sun::star::accessibility::XAccessible >& _rxControlAccessible, - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _rxFocusWindow, - IAccessibleTableProvider& _rBrowseBox, - sal_Int32 _nRowPos, - sal_uInt16 _nColPos - ) const; - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleToolPanelDeck( - const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent, - ::svt::ToolPanelDeck& i_rPanelDeck - ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > - createAccessibleToolPanelTabBar( - const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent, - ::svt::IToolPanelDeck& i_rPanelDeck, - ::svt::PanelTabBar& i_rTabBar - ); - - protected: - virtual ~AccessibleFactory(); - }; - - - //-------------------------------------------------------------------- - AccessibleFactory::AccessibleFactory() - :m_refCount( 0 ) - { - } - - //-------------------------------------------------------------------- - AccessibleFactory::~AccessibleFactory() - { - } - - //-------------------------------------------------------------------- - oslInterlockedCount SAL_CALL AccessibleFactory::acquire() - { - return osl_incrementInterlockedCount( &m_refCount ); - } - - //-------------------------------------------------------------------- - oslInterlockedCount SAL_CALL AccessibleFactory::release() - { - if ( 0 == osl_decrementInterlockedCount( &m_refCount ) ) - { - delete this; - return 0; - } - return m_refCount; - } - - //-------------------------------------------------------------------- - Reference< XAccessible > AccessibleFactory::createAccessible( Menu* _pMenu, sal_Bool _bIsMenuBar ) - { - OAccessibleMenuBaseComponent* pAccessible; - if ( _bIsMenuBar ) - pAccessible = new VCLXAccessibleMenuBar( _pMenu ); - else - pAccessible = new VCLXAccessiblePopupMenu( _pMenu ); - pAccessible->SetStates(); - return pAccessible; - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXButton* _pXWindow ) - { - return new VCLXAccessibleButton( _pXWindow ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXCheckBox* _pXWindow ) - { - return new VCLXAccessibleCheckBox( _pXWindow ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXRadioButton* _pXWindow ) - { - return new VCLXAccessibleRadioButton( _pXWindow ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXListBox* _pXWindow ) - { - sal_Bool bIsDropDownBox = sal_False; - ListBox* pBox = static_cast< ListBox* >( _pXWindow->GetWindow() ); - if ( pBox ) - bIsDropDownBox = ( ( pBox->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN ); - - if ( bIsDropDownBox ) - return new VCLXAccessibleDropDownListBox( _pXWindow ); - else - return new VCLXAccessibleListBox( _pXWindow ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXFixedText* _pXWindow ) - { - return new VCLXAccessibleFixedText( _pXWindow ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXFixedHyperlink* _pXWindow ) - { - return new VCLXAccessibleFixedHyperlink( _pXWindow ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXScrollBar* _pXWindow ) - { - return new VCLXAccessibleScrollBar( _pXWindow ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXEdit* _pXWindow ) - { - return new VCLXAccessibleEdit( _pXWindow ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXComboBox* _pXWindow ) - { - sal_Bool bIsDropDownBox = sal_False; - ComboBox* pBox = static_cast< ComboBox* >( _pXWindow->GetWindow() ); - if ( pBox ) - bIsDropDownBox = ( ( pBox->GetStyle() & WB_DROPDOWN ) == WB_DROPDOWN ); - - if ( bIsDropDownBox ) - return new VCLXAccessibleDropDownComboBox( _pXWindow ); - else - return new VCLXAccessibleComboBox( _pXWindow ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXWindow* _pXWindow ) - { - Reference< XAccessibleContext > xContext; - - Window* pWindow = _pXWindow->GetWindow(); - if ( pWindow ) - { - WindowType nType = pWindow->GetType(); - - if ( nType == WINDOW_MENUBARWINDOW || pWindow->IsMenuFloatingWindow() || pWindow->IsToolbarFloatingWindow() ) - { - Reference< XAccessible > xAcc( pWindow->GetAccessible() ); - if ( xAcc.is() ) - { - Reference< XAccessibleContext > xCont( xAcc->getAccessibleContext() ); - if ( pWindow->GetType() == WINDOW_MENUBARWINDOW || - ( xCont.is() && xCont->getAccessibleRole() == AccessibleRole::POPUP_MENU ) ) - { - xContext = xCont; - } - } - } - else if ( nType == WINDOW_STATUSBAR ) - { - xContext = (XAccessibleContext*) new VCLXAccessibleStatusBar( _pXWindow ); - } - else if ( nType == WINDOW_TABCONTROL ) - { - xContext = (XAccessibleContext*) new VCLXAccessibleTabControl( _pXWindow ); - } - else if ( nType == WINDOW_TABPAGE && pWindow->GetAccessibleParentWindow() && pWindow->GetAccessibleParentWindow()->GetType() == WINDOW_TABCONTROL ) - { - xContext = new VCLXAccessibleTabPageWindow( _pXWindow ); - } - else if ( nType == WINDOW_FLOATINGWINDOW ) - { - xContext = new FloatingWindowAccessible( _pXWindow ); - } - else if ( nType == WINDOW_BORDERWINDOW && hasFloatingChild( pWindow ) ) - { - PopupMenuFloatingWindow* pChild = dynamic_cast<PopupMenuFloatingWindow*>( - pWindow->GetAccessibleChildWindow(0)); - if ( pChild && pChild->IsPopupMenu() ) - { - // Get the accessible context from the child window. - Reference<XAccessible> xAccessible = pChild->CreateAccessible(); - if (xAccessible.is()) - xContext = xAccessible->getAccessibleContext(); - } - else - xContext = new FloatingWindowAccessible( _pXWindow ); - } - else if ( ( nType == WINDOW_HELPTEXTWINDOW ) || ( nType == WINDOW_FIXEDLINE ) ) - { - xContext = (accessibility::XAccessibleContext*) new VCLXAccessibleFixedText( _pXWindow ); - } - else - { - xContext = (accessibility::XAccessibleContext*) new VCLXAccessibleComponent( _pXWindow ); - } - } - - return xContext; - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLXToolBox* _pXWindow ) - { - return new VCLXAccessibleToolBox( _pXWindow ); - } - - //-------------------------------------------------------------------- - IAccessibleTabListBox* AccessibleFactory::createAccessibleTabListBox( - const Reference< XAccessible >& rxParent, SvHeaderTabListBox& rBox ) const - { - return new AccessibleTabListBox( rxParent, rBox ); - } - - //-------------------------------------------------------------------- - IAccessibleBrowseBox* AccessibleFactory::createAccessibleBrowseBox( - const Reference< XAccessible >& _rxParent, IAccessibleTableProvider& _rBrowseBox ) const - { - return new AccessibleBrowseBoxAccess( _rxParent, _rBrowseBox ); - } - - //-------------------------------------------------------------------- - IAccessibleTableControl* AccessibleFactory::createAccessibleTableControl( - const Reference< XAccessible >& _rxParent, IAccessibleTable& _rTable ) const - { - return new AccessibleGridControlAccess( _rxParent, _rTable ); - } - - //-------------------------------------------------------------------- - Reference< XAccessible > AccessibleFactory::createAccessibleIconChoiceCtrl( - SvtIconChoiceCtrl& _rIconCtrl, const Reference< XAccessible >& _xParent ) const - { - return new AccessibleIconChoiceCtrl( _rIconCtrl, _xParent ); - } - - //-------------------------------------------------------------------- - Reference< XAccessible > AccessibleFactory::createAccessibleTabBar( TabBar& _rTabBar ) const - { - return new AccessibleTabBar( &_rTabBar ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleTextWindowContext( - VCLXWindow* pVclXWindow, TextEngine& rEngine, TextView& rView, bool bCompoundControlChild ) const - { - return new Document( pVclXWindow, rEngine, rView, bCompoundControlChild ); - } - - //-------------------------------------------------------------------- - Reference< XAccessible > AccessibleFactory::createAccessibleTreeListBox( - SvTreeListBox& _rListBox, const Reference< XAccessible >& _xParent ) const - { - return new AccessibleListBox( _rListBox, _xParent ); - } - - //-------------------------------------------------------------------- - Reference< XAccessible > AccessibleFactory::createAccessibleBrowseBoxHeaderBar( - const Reference< XAccessible >& rxParent, IAccessibleTableProvider& _rOwningTable, - AccessibleBrowseBoxObjType _eObjType ) const - { - return new AccessibleBrowseBoxHeaderBar( rxParent, _rOwningTable, _eObjType ); - } - - //-------------------------------------------------------------------- - Reference< XAccessible > AccessibleFactory::createAccessibleBrowseBoxTableCell( - const Reference< XAccessible >& _rxParent, IAccessibleTableProvider& _rBrowseBox, - const Reference< XWindow >& _xFocusWindow, sal_Int32 _nRowId, sal_uInt16 _nColId, sal_Int32 _nOffset ) const - { - return new AccessibleBrowseBoxTableCell( _rxParent, _rBrowseBox, _xFocusWindow, - _nRowId, _nColId, _nOffset ); - } - - //-------------------------------------------------------------------- - Reference< XAccessible > AccessibleFactory::createAccessibleBrowseBoxHeaderCell( - sal_Int32 _nColumnRowId, const Reference< XAccessible >& rxParent, IAccessibleTableProvider& _rBrowseBox, - const Reference< XWindow >& _xFocusWindow, AccessibleBrowseBoxObjType _eObjType ) const - { - return new AccessibleBrowseBoxHeaderCell( _nColumnRowId, rxParent, _rBrowseBox, - _xFocusWindow, _eObjType ); - } - - //-------------------------------------------------------------------- - Reference< XAccessible > AccessibleFactory::createAccessibleCheckBoxCell( - const Reference< XAccessible >& _rxParent, IAccessibleTableProvider& _rBrowseBox, - const Reference< XWindow >& _xFocusWindow, sal_Int32 _nRowPos, sal_uInt16 _nColPos, - const TriState& _eState, sal_Bool _bEnabled, sal_Bool _bIsTriState ) const - { - return new AccessibleCheckBoxCell( _rxParent, _rBrowseBox, _xFocusWindow, - _nRowPos, _nColPos, _eState, _bEnabled, _bIsTriState ); - } - - //-------------------------------------------------------------------- - Reference< XAccessible > AccessibleFactory::createEditBrowseBoxTableCellAccess( - const Reference< XAccessible >& _rxParent, const Reference< XAccessible >& _rxControlAccessible, - const Reference< XWindow >& _rxFocusWindow, IAccessibleTableProvider& _rBrowseBox, - sal_Int32 _nRowPos, sal_uInt16 _nColPos ) const - { - return new EditBrowseBoxTableCellAccess( _rxParent, _rxControlAccessible, - _rxFocusWindow, _rBrowseBox, _nRowPos, _nColPos ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleToolPanelDeck( - const Reference< XAccessible >& i_rAccessibleParent, ::svt::ToolPanelDeck& i_rPanelDeck ) - { - return new AccessibleToolPanelDeck( i_rAccessibleParent, i_rPanelDeck ); - } - - //-------------------------------------------------------------------- - Reference< XAccessibleContext > AccessibleFactory::createAccessibleToolPanelTabBar( - const Reference< XAccessible >& i_rAccessibleParent, ::svt::IToolPanelDeck& i_rPanelDeck, ::svt::PanelTabBar& i_rTabBar ) - { - return new AccessibleToolPanelTabBar( i_rAccessibleParent, i_rPanelDeck, i_rTabBar ); - } - -//........................................................................ -} // namespace accessibility -//........................................................................ - -//======================================================================== -extern "C" void* SAL_CALL getStandardAccessibleFactory() -{ - ::toolkit::IAccessibleFactory* pFactory = new ::accessibility::AccessibleFactory; - pFactory->acquire(); - return pFactory; -} - -extern "C" void* SAL_CALL getSvtAccessibilityComponentFactory() -{ - ::svt::IAccessibleFactory* pFactory = new ::accessibility::AccessibleFactory; - pFactory->acquire(); - return pFactory; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/source/helper/accessiblestrings.src b/accessibility/source/helper/accessiblestrings.src deleted file mode 100644 index 34f3b381b..000000000 --- a/accessibility/source/helper/accessiblestrings.src +++ /dev/null @@ -1,76 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef ACCESSIBILITY_HELPER_ACCESSIBLESTRINGS_HRC_ -#include <accessibility/helper/accessiblestrings.hrc> -#endif - - -String RID_STR_ACC_ACTION_CLICK -{ - Text = "click"; -}; - -String RID_STR_ACC_ACTION_TOGGLEPOPUP -{ - Text = "togglePopup"; -}; - -String RID_STR_ACC_ACTION_SELECT -{ - Text = "select"; -}; - -String RID_STR_ACC_ACTION_INCLINE -{ - Text = "incrementLine"; -}; - -String RID_STR_ACC_ACTION_DECLINE -{ - Text = "decrementLine"; -}; - -String RID_STR_ACC_ACTION_INCBLOCK -{ - Text = "incrementBlock"; -}; - -String RID_STR_ACC_ACTION_DECBLOCK -{ - Text = "decrementBlock"; -}; - -String RID_STR_ACC_NAME_BROWSEBUTTON -{ - Text [ en-US ] = "Browse"; -}; - -String RID_STR_ACC_DESC_PANELDECL_TABBAR -{ - Text [ en-US ] = "Panel Deck Tab Bar"; -}; diff --git a/accessibility/source/helper/accresmgr.cxx b/accessibility/source/helper/accresmgr.cxx deleted file mode 100644 index f81231156..000000000 --- a/accessibility/source/helper/accresmgr.cxx +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_accessibility.hxx" -#include <accessibility/helper/accresmgr.hxx> - -#include <tools/simplerm.hxx> -#include <vcl/svapp.hxx> - - -// ----------------------------------------------------------------------------- -// TkResMgr -// ----------------------------------------------------------------------------- - -SimpleResMgr* TkResMgr::m_pImpl = NULL; - -// ----------------------------------------------------------------------------- - -TkResMgr::EnsureDelete::~EnsureDelete() -{ - delete TkResMgr::m_pImpl; -} - -// ----------------------------------------------------------------------------- - -void TkResMgr::ensureImplExists() -{ - if (m_pImpl) - return; - - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); - - m_pImpl = SimpleResMgr::Create("acc", aLocale ); - - if (m_pImpl) - { - // now that we have a impl class, make sure it's deleted on unloading the library - static TkResMgr::EnsureDelete s_aDeleteTheImplClass; - } -} - -// ----------------------------------------------------------------------------- - -::rtl::OUString TkResMgr::loadString( sal_uInt16 nResId ) -{ - ::rtl::OUString sReturn; - - ensureImplExists(); - if ( m_pImpl ) - sReturn = m_pImpl->ReadString( nResId ); - - return sReturn; -} - -// ----------------------------------------------------------------------------- - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx deleted file mode 100644 index ec800b73e..000000000 --- a/accessibility/source/helper/characterattributeshelper.cxx +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_accessibility.hxx" -#include <accessibility/helper/characterattributeshelper.hxx> - -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; - - -CharacterAttributesHelper::CharacterAttributesHelper( const Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor ) -{ - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharBackColor" )), makeAny( (sal_Int32) nBackColor ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" )), makeAny( (sal_Int32) nColor ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharFontCharSet" )), makeAny( (sal_Int16) rFont.GetCharSet() ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharFontFamily" )), makeAny( (sal_Int16) rFont.GetFamily() ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharFontName" )), makeAny( (::rtl::OUString) rFont.GetName() ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharFontPitch" )), makeAny( (sal_Int16) rFont.GetPitch() ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharFontStyleName" )), makeAny( (::rtl::OUString) rFont.GetStyleName() ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharHeight" )), makeAny( (sal_Int16) rFont.GetSize().Height() ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharScaleWidth" )), makeAny( (sal_Int16) rFont.GetSize().Width() ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharStrikeout" )), makeAny( (sal_Int16) rFont.GetStrikeout() ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharUnderline" )), makeAny( (sal_Int16) rFont.GetUnderline() ) ) ); - m_aAttributeMap.insert( AttributeMap::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharWeight" )), makeAny( (float) rFont.GetWeight() ) ) ); -} - - -CharacterAttributesHelper::~CharacterAttributesHelper() -{ - m_aAttributeMap.clear(); -} - - -Sequence< PropertyValue > CharacterAttributesHelper::GetCharacterAttributes() -{ - Sequence< PropertyValue > aValues( m_aAttributeMap.size() ); - PropertyValue* pValues = aValues.getArray(); - - for ( AttributeMap::iterator aIt = m_aAttributeMap.begin(); aIt != m_aAttributeMap.end(); ++aIt, ++pValues ) - { - pValues->Name = aIt->first; - pValues->Handle = (sal_Int32) -1; - pValues->Value = aIt->second; - pValues->State = PropertyState_DIRECT_VALUE; - } - - return aValues; -} - - -Sequence< PropertyValue > CharacterAttributesHelper::GetCharacterAttributes( const Sequence< ::rtl::OUString >& aRequestedAttributes ) -{ - Sequence< PropertyValue > aValues; - sal_Int32 nLength = aRequestedAttributes.getLength(); - - if ( nLength != 0 ) - { - const ::rtl::OUString* pNames = aRequestedAttributes.getConstArray(); - AttributeMap aAttributeMap; - - for ( sal_Int32 i = 0; i < nLength; ++i ) - { - AttributeMap::iterator aFound = m_aAttributeMap.find( pNames[i] ); - if ( aFound != m_aAttributeMap.end() ) - aAttributeMap.insert( *aFound ); - } - - aValues.realloc( aAttributeMap.size() ); - PropertyValue* pValues = aValues.getArray(); - - for ( AttributeMap::iterator aIt = aAttributeMap.begin(); aIt != aAttributeMap.end(); ++aIt, ++pValues ) - { - pValues->Name = aIt->first; - pValues->Handle = (sal_Int32) -1; - pValues->Value = aIt->second; - pValues->State = PropertyState_DIRECT_VALUE; - } - } - else - { - aValues = GetCharacterAttributes(); - } - - return aValues; -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/source/helper/makefile.mk b/accessibility/source/helper/makefile.mk deleted file mode 100644 index 72284e38f..000000000 --- a/accessibility/source/helper/makefile.mk +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=accessibility -TARGET=helper - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/acc_factory.obj \ - $(SLO)$/accresmgr.obj \ - $(SLO)$/characterattributeshelper.obj \ - -SRS1NAME=$(TARGET) -SRC1FILES=\ - accessiblestrings.src - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - |