summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lippka <christian.lippka@sun.com>2010-04-28 13:42:24 +0200
committerChristian Lippka <christian.lippka@sun.com>2010-04-28 13:42:24 +0200
commit505916b71e4357b636d71e683ec12b7551871bcb (patch)
treeba75e1d2414f9945d1e3091efe911b93e494e967
parentf2e6942b7e9ed57aa78d62f500d580624e5c532b (diff)
#i107213# use toolbox item window as parent for popup menu
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index 781c559ba..ed0dce9b8 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -446,18 +446,17 @@ void VCLXAccessibleToolBox::UpdateAllItems_Impl()
void VCLXAccessibleToolBox::UpdateCustomPopupItemp_Impl( Window* pWindow, bool bOpen )
{
- if( pWindow )
+ ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
+ if( pWindow && pToolBox )
{
Reference< XAccessible > xChild( pWindow->GetAccessible() );
if( xChild.is() )
{
- Any aOld, aNew;
- if( bOpen )
- aNew <<= xChild;
- else
- aOld <<= xChild;
+ Reference< XAccessible > xChildItem( getAccessibleChild( static_cast< sal_Int32 >( pToolBox->GetItemPos( pToolBox->GetDownItemId() ) ) ) );
+ VCLXAccessibleToolBoxItem* pItem = static_cast< VCLXAccessibleToolBoxItem* >( xChildItem.get() );
- NotifyAccessibleEvent( AccessibleEventId::CHILD, aOld, aNew );
+ pItem->SetChild( xChild );
+ pItem->NotifyChildEvent( xChild, bOpen );
}
}
}