diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-01 17:50:14 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-04-01 17:50:14 +0200 |
commit | 93c3ff235afc52b048f808dede4f7c8c07f57252 (patch) | |
tree | a13a1deacaab2a3b8710d48bfec5e730254b1c6e /accessibility/source/helper | |
parent | cdad00eca4f1e760c26348db521130c25e89f45b (diff) |
slidecopy: initial version of the A11Y API for the tool panel deck's tab layouter.
Effectively, the implementation showed that the current appraoch of the Deck having n+1 children
(n panel selector items, plus one active panel) doesn't work. So, a next step will be a re-factoring
so that the PanelDeck has 1+x children, where x children are provided by the layouter.
Diffstat (limited to 'accessibility/source/helper')
-rwxr-xr-x | accessibility/source/helper/acc_factory.cxx | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx index a0b09af9891d..69b0d7ec0954 100755 --- a/accessibility/source/helper/acc_factory.cxx +++ b/accessibility/source/helper/acc_factory.cxx @@ -65,13 +65,15 @@ #include <accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx> #include <accessibility/extended/accessibleeditbrowseboxcell.hxx> #include <accessibility/extended/AccessibleToolPanelDeck.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 <vcl/popupmenuwindow.hxx> +#include <cppuhelper/implbase1.hxx> -#include <floatingwindowaccessible.hxx> +#include "floatingwindowaccessible.hxx" //........................................................................ namespace accessibility @@ -95,6 +97,28 @@ inline bool hasFloatingChild(Window *pWindow) using namespace ::svt::table; //================================================================ + //= AccessibleWrapper + //================================================================ + typedef ::cppu::WeakImplHelper1< XAccessible > AccessibleWrapper_Base; + class AccessibleWrapper : public AccessibleWrapper_Base + { + public: + AccessibleWrapper( const Reference< XAccessibleContext >& i_rContext ) + :m_xContext( i_rContext ) + { + } + + // XAccessible + virtual Reference< XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (RuntimeException) + { + return m_xContext; + } + + private: + const Reference< XAccessibleContext > m_xContext; + }; + + //================================================================ //= IAccessibleFactory //================================================================ class AccessibleFactory :public ::toolkit::IAccessibleFactory @@ -233,7 +257,7 @@ inline bool hasFloatingChild(Window *pWindow) virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > createAccessibleToolPanelDeckTabBarItem( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rAccessibleParent, - ::svt::IToolPanelDeck& i_rPanelDeck, + const ::rtl::Reference< ::svt::TabDeckLayouter >& i_pLayouter, const size_t i_nItemPos ); @@ -527,10 +551,13 @@ inline bool hasFloatingChild(Window *pWindow) //-------------------------------------------------------------------- Reference< XAccessible > AccessibleFactory::createAccessibleToolPanelDeckTabBarItem( - const Reference< XAccessible >& /*i_rAccessibleParent*/, ::svt::IToolPanelDeck& /*i_rPanelDeck*/, const size_t /*i_nItemPos*/ ) + const Reference< XAccessible >& i_rAccessibleParent, const ::rtl::Reference< ::svt::TabDeckLayouter >& i_pLayouter, const size_t i_nItemPos ) { - // TODO - return NULL; + ::rtl::Reference< AccessibleToolPanelDeckTabBarItem > pItemContext( new AccessibleToolPanelDeckTabBarItem( + i_rAccessibleParent, i_pLayouter, i_nItemPos ) ); + Reference< XAccessible > xItemAccessible( new AccessibleWrapper( pItemContext.get() ) ); + pItemContext->lateInit( xItemAccessible ); + return xItemAccessible; } //........................................................................ |