From 8f48277d3e6c73076af1544ac2f2cd33c54c052d Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Tue, 22 Jul 2008 06:33:40 +0000 Subject: [PATCH] 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) --- .../extended/accessibletablistboxtable.cxx | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx index 392469283b26..50fc793f8ff6 100644 --- a/accessibility/source/extended/accessibletablistboxtable.cxx +++ b/accessibility/source/extended/accessibletablistboxtable.cxx @@ -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; + } } } }