summaryrefslogtreecommitdiff
path: root/accessibility/source/extended/AccessibleGridControlHeader.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/source/extended/AccessibleGridControlHeader.cxx')
-rw-r--r--accessibility/source/extended/AccessibleGridControlHeader.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/accessibility/source/extended/AccessibleGridControlHeader.cxx b/accessibility/source/extended/AccessibleGridControlHeader.cxx
index 27dfb6084d18..609000d3d62a 100644
--- a/accessibility/source/extended/AccessibleGridControlHeader.cxx
+++ b/accessibility/source/extended/AccessibleGridControlHeader.cxx
@@ -235,12 +235,24 @@ Sequence< sal_Int8 > SAL_CALL AccessibleGridControlHeader::getImplementationId()
Rectangle AccessibleGridControlHeader::implGetBoundingBox()
{
- return m_aTable.calcHeaderRect(isColumnBar());
+ Window* pParent = m_aTable.GetAccessibleParentWindow();
+ Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( pParent ) );
+ Rectangle aHeaderRect (m_aTable.calcHeaderRect(isColumnBar()));
+ if(isColumnBar())
+ return Rectangle(aGridRect.TopLeft(), Size(aGridRect.getWidth(),aHeaderRect.getHeight()));
+ else
+ return Rectangle(aGridRect.TopLeft(), Size(aHeaderRect.getWidth(),aGridRect.getHeight()));
+
}
Rectangle AccessibleGridControlHeader::implGetBoundingBoxOnScreen()
{
- return m_aTable.calcHeaderRect(isColumnBar());
+ Rectangle aGridRect( m_aTable.GetWindowExtentsRelative( NULL ) );
+ Rectangle aHeaderRect (m_aTable.calcHeaderRect(isColumnBar()));
+ if(isColumnBar())
+ return Rectangle(aGridRect.TopLeft(), Size(aGridRect.getWidth(),aHeaderRect.getHeight()));
+ else
+ return Rectangle(aGridRect.TopLeft(), Size(aHeaderRect.getWidth(),aGridRect.getHeight()));
}
sal_Int32 AccessibleGridControlHeader::implGetRowCount() const