summaryrefslogtreecommitdiff
path: root/svtools/source/table/tablecontrol.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-01-14 11:04:24 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-01-14 11:04:24 +0100
commitdfe2edc22c03fc4b0f536749cdf9550412ef7e89 (patch)
tree3254326ce6fe93f3e61308c940e25cec348ee512 /svtools/source/table/tablecontrol.cxx
parentd41461c3de4108c5e09c64e30a38079b01217e96 (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 'svtools/source/table/tablecontrol.cxx')
-rw-r--r--svtools/source/table/tablecontrol.cxx44
1 files changed, 19 insertions, 25 deletions
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 4fb3c8efc117..46f3735e054c 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -186,6 +186,24 @@ namespace svt { namespace table
return m_pImpl->goTo( _nColPos, _nRowPos );
}
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Int32 TableControl::GetSelectedRowCount() const
+ {
+ return sal_Int32( m_pImpl->getSelectedRowCount() );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Int32 TableControl::GetSelectedRowIndex( sal_Int32 const i_selectionIndex ) const
+ {
+ return sal_Int32( m_pImpl->getSelectedRowIndex( i_selectionIndex ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool TableControl::IsRowSelected( sal_Int32 const i_rowIndex ) const
+ {
+ return m_pImpl->isRowSelected( i_rowIndex );
+ }
+
// -----------------------------------------------------------------------------------------------------------------
void TableControl::SelectRow( RowPos const i_rowIndex, bool const i_select )
{
@@ -208,7 +226,7 @@ namespace svt { namespace table
}
// -----------------------------------------------------------------------------------------------------------------
- void TableControl::SelectAll( bool const i_select )
+ void TableControl::SelectAllRows( bool const i_select )
{
if ( i_select )
{
@@ -236,18 +254,6 @@ namespace svt { namespace table
}
// -----------------------------------------------------------------------------------------------------------------
- std::vector<sal_Int32>& TableControl::GetSelectedRows()
- {
- return m_pImpl->getSelectedRows();
- }
-
- // -----------------------------------------------------------------------------------------------------------------
- void TableControl::ClearSelection()
- {
- SelectAll( false );
- }
-
- // -----------------------------------------------------------------------------------------------------------------
ITableControl& TableControl::getTableControlInterface()
{
return *m_pImpl;
@@ -519,18 +525,6 @@ namespace svt { namespace table
}
//------------------------------------------------------------------------------------------------------------------
- sal_Int32 TableControl::GetSelectedRowCount() const
- {
- return sal_Int32( m_pImpl->getSelectedRowCount() );
- }
-
- //------------------------------------------------------------------------------------------------------------------
- bool TableControl::IsRowSelected( long _nRow ) const
- {
- return m_pImpl->isRowSelected( _nRow );
- }
-
- //------------------------------------------------------------------------------------------------------------------
sal_Bool TableControl::ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )
{
_rnRow = m_pImpl->getRowAtPoint( _rPoint );