INTEGRATION: CWS pba11y01 (1.4.10); FILE MERGED

2008/07/14 11:13:43 pb 1.4.10.1: fix: #i37177# handle new event (VCLEVENT_TABLECELL_NAMECHANGED)
This commit is contained in:
Oliver Bolte 2008-07-22 06:33:40 +00:00
parent d65167dd82
commit 8f48277d3e

View file

@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: accessibletablistboxtable.cxx,v $
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
@ -184,6 +184,42 @@ namespace accessibility
}
break;
}
case VCLEVENT_TABLECELL_NAMECHANGED :
{
if ( m_pTabListBox->IsTransientChildrenDisabled() )
{
commitEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
TabListBoxEventData* pData = static_cast< TabListBoxEventData* >( rVclWindowEvent.GetData() );
SvLBoxEntry* pEntry = pData != NULL ? pData->m_pEntry : NULL;
if ( pEntry )
{
sal_Int32 nRow = m_pTabListBox->GetEntryPos( pEntry );
USHORT nCol = pData->m_nColumn;
Reference< XAccessible > xChild =
m_pTabListBox->CreateAccessibleCell( nRow, nCol );
uno::Any aOldValue, aNewValue;
aOldValue <<= ::rtl::OUString( pData->m_sOldText );
::rtl::OUString sNewText( m_pTabListBox->GetCellText( nRow, nCol ) );
aNewValue <<= sNewText;
TriState eState = STATE_DONTKNOW;
if ( m_pTabListBox->IsCellCheckBox( nRow, nCol, eState ) )
{
AccessibleCheckBoxCell* pCell =
static_cast< AccessibleCheckBoxCell* >( xChild.get() );
pCell->commitEvent( AccessibleEventId::NAME_CHANGED, aOldValue, aNewValue );
}
else
{
AccessibleBrowseBoxTableCell* pCell =
static_cast< AccessibleBrowseBoxTableCell* >( xChild.get() );
pCell->nameChanged( sNewText, pData->m_sOldText );
}
}
}
break;
}
}
}
}