summaryrefslogtreecommitdiff
path: root/svtools/source/table/tablecontrol_impl.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-03-30 20:27:55 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-31 06:27:11 +0000
commita5a571307fb3306b74ab46b085cde6388270a770 (patch)
tree66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /svtools/source/table/tablecontrol_impl.cxx
parent17d821af6bb9df93569836a92f6bed975587fc6c (diff)
tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'svtools/source/table/tablecontrol_impl.cxx')
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx86
1 files changed, 43 insertions, 43 deletions
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index fef8a6e09066..6ac56256baee 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -478,7 +478,7 @@ namespace svt { namespace table
void TableControl_Impl::impl_invalidateColumn( ColPos const i_column )
{
- Rectangle const aAllCellsArea( impl_getAllVisibleCellsArea() );
+ tools::Rectangle const aAllCellsArea( impl_getAllVisibleCellsArea() );
const TableColumnGeometry aColumn( *this, aAllCellsArea, i_column );
if ( aColumn.isValid() )
@@ -511,9 +511,9 @@ namespace svt { namespace table
}
- Rectangle TableControl_Impl::impl_getAllVisibleCellsArea() const
+ tools::Rectangle TableControl_Impl::impl_getAllVisibleCellsArea() const
{
- Rectangle aArea( Point( 0, 0 ), Size( 0, 0 ) );
+ tools::Rectangle aArea( Point( 0, 0 ), Size( 0, 0 ) );
// determine the right-most border of the last column which is
// at least partially visible
@@ -547,9 +547,9 @@ namespace svt { namespace table
}
- Rectangle TableControl_Impl::impl_getAllVisibleDataCellArea() const
+ tools::Rectangle TableControl_Impl::impl_getAllVisibleDataCellArea() const
{
- Rectangle aArea( impl_getAllVisibleCellsArea() );
+ tools::Rectangle aArea( impl_getAllVisibleCellsArea() );
aArea.Left() = m_nRowHeaderWidthPixel;
aArea.Top() = m_nColHeaderHeightPixel;
return aArea;
@@ -676,7 +676,7 @@ namespace svt { namespace table
with the first visible column as given. Partially fitting columns are counted, too,
if the respective parameter says so.
*/
- TableSize lcl_getColumnsVisibleWithin( const Rectangle& _rArea, ColPos _nFirstVisibleColumn,
+ TableSize lcl_getColumnsVisibleWithin( const tools::Rectangle& _rArea, ColPos _nFirstVisibleColumn,
const TableControl_Impl& _rControl, bool _bAcceptPartialRow )
{
TableSize visibleColumns = 0;
@@ -982,7 +982,7 @@ namespace svt { namespace table
// determine the playground for the data cells (excluding headers)
// TODO: what if the control is smaller than needed for the headers/scrollbars?
- Rectangle aDataCellPlayground( Point( 0, 0 ), m_rAntiImpl.GetOutputSizePixel() );
+ tools::Rectangle aDataCellPlayground( Point( 0, 0 ), m_rAntiImpl.GetOutputSizePixel() );
aDataCellPlayground.Left() = m_nRowHeaderWidthPixel;
aDataCellPlayground.Top() = m_nColHeaderHeightPixel;
@@ -1084,7 +1084,7 @@ namespace svt { namespace table
}
- void TableControl_Impl::impl_ni_positionChildWindows( Rectangle const & i_dataCellPlayground,
+ void TableControl_Impl::impl_ni_positionChildWindows( tools::Rectangle const & i_dataCellPlayground,
bool const i_verticalScrollbar, bool const i_horizontalScrollbar )
{
long const nScrollbarMetrics = m_rAntiImpl.GetSettings().GetStyleSettings().GetScrollBarSize();
@@ -1106,7 +1106,7 @@ namespace svt { namespace table
// position it
if ( m_pVScroll )
{
- Rectangle aScrollbarArea(
+ tools::Rectangle aScrollbarArea(
Point( i_dataCellPlayground.Right() + 1, 0 ),
Size( nScrollbarMetrics, i_dataCellPlayground.Bottom() + 1 )
);
@@ -1141,7 +1141,7 @@ namespace svt { namespace table
m_pHScroll->SetPageSize( nVisibleUnits - 1 );
}
}
- Rectangle aScrollbarArea(
+ tools::Rectangle aScrollbarArea(
Point( 0, i_dataCellPlayground.Bottom() + 1 ),
Size( i_dataCellPlayground.Right() + 1, nScrollbarMetrics )
);
@@ -1184,7 +1184,7 @@ namespace svt { namespace table
}
- void TableControl_Impl::doPaintContent(vcl::RenderContext& rRenderContext, const Rectangle& _rUpdateRect)
+ void TableControl_Impl::doPaintContent(vcl::RenderContext& rRenderContext, const tools::Rectangle& _rUpdateRect)
{
if (!getModel())
return;
@@ -1198,13 +1198,13 @@ namespace svt { namespace table
m_nRowCount = m_pModel->getRowCount();
// the area occupied by all (at least partially) visible cells, including
// headers
- Rectangle const aAllCellsWithHeaders( impl_getAllVisibleCellsArea() );
+ tools::Rectangle const aAllCellsWithHeaders( impl_getAllVisibleCellsArea() );
// draw the header column area
if (m_pModel->hasColumnHeaders())
{
- TableRowGeometry const aHeaderRow(*this, Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()), ROW_COL_HEADERS);
- Rectangle const aColRect(aHeaderRow.getRect());
+ TableRowGeometry const aHeaderRow(*this, tools::Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()), ROW_COL_HEADERS);
+ tools::Rectangle const aColRect(aHeaderRow.getRect());
pRenderer->PaintHeaderArea(rRenderContext, aColRect, true, false, rStyle);
// Note that strictly, aHeaderRow.getRect() also contains the intersection between column
// and row header area. However, below we go to paint this intersection, again,
@@ -1221,7 +1221,7 @@ namespace svt { namespace table
}
}
// the area occupied by the row header, if any
- Rectangle aRowHeaderArea;
+ tools::Rectangle aRowHeaderArea;
if (m_pModel->hasRowHeaders())
{
aRowHeaderArea = aAllCellsWithHeaders;
@@ -1240,9 +1240,9 @@ namespace svt { namespace table
if (m_pModel->hasColumnHeaders())
{
- TableCellGeometry const aIntersection(*this, Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()),
+ TableCellGeometry const aIntersection(*this, tools::Rectangle(Point(0, 0), aAllCellsWithHeaders.BottomRight()),
COL_ROW_HEADERS, ROW_COL_HEADERS);
- Rectangle const aInters(aIntersection.getRect());
+ tools::Rectangle const aInters(aIntersection.getRect());
pRenderer->PaintHeaderArea(rRenderContext, aInters, true, true, rStyle);
}
}
@@ -1251,7 +1251,7 @@ namespace svt { namespace table
TableSize colCount = getModel()->getColumnCount();
// paint all rows
- Rectangle const aAllDataCellsArea(impl_getAllVisibleDataCellArea());
+ tools::Rectangle const aAllDataCellsArea(impl_getAllVisibleDataCellArea());
for (TableRowGeometry aRowIterator(*this, aAllCellsWithHeaders, getTopRow()); aRowIterator.isValid(); aRowIterator.moveDown())
{
if (_rUpdateRect.GetIntersection(aRowIterator.getRect() ).IsEmpty())
@@ -1260,7 +1260,7 @@ namespace svt { namespace table
bool const isControlFocused = m_rAntiImpl.HasControlFocus();
bool const isSelectedRow = isRowSelected(aRowIterator.getRow());
- Rectangle const aRect = aRowIterator.getRect().GetIntersection(aAllDataCellsArea);
+ tools::Rectangle const aRect = aRowIterator.getRect().GetIntersection(aAllDataCellsArea);
// give the renderer a chance to prepare the row
pRenderer->PrepareRow(aRowIterator.getRow(), isControlFocused, isSelectedRow, rRenderContext, aRect, rStyle);
@@ -1268,7 +1268,7 @@ namespace svt { namespace table
// paint the row header
if (m_pModel->hasRowHeaders())
{
- const Rectangle aCurrentRowHeader(aRowHeaderArea.GetIntersection(aRowIterator.getRect()));
+ const tools::Rectangle aCurrentRowHeader(aRowHeaderArea.GetIntersection(aRowIterator.getRect()));
pRenderer->PaintRowHeader(isControlFocused, isSelectedRow, rRenderContext, aCurrentRowHeader, rStyle);
}
@@ -1677,7 +1677,7 @@ namespace svt { namespace table
PTableRenderer pRenderer = !!m_pModel ? m_pModel->getRenderer() : PTableRenderer();
if ( !!pRenderer )
{
- Rectangle aCellRect;
+ tools::Rectangle aCellRect;
impl_getCellRect( m_nCurColumn, m_nCurRow, aCellRect );
if ( _bShow )
pRenderer->ShowCellCursor( *m_pDataWindow, aCellRect );
@@ -1687,7 +1687,7 @@ namespace svt { namespace table
}
- void TableControl_Impl::impl_getCellRect( ColPos _nColumn, RowPos _nRow, Rectangle& _rCellRect ) const
+ void TableControl_Impl::impl_getCellRect( ColPos _nColumn, RowPos _nRow, tools::Rectangle& _rCellRect ) const
{
if ( !m_pModel
|| ( COL_INVALID == _nColumn )
@@ -1822,7 +1822,7 @@ namespace svt { namespace table
}
- void TableControl_Impl::showTracking( Rectangle const & i_location, ShowTrackFlags const i_flags )
+ void TableControl_Impl::showTracking( tools::Rectangle const & i_location, ShowTrackFlags const i_flags )
{
m_pDataWindow->ShowTracking( i_location, i_flags );
}
@@ -1837,15 +1837,15 @@ namespace svt { namespace table
void TableControl_Impl::invalidateSelectedRegion( RowPos _nPrevRow, RowPos _nCurRow )
{
// get the visible area of the table control and set the Left and right border of the region to be repainted
- Rectangle const aAllCells( impl_getAllVisibleCellsArea() );
+ tools::Rectangle const aAllCells( impl_getAllVisibleCellsArea() );
- Rectangle aInvalidateRect;
+ tools::Rectangle aInvalidateRect;
aInvalidateRect.Left() = aAllCells.Left();
aInvalidateRect.Right() = aAllCells.Right();
// if only one row is selected
if ( _nPrevRow == _nCurRow )
{
- Rectangle aCellRect;
+ tools::Rectangle aCellRect;
impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect );
aInvalidateRect.Top() = aCellRect.Top();
aInvalidateRect.Bottom() = aCellRect.Bottom();
@@ -1853,7 +1853,7 @@ namespace svt { namespace table
//if the region is above the current row
else if(_nPrevRow < _nCurRow )
{
- Rectangle aCellRect;
+ tools::Rectangle aCellRect;
impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect );
aInvalidateRect.Top() = aCellRect.Top();
impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect );
@@ -1862,7 +1862,7 @@ namespace svt { namespace table
//if the region is beneath the current row
else
{
- Rectangle aCellRect;
+ tools::Rectangle aCellRect;
impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect );
aInvalidateRect.Top() = aCellRect.Top();
impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect );
@@ -1872,7 +1872,7 @@ namespace svt { namespace table
invalidateRect(aInvalidateRect);
}
- void TableControl_Impl::invalidateRect(const Rectangle &rInvalidateRect)
+ void TableControl_Impl::invalidateRect(const tools::Rectangle &rInvalidateRect)
{
m_pDataWindow->Invalidate( rInvalidateRect,
m_pDataWindow->GetControlBackground().GetTransparency() ? InvalidateFlags::Transparent : InvalidateFlags::NONE );
@@ -1897,9 +1897,9 @@ namespace svt { namespace table
RowPos const lastVisibleRow = m_nTopRow + impl_getVisibleRows( true ) - 1;
RowPos const lastRow = ( ( i_lastRow == ROW_INVALID ) || ( i_lastRow > lastVisibleRow ) ) ? lastVisibleRow : i_lastRow;
- Rectangle aInvalidateRect;
+ tools::Rectangle aInvalidateRect;
- Rectangle const aVisibleCellsArea( impl_getAllVisibleCellsArea() );
+ tools::Rectangle const aVisibleCellsArea( impl_getAllVisibleCellsArea() );
TableRowGeometry aRow( *this, aVisibleCellsArea, firstRow, true );
while ( aRow.isValid() && ( aRow.getRow() <= lastRow ) )
{
@@ -1962,7 +1962,7 @@ namespace svt { namespace table
DBG_ASSERT( m_pDataWindow, "TableControl_Impl::impl_getVisibleColumns: no data window!" );
return lcl_getColumnsVisibleWithin(
- Rectangle( Point( 0, 0 ), m_pDataWindow->GetOutputSizePixel() ),
+ tools::Rectangle( Point( 0, 0 ), m_pDataWindow->GetOutputSizePixel() ),
m_nLeftColumn,
*this,
_bAcceptPartialCol
@@ -2059,7 +2059,7 @@ namespace svt { namespace table
// scroll the view port, if possible
long nPixelDelta = m_nRowHeightPixel * ( m_nTopRow - nOldTopRow );
- Rectangle aDataArea( Point( 0, m_nColHeaderHeightPixel ), m_pDataWindow->GetOutputSizePixel() );
+ tools::Rectangle aDataArea( Point( 0, m_nColHeaderHeightPixel ), m_pDataWindow->GetOutputSizePixel() );
if ( m_pDataWindow->GetBackground().IsScrollable()
&& std::abs( nPixelDelta ) < aDataArea.GetHeight()
@@ -2121,7 +2121,7 @@ namespace svt { namespace table
// Same for onEndScroll
// scroll the view port, if possible
- const Rectangle aDataArea( Point( m_nRowHeaderWidthPixel, 0 ), m_pDataWindow->GetOutputSizePixel() );
+ const tools::Rectangle aDataArea( Point( m_nRowHeaderWidthPixel, 0 ), m_pDataWindow->GetOutputSizePixel() );
long nPixelDelta =
m_aColumnWidths[ nOldLeftColumn ].getStart()
@@ -2338,20 +2338,20 @@ namespace svt { namespace table
}
- Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader)
+ tools::Rectangle TableControl_Impl::calcHeaderRect(bool bColHeader)
{
- Rectangle const aRectTableWithHeaders( impl_getAllVisibleCellsArea() );
+ tools::Rectangle const aRectTableWithHeaders( impl_getAllVisibleCellsArea() );
Size const aSizeTableWithHeaders( aRectTableWithHeaders.GetSize() );
if ( bColHeader )
- return Rectangle( aRectTableWithHeaders.TopLeft(), Size( aSizeTableWithHeaders.Width(), m_nColHeaderHeightPixel ) );
+ return tools::Rectangle( aRectTableWithHeaders.TopLeft(), Size( aSizeTableWithHeaders.Width(), m_nColHeaderHeightPixel ) );
else
- return Rectangle( aRectTableWithHeaders.TopLeft(), Size( m_nRowHeaderWidthPixel, aSizeTableWithHeaders.Height() ) );
+ return tools::Rectangle( aRectTableWithHeaders.TopLeft(), Size( m_nRowHeaderWidthPixel, aSizeTableWithHeaders.Height() ) );
}
- Rectangle TableControl_Impl::calcHeaderCellRect( bool bColHeader, sal_Int32 nPos )
+ tools::Rectangle TableControl_Impl::calcHeaderCellRect( bool bColHeader, sal_Int32 nPos )
{
- Rectangle const aHeaderRect = calcHeaderRect( bColHeader );
+ tools::Rectangle const aHeaderRect = calcHeaderRect( bColHeader );
TableCellGeometry const aGeometry(
*this, aHeaderRect,
bColHeader ? nPos : COL_ROW_HEADERS,
@@ -2361,15 +2361,15 @@ namespace svt { namespace table
}
- Rectangle TableControl_Impl::calcTableRect()
+ tools::Rectangle TableControl_Impl::calcTableRect()
{
return impl_getAllVisibleDataCellArea();
}
- Rectangle TableControl_Impl::calcCellRect( sal_Int32 nRow, sal_Int32 nCol )
+ tools::Rectangle TableControl_Impl::calcCellRect( sal_Int32 nRow, sal_Int32 nCol )
{
- Rectangle aCellRect;
+ tools::Rectangle aCellRect;
impl_getCellRect( nRow, nCol, aCellRect );
return aCellRect;
}