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
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: vclxaccessibletoolboxitem.cxx,v $
|
* $RCSfile: vclxaccessibletoolboxitem.cxx,v $
|
||||||
* $Revision: 1.5 $
|
* $Revision: 1.6 $
|
||||||
*
|
*
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
@@ -70,7 +70,7 @@ DBG_NAME(VCLXAccessibleToolBoxItem)
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Ctor() and Dtor()
|
// 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() ),
|
AccessibleTextHelper_BASE( new VCLExternalSolarLock() ),
|
||||||
|
|
||||||
@@ -80,8 +80,7 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In
|
|||||||
m_nItemId ( 0 ),
|
m_nItemId ( 0 ),
|
||||||
m_bHasFocus ( sal_False ),
|
m_bHasFocus ( sal_False ),
|
||||||
m_bIsChecked ( sal_False ),
|
m_bIsChecked ( sal_False ),
|
||||||
m_bIndeterminate( false ),
|
m_bIndeterminate( false )
|
||||||
m_xParent ( _xParent )
|
|
||||||
|
|
||||||
{
|
{
|
||||||
DBG_CTOR( VCLXAccessibleToolBoxItem, NULL );
|
DBG_CTOR( VCLXAccessibleToolBoxItem, NULL );
|
||||||
@@ -99,7 +98,9 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In
|
|||||||
case TOOLBOXITEM_BUTTON :
|
case TOOLBOXITEM_BUTTON :
|
||||||
{
|
{
|
||||||
ToolBoxItemBits nBits = m_pToolBox->GetItemBits( m_nItemId );
|
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 ) )
|
( ( nBits & TIB_AUTOCHECK ) == TIB_AUTOCHECK ) )
|
||||||
m_nRole = AccessibleRole::TOGGLE_BUTTON;
|
m_nRole = AccessibleRole::TOGGLE_BUTTON;
|
||||||
else if ( m_pToolBox->GetItemWindow( m_nItemId ) )
|
else if ( m_pToolBox->GetItemWindow( m_nItemId ) )
|
||||||
@@ -293,7 +294,6 @@ void SAL_CALL VCLXAccessibleToolBoxItem::disposing()
|
|||||||
{
|
{
|
||||||
AccessibleTextHelper_BASE::disposing();
|
AccessibleTextHelper_BASE::disposing();
|
||||||
m_pToolBox = NULL;
|
m_pToolBox = NULL;
|
||||||
m_xParent = NULL;
|
|
||||||
}
|
}
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// XServiceInfo
|
// XServiceInfo
|
||||||
@@ -355,7 +355,7 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBoxItem::getAccessibleParent
|
|||||||
{
|
{
|
||||||
OContextEntryGuard aGuard( this );
|
OContextEntryGuard aGuard( this );
|
||||||
|
|
||||||
return m_xParent;
|
return m_pToolBox->GetAccessible();
|
||||||
}
|
}
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
sal_Int32 SAL_CALL VCLXAccessibleToolBoxItem::getAccessibleIndexInParent( ) throw (RuntimeException)
|
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)
|
void SAL_CALL VCLXAccessibleToolBoxItem::grabFocus( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
Reference < XAccessibleSelection > rxAccessibleSelection ( getAccessibleParent(), UNO_QUERY );
|
Reference< XAccessible > xParent(getAccessibleParent());
|
||||||
if ( rxAccessibleSelection.is() ) {
|
|
||||||
rxAccessibleSelection -> selectAccessibleChild ( getAccessibleIndexInParent() );
|
if( xParent.is() )
|
||||||
|
{
|
||||||
|
Reference< XAccessibleSelection > rxAccessibleSelection(xParent->getAccessibleContext(), UNO_QUERY);
|
||||||
|
|
||||||
|
if ( rxAccessibleSelection.is() )
|
||||||
|
{
|
||||||
|
rxAccessibleSelection -> selectAccessibleChild ( getAccessibleIndexInParent() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user