diff options
author | Thomas Benisch <tbe@openoffice.org> | 2002-07-10 17:28:17 +0000 |
---|---|---|
committer | Thomas Benisch <tbe@openoffice.org> | 2002-07-10 17:28:17 +0000 |
commit | 1bd8d476ff8cdd84ee2a69ae34a164ef85012d1f (patch) | |
tree | cf248e9198757b99390b7a5b8e07c730f45bbdc1 /toolkit/source/helper | |
parent | 1138ad310905fdcd1eb1998c9f4153c33f3ccef5 (diff) |
#100605# accessibility implementation for menues which conforms to Java Swing
Diffstat (limited to 'toolkit/source/helper')
-rw-r--r-- | toolkit/source/helper/unowrapper.cxx | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index 2004d336f7da..39a25faf9202 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unowrapper.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: tbe $ $Date: 2002-07-03 12:47:21 $ + * last change: $Author: tbe $ $Date: 2002-07-10 18:28:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,11 +76,19 @@ #include <toolkit/awt/vclxtopwindow.hxx> #include <toolkit/awt/vclxgraphics.hxx> -// TODO: #include <toolkit/awt/vclxaccessiblemenu.hxx> -//#include <toolkit/awt/vclxaccessiblecomponent.hxx> +#ifndef _TOOLKIT_AWT_VCLXACCESSIBLEMENUBAR_HXX_ +#include <toolkit/awt/vclxaccessiblemenubar.hxx> +#endif +#ifndef _TOOLKIT_AWT_VCLXACCESSIBLEPOPUPMENU_HXX_ +#include <toolkit/awt/vclxaccessiblepopupmenu.hxx> +#endif #include <vcl/svapp.hxx> +#ifndef _SV_MENU_HXX +#include <vcl/menu.hxx> +#endif + #include <tools/debug.hxx> ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > CreateXWindow( Window* pWindow ) @@ -376,7 +384,19 @@ void UnoWrapper::WindowDestroyed( Window* pWindow ) ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > UnoWrapper::CreateAccessible( Menu* pMenu, sal_Bool bIsMenuBar ) { - // TODO + ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > xAcc; + + DBG_ASSERT( pMenu, "UnoWrapper::CreateAccessible: no menu!" ); + if ( pMenu ) + { + OAccessibleMenuBaseComponent* pComp; + if ( bIsMenuBar ) + pComp = new VCLXAccessibleMenuBar( pMenu ); + else + pComp = new VCLXAccessiblePopupMenu( pMenu ); + pComp->SetStates(); + xAcc = pComp; + } - return ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible >(); + return xAcc; } |