toolkit: Move TableControl::ConvertPointToCellAddress logic to its impl

Most of the TableControl logic is already implemented
in its implementation class, TableControl_Impl and
most TableControl methods just forward to the
corresponding TableControl_Impl ones.

This commit is part of a series to implement that approach
for more methods by moving the logic to TableControl_Impl,
to make the handling more consistent and prepare for merging
TableControl and TableControl_Impl in an upcoming commit.

Change-Id: Ibf26eebf0506d6cfc5448064075eae9412ff1fc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211153
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2026-09-19 16:13:54 +02:00
parent f94f2a46ac
commit c3a108217d
3 changed files with 10 additions and 3 deletions
@@ -338,6 +338,7 @@ public:
ScrollBar* getHorzScrollbar() { return m_pHScroll; }
ScrollBar* getVertScrollbar() { return m_pVScroll; }
bool convertPointToCellAddress(sal_Int32& rRow, sal_Int32& rColPos, const Point& rPoint);
tools::Rectangle calcHeaderRect(bool bColHeader);
tools::Rectangle calcHeaderCellRect(bool bColHeader, sal_Int32 nPos);
tools::Rectangle calcTableRect() const;
@@ -454,9 +454,7 @@ sal_Int32 TableControl::GetColumnCount() const { return m_pImpl->getColumnCount(
bool TableControl::ConvertPointToCellAddress(sal_Int32& _rnRow, sal_Int32& _rnColPos,
const Point& _rPoint)
{
_rnRow = m_pImpl->getRowAtPoint(_rPoint);
_rnColPos = m_pImpl->getColAtPoint(_rPoint);
return _rnRow >= 0;
return m_pImpl->convertPointToCellAddress(_rnRow, _rnColPos, _rPoint);
}
void TableControl::FillAccessibleStateSetForCell(sal_Int64& _rStateSet, sal_Int32 _nRow,
@@ -2180,6 +2180,14 @@ void TableControl_Impl::commitTableEvent(sal_Int16 const i_eventID, const Any& i
m_xAccessibleTable->commitTableEvent(i_eventID, i_newValue, i_oldValue);
}
bool TableControl_Impl::convertPointToCellAddress(sal_Int32& rRow, sal_Int32& rColPos,
const Point& rPoint)
{
rRow = getRowAtPoint(rPoint);
rColPos = getColAtPoint(rPoint);
return rRow >= 0;
}
tools::Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader)
{
tools::Rectangle const aRectTableWithHeaders(impl_getAllVisibleCellsArea());