diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-07-22 06:36:32 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-07-22 06:36:32 +0000 |
commit | b1d05c6094f650c448c7f05c39b1f011d1333653 (patch) | |
tree | 6e0af737b3ccebd2baf65d9d8c800a92c9141c19 /accessibility | |
parent | 55e77895f08ee654a9071a83f753677571d62ba5 (diff) |
INTEGRATION: CWS pba11y01 (1.4.14); FILE MERGED
2008/07/10 11:38:00 pb 1.4.14.1: fix: #ii85877# ToolBox::RemoveItem() needs more update
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/source/standard/vclxaccessibletoolbox.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index ef68bbcb80d2..0abe20e81e50 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: vclxaccessibletoolbox.cxx,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -361,6 +361,12 @@ void VCLXAccessibleToolBox::implReleaseToolboxItem( ToolBoxItemsMap::iterator& _ // ----------------------------------------------------------------------------- void VCLXAccessibleToolBox::UpdateItem_Impl( sal_Int32 _nPos, sal_Bool _bItemAdded ) { + if ( _nPos < sal_Int32( m_aAccessibleChildren.size() ) ) + { + UpdateAllItems_Impl(); + return; + } + ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() ); if ( pToolBox ) { @@ -542,15 +548,17 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow break; case VCLEVENT_TOOLBOX_ITEMADDED : - case VCLEVENT_TOOLBOX_ITEMREMOVED : - UpdateItem_Impl( (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData(), VCLEVENT_TOOLBOX_ITEMADDED == rVclWindowEvent.GetId() ); +// UpdateItem_Impl( (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData(), VCLEVENT_TOOLBOX_ITEMADDED == rVclWindowEvent.GetId() ); + UpdateItem_Impl( (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData(), sal_True ); break; + case VCLEVENT_TOOLBOX_ITEMREMOVED : case VCLEVENT_TOOLBOX_ALLITEMSCHANGED : { UpdateAllItems_Impl(); break; } + case VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED: { sal_Int32 nPos = (sal_Int32)(sal_IntPtr)rVclWindowEvent.GetData(); @@ -698,13 +706,13 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() ); if ( pToolBox ) { - USHORT nHighlightItemId = pToolBox->GetHighlightItemId(); Reference< XAccessible > xChild; // search for the child ToolBoxItemsMap::iterator aIter = m_aAccessibleChildren.find(i); if ( m_aAccessibleChildren.end() == aIter ) { USHORT nItemId = pToolBox->GetItemId( (USHORT)i ); + USHORT nHighlightItemId = pToolBox->GetHighlightItemId(); Window* pItemWindow = pToolBox->GetItemWindow( nItemId ); // not found -> create a new child VCLXAccessibleToolBoxItem* pChild = new VCLXAccessibleToolBoxItem( pToolBox, i, this ); |