summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toolkit/source/awt/vclxwindow.cxx43
1 files changed, 28 insertions, 15 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 21c2d9d58e86..da33c2aad370 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: vclxwindow.cxx,v $
*
- * $Revision: 1.35 $
+ * $Revision: 1.36 $
*
- * last change: $Author: hr $ $Date: 2003-03-27 17:03:10 $
+ * last change: $Author: vg $ $Date: 2003-04-11 17:06:48 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -81,6 +81,9 @@
#ifndef _COM_SUN_STAR_AWT_STYLE_HPP_
#include <com/sun/star/awt/Style.hpp>
#endif
+#ifndef _DRAFTS_COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
+#include <drafts/com/sun/star/accessibility/AccessibleRole.hpp>
+#endif
#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
#include <toolkit/awt/vclxwindow.hxx>
@@ -540,23 +543,33 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
Window* pWindow = GetWindow();
if ( pWindow )
{
- switch ( pWindow->GetType() )
+ WindowType nType = pWindow->GetType();
+
+ if ( nType == WINDOW_MENUBARWINDOW || pWindow->IsMenuFloatingWindow() )
{
- case WINDOW_STATUSBAR:
- {
- xContext = (::drafts::com::sun::star::accessibility::XAccessibleContext*) new VCLXAccessibleStatusBar( this );
- }
- break;
- case WINDOW_TABCONTROL:
- {
- xContext = (::drafts::com::sun::star::accessibility::XAccessibleContext*) new VCLXAccessibleTabControl( this );
- }
- break;
- default:
+ ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessible > xAcc( pWindow->GetAccessible() );
+ if ( xAcc.is() )
{
- xContext = (::drafts::com::sun::star::accessibility::XAccessibleContext*) new VCLXAccessibleComponent( this );
+ ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleContext > xCont( xAcc->getAccessibleContext() );
+ if ( pWindow->GetType() == WINDOW_MENUBARWINDOW
+ || ( xCont.is() && xCont->getAccessibleRole() == ::drafts::com::sun::star::accessibility::AccessibleRole::POPUPMENU ) )
+ {
+ xContext = xCont;
+ }
}
}
+ else if ( nType == WINDOW_STATUSBAR )
+ {
+ xContext = (::drafts::com::sun::star::accessibility::XAccessibleContext*) new VCLXAccessibleStatusBar( this );
+ }
+ else if ( nType == WINDOW_TABCONTROL )
+ {
+ xContext = (::drafts::com::sun::star::accessibility::XAccessibleContext*) new VCLXAccessibleTabControl( this );
+ }
+ else
+ {
+ xContext = (::drafts::com::sun::star::accessibility::XAccessibleContext*) new VCLXAccessibleComponent( this );
+ }
}
return xContext;