diff options
author | Thomas Benisch <tbe@openoffice.org> | 2002-11-28 12:24:50 +0000 |
---|---|---|
committer | Thomas Benisch <tbe@openoffice.org> | 2002-11-28 12:24:50 +0000 |
commit | 2ebdbac506aec3467a1e673ad41694485ef5ae99 (patch) | |
tree | b9c6decc6bdab0bd12d3f927b40c3a09b2415d07 /toolkit/source | |
parent | 988426825e35f43a83f2b56a6e89e9c83a56277f (diff) |
#105369# Accessibility: content of spinboxes is not read
Diffstat (limited to 'toolkit/source')
-rw-r--r-- | toolkit/source/awt/makefile.mk | 5 | ||||
-rw-r--r-- | toolkit/source/awt/vclxaccessiblecomponent.cxx | 30 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 12 |
3 files changed, 24 insertions, 23 deletions
diff --git a/toolkit/source/awt/makefile.mk b/toolkit/source/awt/makefile.mk index 38899c872516..00f31e358f93 100644 --- a/toolkit/source/awt/makefile.mk +++ b/toolkit/source/awt/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.20 $ +# $Revision: 1.21 $ # -# last change: $Author: tbe $ $Date: 2002-11-12 17:53:03 $ +# last change: $Author: tbe $ $Date: 2002-11-28 13:24:50 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -99,7 +99,6 @@ SLOFILES= \ $(SLO)$/vclxaccessiblepopupmenu.obj \ $(SLO)$/vclxaccessibleradiobutton.obj \ $(SLO)$/vclxaccessiblescrollbar.obj \ - $(SLO)$/vclxaccessiblespinfield.obj \ $(SLO)$/vclxaccessibletabcontrol.obj \ $(SLO)$/vclxaccessibletabpage.obj \ $(SLO)$/vclxaccessibletextcomponent.obj \ diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index d4a808ea373d..deee1d05933f 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -2,9 +2,9 @@ * * $RCSfile: vclxaccessiblecomponent.cxx,v $ * - * $Revision: 1.38 $ + * $Revision: 1.39 $ * - * last change: $Author: tbe $ $Date: 2002-11-22 14:03:05 $ + * last change: $Author: tbe $ $Date: 2002-11-28 13:24:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -374,20 +374,28 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind case VCLEVENT_WINDOW_GETFOCUS: case VCLEVENT_CONTROL_GETFOCUS: { - // if multiple listeners were registered it is possible that the - // focus was changed during event processing (eg SfxTopWindow ) - if( pWindow->HasFocus() ) + if( (pWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VCLEVENT_CONTROL_GETFOCUS) || + (!pWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VCLEVENT_WINDOW_GETFOCUS) ) { - aNewValue <<= accessibility::AccessibleStateType::FOCUSED; - NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); + // if multiple listeners were registered it is possible that the + // focus was changed during event processing (eg SfxTopWindow ) + if( pWindow->HasChildPathFocus() ) + { + aNewValue <<= accessibility::AccessibleStateType::FOCUSED; + NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); + } } } break; case VCLEVENT_WINDOW_LOSEFOCUS: case VCLEVENT_CONTROL_LOSEFOCUS: { - aOldValue <<= accessibility::AccessibleStateType::FOCUSED; - NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); + if( (pWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VCLEVENT_CONTROL_LOSEFOCUS) || + (!pWindow->IsCompoundControl() && rVclWindowEvent.GetId() == VCLEVENT_WINDOW_LOSEFOCUS) ) + { + aOldValue <<= accessibility::AccessibleStateType::FOCUSED; + NotifyAccessibleEvent( accessibility::AccessibleEventId::ACCESSIBLE_STATE_EVENT, aOldValue, aNewValue ); + } } break; case VCLEVENT_WINDOW_FRAMETITLECHANGED: @@ -490,7 +498,9 @@ void VCLXAccessibleComponent::FillAccessibleStateSet( utl::AccessibleStateSetHel if ( pWindow->HasChildPathFocus() ) rStateSet.AddState( accessibility::AccessibleStateType::ACTIVE ); - if ( pWindow->HasFocus() ) + Window* pChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); + if ( ( !pWindow->IsCompoundControl() && pWindow->HasFocus() ) || + ( pWindow->IsCompoundControl() && pChild && pChild->HasFocus() ) ) rStateSet.AddState( accessibility::AccessibleStateType::FOCUSED ); if ( pWindow->IsWait() ) diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index a1b8070b1ab1..2c9049f0d0cb 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -2,9 +2,9 @@ * * $RCSfile: vclxwindows.cxx,v $ * - * $Revision: 1.38 $ + * $Revision: 1.39 $ * - * last change: $Author: tbe $ $Date: 2002-11-18 14:41:25 $ + * last change: $Author: tbe $ $Date: 2002-11-28 13:24:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,9 +95,6 @@ #ifndef _TOOLKIT_AWT_VCLXACCESSIBLESCROLLBAR_HXX_ #include <toolkit/awt/vclxaccessiblescrollbar.hxx> #endif -#ifndef _TOOLKIT_AWT_VCLXACCESSIBLESPINFIELD_HXX_ -#include <toolkit/awt/vclxaccessiblespinfield.hxx> -#endif #ifndef _TOOLKIT_AWT_VCLXACCESSIBLETEXTCOMPONENT_HXX_ #include <toolkit/awt/vclxaccessibletextcomponent.hxx> #endif @@ -1065,11 +1062,6 @@ IMPL_XTYPEPROVIDER_START( VCLXSpinField ) VCLXEdit::getTypes() IMPL_XTYPEPROVIDER_END -::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleContext > VCLXSpinField::CreateAccessibleContext() -{ - return (::drafts::com::sun::star::accessibility::XAccessibleContext*) new VCLXAccessibleSpinField( this ); -} - void VCLXSpinField::addSpinListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XSpinListener > & l ) throw(::com::sun::star::uno::RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); |