summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-07-25 07:59:06 +0000
committerOliver Bolte <obo@openoffice.org>2008-07-25 07:59:06 +0000
commitea15a21396cbc3d5b87d5a8d9f84311b70378ef0 (patch)
treedd945af7e50753f9b932fe21b12cd75a76964fa4 /accessibility
parent7ec02017ca87e10b3656172eec400d6175b9ec61 (diff)
INTEGRATION: CWS aqua11y02 (1.4.10); FILE MERGED
2008/07/18 07:10:19 obr 1.4.10.4: #i70872# fixed grabFocus() code to not expect XAccessibleSelection being implemented by the same object implementing XAccessible 2008/06/10 12:58:10 obr 1.4.10.3: #i70872# toolbox items returned a parent XAccessible different from the one returned by the toolbox window 2008/05/29 10:31:32 fne 1.4.10.2: #i88047# menu button role added 2008/05/26 11:39:02 fne 1.4.10.1: #i88047# temporary solution until new role is added
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/standard/vclxaccessibletoolboxitem.cxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index dbfd14224751..f89dbe1767c3 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: vclxaccessibletoolboxitem.cxx,v $
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
* This file is part of OpenOffice.org.
*
@@ -70,7 +70,7 @@ DBG_NAME(VCLXAccessibleToolBoxItem)
// -----------------------------------------------------------------------------
// Ctor() and Dtor()
// -----------------------------------------------------------------------------
-VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_Int32 _nPos, const Reference< XAccessible >& _xParent ) :
+VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_Int32 _nPos ) :
AccessibleTextHelper_BASE( new VCLExternalSolarLock() ),
@@ -80,8 +80,7 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In
m_nItemId ( 0 ),
m_bHasFocus ( sal_False ),
m_bIsChecked ( sal_False ),
- m_bIndeterminate( false ),
- m_xParent ( _xParent )
+ m_bIndeterminate( false )
{
DBG_CTOR( VCLXAccessibleToolBoxItem, NULL );
@@ -99,7 +98,9 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In
case TOOLBOXITEM_BUTTON :
{
ToolBoxItemBits nBits = m_pToolBox->GetItemBits( m_nItemId );
- if (( ( nBits & TIB_CHECKABLE ) == TIB_CHECKABLE ) ||
+ if (( nBits & TIB_DROPDOWN ) == TIB_DROPDOWN)
+ m_nRole = AccessibleRole::BUTTON_DROPDOWN;
+ else if (( ( nBits & TIB_CHECKABLE ) == TIB_CHECKABLE ) ||
( ( nBits & TIB_AUTOCHECK ) == TIB_AUTOCHECK ) )
m_nRole = AccessibleRole::TOGGLE_BUTTON;
else if ( m_pToolBox->GetItemWindow( m_nItemId ) )
@@ -293,7 +294,6 @@ void SAL_CALL VCLXAccessibleToolBoxItem::disposing()
{
AccessibleTextHelper_BASE::disposing();
m_pToolBox = NULL;
- m_xParent = NULL;
}
// -----------------------------------------------------------------------------
// XServiceInfo
@@ -355,7 +355,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBoxItem::getAccessibleParent
{
OContextEntryGuard aGuard( this );
- return m_xParent;
+ return m_pToolBox->GetAccessible();
}
// -----------------------------------------------------------------------------
sal_Int32 SAL_CALL VCLXAccessibleToolBoxItem::getAccessibleIndexInParent( ) throw (RuntimeException)
@@ -553,9 +553,16 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBoxItem::getAccessibleAtPoin
// -----------------------------------------------------------------------------
void SAL_CALL VCLXAccessibleToolBoxItem::grabFocus( ) throw (RuntimeException)
{
- Reference < XAccessibleSelection > rxAccessibleSelection ( getAccessibleParent(), UNO_QUERY );
- if ( rxAccessibleSelection.is() ) {
- rxAccessibleSelection -> selectAccessibleChild ( getAccessibleIndexInParent() );
+ Reference< XAccessible > xParent(getAccessibleParent());
+
+ if( xParent.is() )
+ {
+ Reference< XAccessibleSelection > rxAccessibleSelection(xParent->getAccessibleContext(), UNO_QUERY);
+
+ if ( rxAccessibleSelection.is() )
+ {
+ rxAccessibleSelection -> selectAccessibleChild ( getAccessibleIndexInParent() );
+ }
}
}
// -----------------------------------------------------------------------------