summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2025-01-24 16:09:25 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2025-01-24 22:01:49 +0100
commit16684da3f18b8747714a7ddd44810cb429eab5ae (patch)
tree0eb84410ac52bb9729d32e75e9a328cf5e726e14
parentea0faaf9bb1fab2044e6cef9bc8e3d03f63896ec (diff)
toolkit: Merge TableControl_Impl::{calc,impl_get}CellRect
Move logic from TableControl_Impl::impl_getCellRect to TableControl_Impl::calcCellRect and drop the former. Change-Id: I2c44e72a4e781130661deebd0882939ad34c050a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180718 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
-rw-r--r--toolkit/source/controls/table/tablecontrol_impl.cxx25
-rw-r--r--toolkit/source/controls/table/tablecontrol_impl.hxx4
2 files changed, 5 insertions, 24 deletions
diff --git a/toolkit/source/controls/table/tablecontrol_impl.cxx b/toolkit/source/controls/table/tablecontrol_impl.cxx
index 2a3112cc8841..ac04b86a2255 100644
--- a/toolkit/source/controls/table/tablecontrol_impl.cxx
+++ b/toolkit/source/controls/table/tablecontrol_impl.cxx
@@ -1665,23 +1665,6 @@ namespace svt::table
}
}
-
- void TableControl_Impl::impl_getCellRect( ColPos _nColumn, RowPos _nRow, tools::Rectangle& _rCellRect ) const
- {
- if ( !m_pModel
- || ( COL_INVALID == _nColumn )
- || ( ROW_INVALID == _nRow )
- )
- {
- _rCellRect.SetEmpty();
- return;
- }
-
- TableCellGeometry aCell( *this, impl_getAllVisibleCellsArea(), _nColumn, _nRow );
- _rCellRect = aCell.getRect();
- }
-
-
RowPos TableControl_Impl::getRowAtPoint( const Point& rPoint ) const
{
return impl_getRowForAbscissa( rPoint.Y() );
@@ -2339,9 +2322,11 @@ namespace svt::table
tools::Rectangle TableControl_Impl::calcCellRect( sal_Int32 nRow, sal_Int32 nCol ) const
{
- tools::Rectangle aCellRect;
- impl_getCellRect(nCol, nRow, aCellRect);
- return aCellRect;
+ if (!m_pModel || (nRow == ROW_INVALID) || (nCol == COL_INVALID))
+ return tools::Rectangle();
+
+ TableCellGeometry aCell(*this, impl_getAllVisibleCellsArea(), nCol, nRow);
+ return aCell.getRect();
}
diff --git a/toolkit/source/controls/table/tablecontrol_impl.hxx b/toolkit/source/controls/table/tablecontrol_impl.hxx
index 8fa77c18b975..07409773705a 100644
--- a/toolkit/source/controls/table/tablecontrol_impl.hxx
+++ b/toolkit/source/controls/table/tablecontrol_impl.hxx
@@ -342,10 +342,6 @@ namespace svt::table
*/
TableSize impl_getVisibleColumns( bool _bAcceptPartialCol ) const;
- /** determines the rectangle occupied by the given cell
- */
- void impl_getCellRect( ColPos _nColumn, RowPos _nRow, tools::Rectangle& _rCellRect ) const;
-
/** updates all cached model values
The method is not bound to the classes public invariants, as it's used in