diff options
author | Christian Lippka <christian.lippka@sun.com> | 2010-04-27 13:30:46 +0200 |
---|---|---|
committer | Christian Lippka <christian.lippka@sun.com> | 2010-04-27 13:30:46 +0200 |
commit | f2e6942b7e9ed57aa78d62f500d580624e5c532b (patch) | |
tree | 792ae0b40955e2e34d75912f78520c0c44330c37 /accessibility | |
parent | cf514ff2ecfc067baaec443df7124a046b9f5769 (diff) |
#i107213# notify a11y api if a toolbar popup window is opened
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx | 1 | ||||
-rw-r--r-- | accessibility/source/standard/vclxaccessibletoolbox.cxx | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx index 7612a19d5..a2ea9bca8 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx @@ -57,6 +57,7 @@ private: void UpdateAllItems_Impl(); void UpdateItemName_Impl( sal_Int32 _nPos ); void UpdateItemEnabled_Impl( sal_Int32 _nPos ); + void UpdateCustomPopupItemp_Impl( Window* pWindow, bool bOpen ); void HandleSubToolBarEvent( const VclWindowEvent& rVclWindowEvent, bool _bShow ); void ReleaseSubToolBox( ToolBox* _pSubToolBox ); diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index e0ae1a0ca..781c559ba 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -441,6 +441,27 @@ void VCLXAccessibleToolBox::UpdateAllItems_Impl() } } } + +// ----------------------------------------------------------------------------- + +void VCLXAccessibleToolBox::UpdateCustomPopupItemp_Impl( Window* pWindow, bool bOpen ) +{ + if( pWindow ) + { + Reference< XAccessible > xChild( pWindow->GetAccessible() ); + if( xChild.is() ) + { + Any aOld, aNew; + if( bOpen ) + aNew <<= xChild; + else + aOld <<= xChild; + + NotifyAccessibleEvent( AccessibleEventId::CHILD, aOld, aNew ); + } + } +} + // ----------------------------------------------------------------------------- void VCLXAccessibleToolBox::UpdateItemName_Impl( sal_Int32 _nPos ) { @@ -582,6 +603,13 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow break; } + case VCLEVENT_DROPDOWN_OPEN: + case VCLEVENT_DROPDOWN_CLOSE: + { + UpdateCustomPopupItemp_Impl( static_cast< Window* >( rVclWindowEvent.GetData() ), rVclWindowEvent.GetId() == VCLEVENT_DROPDOWN_OPEN ); + break; + } + case VCLEVENT_OBJECT_DYING : { // if this toolbox is a subtoolbox, we have to relese it from its parent |