From 8951a13d178737549c5fb45aef831ef2e691e71c Mon Sep 17 00:00:00 2001 From: "surkov.alexander@gmail.com" Date: Thu, 12 Jul 2007 02:40:21 -0700 Subject: [PATCH] Bug 387857 - implement IAccessibleTable::rowCOlumnExtentsAt, r=ginn.chen --- accessible/src/msaa/CAccessibleTable.cpp | 39 +++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/accessible/src/msaa/CAccessibleTable.cpp b/accessible/src/msaa/CAccessibleTable.cpp index 752f853839a..2d30a4bdea8 100755 --- a/accessible/src/msaa/CAccessibleTable.cpp +++ b/accessible/src/msaa/CAccessibleTable.cpp @@ -530,8 +530,45 @@ CAccessibleTable::get_rowColumnExtentsAtIndex(long aIndex, long *aRow, *aColumn = 0; *aRowExtents = 0; *aColumnExtents = 0; + *aIsSelected = false; - return E_NOTIMPL; + nsCOMPtr tableAcc(do_QueryInterface(this)); + NS_ASSERTION(tableAcc, CANT_QUERY_ASSERTION_MSG); + if (!tableAcc) + return E_FAIL; + + PRInt32 row = -1; + nsresult rv = tableAcc->GetRowAtIndex(aIndex, &row); + if (NS_FAILED(rv)) + return E_FAIL; + + PRInt32 column = -1; + rv = tableAcc->GetColumnAtIndex(aIndex, &column); + if (NS_FAILED(rv)) + return E_FAIL; + + PRInt32 rowExtents = 0; + rv = tableAcc->GetRowExtentAt(row, column, &rowExtents); + if (NS_FAILED(rv)) + return E_FAIL; + + PRInt32 columnExtents = 0; + rv = tableAcc->GetColumnExtentAt(row, column, &columnExtents); + if (NS_FAILED(rv)) + return E_FAIL; + + PRBool isSelected = PR_FALSE; + rv = tableAcc->IsCellSelected(row, column, &isSelected); + if (NS_FAILED(rv)) + return E_FAIL; + + *aRow = row; + *aColumn = column; + *aRowExtents = rowExtents; + *aColumnExtents = columnExtents; + *aIsSelected = isSelected; + + return S_OK; } STDMETHODIMP