summaryrefslogtreecommitdiff
path: root/accessibility/source/extended/AccessibleGridControlTableCell.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/source/extended/AccessibleGridControlTableCell.cxx')
-rwxr-xr-xaccessibility/source/extended/AccessibleGridControlTableCell.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/accessibility/source/extended/AccessibleGridControlTableCell.cxx b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
index 43b9400e9050..1efc369dfbc3 100755
--- a/accessibility/source/extended/AccessibleGridControlTableCell.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTableCell.cxx
@@ -360,11 +360,25 @@ namespace accessibility
Rectangle AccessibleGridControlTableCell::implGetBoundingBox()
{
- return Rectangle(Point(0,0),Point(0,0));//To Do - return headercell rectangle
+ Window* pParent = m_aTable.GetAccessibleParentWindow();
+ DBG_ASSERT( pParent, "implGetBoundingBox - missing parent window" );
+ Rectangle aGridRect = m_aTable.GetWindowExtentsRelative( pParent );
+ sal_Int32 nIndex = getAccessibleIndexInParent();
+ Rectangle aCellRect = m_aTable.calcCellRect(nIndex%m_aTable.GetColumnCount(), nIndex/m_aTable.GetColumnCount());
+ long nX = aGridRect.Left() + aCellRect.Left();
+ long nY = aGridRect.Top() + aCellRect.Top();
+ Rectangle aCell( Point( nX, nY ), aCellRect.GetSize());
+ return aCell;
}
// -----------------------------------------------------------------------------
Rectangle AccessibleGridControlTableCell::implGetBoundingBoxOnScreen()
{
- return Rectangle(Point(0,0),Point(0,0));//To Do - return headercell rectangle
+ Rectangle aGridRect = m_aTable.GetWindowExtentsRelative( NULL );
+ sal_Int32 nIndex = getAccessibleIndexInParent();
+ Rectangle aCellRect = m_aTable.calcCellRect(nIndex%m_aTable.GetColumnCount(), nIndex/m_aTable.GetColumnCount());
+ long nX = aGridRect.Left() + aCellRect.Left();
+ long nY = aGridRect.Top() + aCellRect.Top();
+ Rectangle aCell( Point( nX, nY ), aCellRect.GetSize());
+ return aCell;
}
}