diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-14 11:04:24 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-14 11:04:24 +0100 |
commit | 3862204a208143119d3304ef891d591b6da831de (patch) | |
tree | 3918ec7aff52949930e656070726624a32e6d35d /accessibility | |
parent | a05b122758abf6e692fb63a87a75a585213338f9 (diff) |
gridsort: ouch. Removed IAccessibleTable::GetSelectedRows. It exposed an internal implementation detail, and in
fact some clients (the A11Y API implementation) exploited this, e.g. by simply adding elements to the array,
without the owner (the TableControl/_Impl) ever noticing it. Replaced that with a working API.
In this course, removed XGridSelection::getMin/MaxSelectionIndex. Pretty useless IMO, unused, and ugly to
implement.
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/source/extended/AccessibleGridControlTable.cxx | 3 | ||||
-rw-r--r--[-rwxr-xr-x] | accessibility/source/extended/AccessibleGridControlTableBase.cxx | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index 513056877967..49e469675cef 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -245,8 +245,7 @@ void SAL_CALL AccessibleGridControlTable::selectAccessibleChild( sal_Int32 nChil ensureIsValidIndex( nChildIndex ); sal_Int32 nColumns = m_aTable.GetColumnCount(); sal_Int32 nRow = (nChildIndex / nColumns); - std::vector< sal_Int32 > selectedRows = m_aTable.GetSelectedRows(); - selectedRows.push_back(nRow); + m_aTable.SelectRow( nRow, TRUE ); } sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw ( lang::IndexOutOfBoundsException, uno::RuntimeException ) diff --git a/accessibility/source/extended/AccessibleGridControlTableBase.cxx b/accessibility/source/extended/AccessibleGridControlTableBase.cxx index f6d1147ad309..d97feb1277ec 100755..100644 --- a/accessibility/source/extended/AccessibleGridControlTableBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlTableBase.cxx @@ -245,7 +245,10 @@ sal_Int32 AccessibleGridControlTableBase::implGetChildIndex( void AccessibleGridControlTableBase::implGetSelectedRows( Sequence< sal_Int32 >& rSeq ) { - rSeq = comphelper::containerToSequence(m_aTable.GetSelectedRows()); + sal_Int32 const selectionCount( m_aTable.GetSelectedRowCount() ); + rSeq.realloc( selectionCount ); + for ( sal_Int32 i=0; i<selectionCount; ++i ) + rSeq[i] = m_aTable.GetSelectedRowIndex(i); } void AccessibleGridControlTableBase::ensureIsValidRow( sal_Int32 nRow ) |