diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-21 07:49:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-30 08:57:07 +0100 |
commit | f2be3d31cde821f5c1128deae7f2b95361ac1db9 (patch) | |
tree | aac9582c61cf53e61da4b566c4d10b60af0475ad /svtools | |
parent | 46ecd31445bda45e10d58e937ff468a1a8f17da2 (diff) |
convert some tools::Long->sal_Int32
in places where it is obvious we only need a sal_Int32, because
we are dealing with rows and columns, and not even calc needs
more than 32 bits for that.
Change-Id: I114417e639c224d45bfd9fc6838122ab195eefa3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104584
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/table/tablecontrol.hxx | 4 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox1.cxx | 69 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox2.cxx | 20 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox3.cxx | 12 | ||||
-rw-r--r-- | svtools/source/brwbox/datwin.cxx | 10 | ||||
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.cxx | 24 | ||||
-rw-r--r-- | svtools/source/brwbox/editbrowsebox2.cxx | 4 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol.cxx | 4 |
8 files changed, 73 insertions, 74 deletions
diff --git a/svtools/inc/table/tablecontrol.hxx b/svtools/inc/table/tablecontrol.hxx index 7af537b9c19c..0514d0238e5a 100644 --- a/svtools/inc/table/tablecontrol.hxx +++ b/svtools/inc/table/tablecontrol.hxx @@ -135,8 +135,8 @@ namespace svt::table virtual vcl::Window* GetWindowInstance() override; virtual sal_Int32 GetAccessibleControlCount() const override; virtual bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint ) override; - virtual tools::Long GetRowCount() const override; - virtual tools::Long GetColumnCount() const override; + virtual sal_Int32 GetRowCount() const override; + virtual sal_Int32 GetColumnCount() const override; virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ) override; virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar ) override; virtual tools::Rectangle calcHeaderCellRect( bool _bIsColumnBar, sal_Int32 nPos) override; diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 4737698d145c..f1b42d910075 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -824,7 +824,7 @@ OUString BrowseBox::GetColumnTitle( sal_uInt16 nId ) const return mvCols[ nItemPos ]->Title(); } -tools::Long BrowseBox::GetRowCount() const +sal_Int32 BrowseBox::GetRowCount() const { return nRowCount; } @@ -857,7 +857,7 @@ void BrowseBox::SetTitleLines( sal_uInt16 nLines ) nTitleLines = nLines; } -tools::Long BrowseBox::ScrollColumns( tools::Long nCols ) +sal_Int32 BrowseBox::ScrollColumns( sal_Int32 nCols ) { if ( nFirstCol + nCols < 0 || @@ -999,12 +999,12 @@ tools::Long BrowseBox::ScrollColumns( tools::Long nCols ) } -tools::Long BrowseBox::ScrollRows( tools::Long nRows ) +sal_Int32 BrowseBox::ScrollRows( sal_Int32 nRows ) { // compute new top row - tools::Long nTmpMin = std::min( static_cast<tools::Long>(nTopRow + nRows), static_cast<tools::Long>(nRowCount - 1) ); + sal_Int32 nTmpMin = std::min( static_cast<sal_Int32>(nTopRow + nRows), static_cast<sal_Int32>(nRowCount - 1) ); - tools::Long nNewTopRow = std::max<tools::Long>( nTmpMin, 0 ); + sal_Int32 nNewTopRow = std::max<sal_Int32>( nTmpMin, 0 ); if ( nNewTopRow == nTopRow ) return 0; @@ -1023,7 +1023,7 @@ tools::Long BrowseBox::ScrollRows( tools::Long nRows ) // scroll area on screen and/or repaint tools::Long nDeltaY = GetDataRowHeight() * ( nNewTopRow - nTopRow ); - tools::Long nOldTopRow = nTopRow; + sal_Int32 nOldTopRow = nTopRow; nTopRow = nNewTopRow; if ( GetUpdateMode() ) @@ -1050,7 +1050,7 @@ tools::Long BrowseBox::ScrollRows( tools::Long nRows ) } -void BrowseBox::RowModified( tools::Long nRow, sal_uInt16 nColId ) +void BrowseBox::RowModified( sal_Int32 nRow, sal_uInt16 nColId ) { if ( !GetUpdateMode() ) @@ -1075,7 +1075,7 @@ void BrowseBox::Clear() // adjust the total number of rows DoHideCursor( "Clear" ); - tools::Long nOldRowCount = nRowCount; + sal_Int32 nOldRowCount = nRowCount; nRowCount = 0; if(bMultiSelection) { @@ -1134,7 +1134,7 @@ void BrowseBox::Clear() ); } -void BrowseBox::RowInserted( tools::Long nRow, tools::Long nNumRows, bool bDoPaint, bool bKeepSelection ) +void BrowseBox::RowInserted( sal_Int32 nRow, sal_Int32 nNumRows, bool bDoPaint, bool bKeepSelection ) { if (nRow < 0) @@ -1152,7 +1152,7 @@ void BrowseBox::RowInserted( tools::Long nRow, tools::Long nNumRows, bool bDoPai DoHideCursor( "RowInserted" ); // must we paint the new rows? - tools::Long nOldCurRow = nCurRow; + sal_Int32 nOldCurRow = nCurRow; Size aSz = pDataWin->GetOutputSizePixel(); if ( bDoPaint && nRow >= nTopRow && nRow <= nTopRow + aSz.Height() / GetDataRowHeight() ) @@ -1241,7 +1241,7 @@ void BrowseBox::RowInserted( tools::Long nRow, tools::Long nNumRows, bool bDoPai } -void BrowseBox::RowRemoved( tools::Long nRow, tools::Long nNumRows, bool bDoPaint ) +void BrowseBox::RowRemoved( sal_Int32 nRow, sal_Int32 nNumRows, bool bDoPaint ) { if ( nRow < 0 ) @@ -1266,7 +1266,7 @@ void BrowseBox::RowRemoved( tools::Long nRow, tools::Long nNumRows, bool bDoPain // adjust total row count nRowCount -= nNumRows; if (nRowCount < 0) nRowCount = 0; - tools::Long nOldCurRow = nCurRow; + sal_Int32 nOldCurRow = nCurRow; // adjust the selection if ( bMultiSelection ) @@ -1412,16 +1412,15 @@ void BrowseBox::RowRemoved( tools::Long nRow, tools::Long nNumRows, bool bDoPain } -bool BrowseBox::GoToRow( tools::Long nRow) +bool BrowseBox::GoToRow( sal_Int32 nRow) { return GoToRow(nRow, false); } -bool BrowseBox::GoToRow( tools::Long nRow, bool bRowColMove, bool bKeepSelection ) +bool BrowseBox::GoToRow( sal_Int32 nRow, bool bRowColMove, bool bKeepSelection ) { - - tools::Long nOldCurRow = nCurRow; + sal_Int32 nOldCurRow = nCurRow; // nothing to do? if ( nRow == nCurRow && ( bMultiSelection || uRow.nSel == nRow ) ) @@ -1438,7 +1437,7 @@ bool BrowseBox::GoToRow( tools::Long nRow, bool bRowColMove, bool bKeepSelection // compute the last visible row Size aSz( pDataWin->GetSizePixel() ); sal_uInt16 nVisibleRows = sal_uInt16( aSz.Height() / GetDataRowHeight() - 1 ); - tools::Long nLastRow = nTopRow + nVisibleRows; + sal_Int32 nLastRow = nTopRow + nVisibleRows; // suspend Updates pDataWin->EnterUpdateLock(); @@ -1566,7 +1565,7 @@ bool BrowseBox::GoToColumnId( sal_uInt16 nColId, bool bMakeVisible, bool bRowCol } -bool BrowseBox::GoToRowColumnId( tools::Long nRow, sal_uInt16 nColId ) +bool BrowseBox::GoToRowColumnId( sal_Int32 nRow, sal_uInt16 nColId ) { // out of range? @@ -1659,7 +1658,7 @@ void BrowseBox::SelectAll() tools::Rectangle aHighlightRect; sal_uInt16 nVisibleRows = static_cast<sal_uInt16>(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1); - for ( tools::Long nRow = std::max<tools::Long>( nTopRow, uRow.pSel->FirstSelected() ); + for ( sal_Int32 nRow = std::max<sal_Int32>( nTopRow, uRow.pSel->FirstSelected() ); nRow != BROWSER_ENDOFSELECTION && nRow < nTopRow + nVisibleRows; nRow = uRow.pSel->NextSelected() ) aHighlightRect.Union( tools::Rectangle( @@ -1700,7 +1699,7 @@ void BrowseBox::SelectAll() } -void BrowseBox::SelectRow( tools::Long nRow, bool _bSelect, bool bExpand ) +void BrowseBox::SelectRow( sal_Int32 nRow, bool _bSelect, bool bExpand ) { if ( !bMultiSelection ) @@ -1772,7 +1771,7 @@ void BrowseBox::SelectRow( tools::Long nRow, bool _bSelect, bool bExpand ) } -tools::Long BrowseBox::GetSelectRowCount() const +sal_Int32 BrowseBox::GetSelectRowCount() const { return bMultiSelection ? uRow.pSel->GetSelectCount() : @@ -1853,34 +1852,34 @@ sal_uInt16 BrowseBox::GetSelectColumnCount() const } -tools::Long BrowseBox::FirstSelectedColumn( ) const +sal_Int32 BrowseBox::FirstSelectedColumn( ) const { return pColSel ? pColSel->FirstSelected() : BROWSER_ENDOFSELECTION; } -tools::Long BrowseBox::FirstSelectedRow() +sal_Int32 BrowseBox::FirstSelectedRow() { return bMultiSelection ? uRow.pSel->FirstSelected() : uRow.nSel; } -tools::Long BrowseBox::NextSelectedRow() +sal_Int32 BrowseBox::NextSelectedRow() { return bMultiSelection ? uRow.pSel->NextSelected() : BROWSER_ENDOFSELECTION; } -tools::Long BrowseBox::LastSelectedRow() +sal_Int32 BrowseBox::LastSelectedRow() { return bMultiSelection ? uRow.pSel->LastSelected() : uRow.nSel; } -bool BrowseBox::IsRowSelected( tools::Long nRow ) const +bool BrowseBox::IsRowSelected( sal_Int32 nRow ) const { return bMultiSelection ? uRow.pSel->IsSelected(nRow) : nRow == uRow.nSel; @@ -1897,7 +1896,7 @@ bool BrowseBox::IsColumnSelected( sal_uInt16 nColumnId ) const void BrowseBox::MakeFieldVisible ( - tools::Long nRow, // line number of the field (starting with 0) + sal_Int32 nRow, // line number of the field (starting with 0) sal_uInt16 nColId // column ID of the field ) @@ -1948,7 +1947,7 @@ void BrowseBox::MakeFieldVisible ScrollRows( nRow - nTopRow ); // positioned outside below? - tools::Long nBottomRow = nTopRow + GetVisibleRows(); + sal_Int32 nBottomRow = nTopRow + GetVisibleRows(); // decrement nBottomRow to make it the number of the last visible line // (count starts with 0!). // Example: BrowseBox contains exactly one entry. nBottomRow := 0 + 1 - 1 @@ -1961,7 +1960,7 @@ void BrowseBox::MakeFieldVisible } -bool BrowseBox::IsFieldVisible( tools::Long nRow, sal_uInt16 nColumnId, +bool BrowseBox::IsFieldVisible( sal_Int32 nRow, sal_uInt16 nColumnId, bool bCompletely ) const { @@ -1986,7 +1985,7 @@ bool BrowseBox::IsFieldVisible( tools::Long nRow, sal_uInt16 nColumnId, } -tools::Rectangle BrowseBox::GetFieldRectPixel( tools::Long nRow, sal_uInt16 nColumnId, +tools::Rectangle BrowseBox::GetFieldRectPixel( sal_Int32 nRow, sal_uInt16 nColumnId, bool bRelToBrowser) const { @@ -2007,7 +2006,7 @@ tools::Rectangle BrowseBox::GetFieldRectPixel( tools::Long nRow, sal_uInt16 nCol } -tools::Rectangle BrowseBox::GetRowRectPixel( tools::Long nRow ) const +tools::Rectangle BrowseBox::GetRowRectPixel( sal_Int32 nRow ) const { // get the rectangle relative to DataWin @@ -2031,7 +2030,7 @@ tools::Rectangle BrowseBox::GetRowRectPixel( tools::Long nRow ) const } -tools::Rectangle BrowseBox::ImplFieldRectPixel( tools::Long nRow, sal_uInt16 nColumnId ) const +tools::Rectangle BrowseBox::ImplFieldRectPixel( sal_Int32 nRow, sal_uInt16 nColumnId ) const { // compute the X-coordinate relative to DataWin by accumulation @@ -2061,7 +2060,7 @@ tools::Rectangle BrowseBox::ImplFieldRectPixel( tools::Long nRow, sal_uInt16 nCo } -tools::Long BrowseBox::GetRowAtYPosPixel( tools::Long nY, bool bRelToBrowser ) const +sal_Int32 BrowseBox::GetRowAtYPosPixel( tools::Long nY, bool bRelToBrowser ) const { // compute the Y-coordinate @@ -2238,7 +2237,7 @@ void BrowseBox::SetMode( BrowserMode nMode ) } -void BrowseBox::VisibleRowsChanged( tools::Long, sal_uInt16 ) +void BrowseBox::VisibleRowsChanged( sal_Int32, sal_uInt16 ) { // old behavior: automatically correct NumRows: @@ -2253,7 +2252,7 @@ void BrowseBox::VisibleRowsChanged( tools::Long, sal_uInt16 ) } -bool BrowseBox::IsCursorMoveAllowed( tools::Long, sal_uInt16 ) const +bool BrowseBox::IsCursorMoveAllowed( sal_Int32, sal_uInt16 ) const /* [Description] diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 268bfb262ca3..d2e9f4e04237 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -242,18 +242,18 @@ void BrowseBox::ToggleSelection() // accumulate areas of rows to highlight std::vector<tools::Rectangle> aHighlightList; - tools::Long nLastRowInRect = 0; // for the CFront + sal_Int32 nLastRowInRect = 0; // for the CFront // don't highlight handle column BrowserColumn *pFirstCol = mvCols.empty() ? nullptr : mvCols[ 0 ].get(); tools::Long nOfsX = (!pFirstCol || pFirstCol->GetId()) ? 0 : pFirstCol->Width(); // accumulate old row selection - tools::Long nBottomRow = nTopRow + + sal_Int32 nBottomRow = nTopRow + pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight(); if ( nBottomRow > GetRowCount() && GetRowCount() ) nBottomRow = GetRowCount(); - for ( tools::Long nRow = bMultiSelection ? uRow.pSel->FirstSelected() : uRow.nSel; + for ( sal_Int32 nRow = bMultiSelection ? uRow.pSel->FirstSelected() : uRow.nSel; nRow != BROWSER_ENDOFSELECTION && nRow <= nBottomRow; nRow = bMultiSelection ? uRow.pSel->NextSelected() : BROWSER_ENDOFSELECTION ) { @@ -1049,7 +1049,7 @@ void BrowseBox::UpdateScrollbars() nCornerSize = static_cast<sal_uLong>(nCornerSize * static_cast<double>(GetZoom())); bool bNeedsVScroll = false; - tools::Long nMaxRows = 0; + sal_Int32 nMaxRows = 0; if (GetDataRowHeight()) { // needs VScroll? @@ -1134,7 +1134,7 @@ void BrowseBox::UpdateScrollbars() if ( pVScroll->GetThumbPos() != nTopRow ) pVScroll->SetThumbPos( nTopRow ); - tools::Long nVisibleSize = std::min( std::min( nRowCount, nMaxRows ), tools::Long(nRowCount-nTopRow) ); + tools::Long nVisibleSize = std::min( std::min( nRowCount, nMaxRows ), (nRowCount-nTopRow) ); pVScroll->SetVisibleSize( nVisibleSize ? nVisibleSize : 1 ); pVScroll->SetRange( Range( 0, nRowCount ) ); pVScroll->SetPosSizePixel( @@ -1712,7 +1712,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId ) if ( GetRowCount() ) { DoHideCursor( "BROWSER_SELECTHOME" ); - for ( tools::Long nRow = GetCurRow(); nRow >= 0; --nRow ) + for ( sal_Int32 nRow = GetCurRow(); nRow >= 0; --nRow ) SelectRow( nRow ); GoToRow( 0, true ); DoShowCursor( "BROWSER_SELECTHOME" ); @@ -1722,8 +1722,8 @@ void BrowseBox::Dispatch( sal_uInt16 nId ) if ( GetRowCount() ) { DoHideCursor( "BROWSER_SELECTEND" ); - tools::Long nRows = GetRowCount(); - for ( tools::Long nRow = GetCurRow(); nRow < nRows; ++nRow ) + sal_Int32 nRows = GetRowCount(); + for ( sal_Int32 nRow = GetCurRow(); nRow < nRows; ++nRow ) SelectRow( nRow ); GoToRow( GetRowCount() - 1, true ); DoShowCursor( "BROWSER_SELECTEND" ); @@ -1735,7 +1735,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId ) { // deselect the current row, if it isn't the first // and there is no other selected row above - tools::Long nRow = GetCurRow(); + sal_Int32 nRow = GetCurRow(); bool bLocalSelect = ( !IsRowSelected( nRow ) || GetSelectRowCount() == 1 || IsRowSelected( nRow - 1 ) ); SelectRow( nRow, bLocalSelect ); @@ -1752,7 +1752,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId ) { // deselect the current row, if it isn't the first // and there is no other selected row under - tools::Long nRow = GetCurRow(); + sal_Int32 nRow = GetCurRow(); bool bLocalSelect = ( !IsRowSelected( nRow ) || GetSelectRowCount() == 1 || IsRowSelected( nRow + 1 ) ); SelectRow( nCurRow, bLocalSelect ); diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index 9227c0f8570a..46f2d4f8d97c 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -236,7 +236,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::vcl::AccessibleBrowseBoxObjType e aRetText = "TableCell"; #if OSL_DEBUG_LEVEL > 0 aRetText += " [" - + OUString::number(sal_Int32(GetCurRow())) + + OUString::number(GetCurRow()) + "," + OUString::number(sal_Int32(GetCurColumnId())) + "]"; @@ -249,7 +249,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::vcl::AccessibleBrowseBoxObjType e } #if OSL_DEBUG_LEVEL > 0 aRetText += " [" - + OUString::number(sal_Int32(GetCurRow())) + + OUString::number(GetCurRow()) + "," + OUString::number(sal_Int32(GetCurColumnId())) + "]"; @@ -259,7 +259,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::vcl::AccessibleBrowseBoxObjType e aRetText = GetColumnDescription( sal_Int16( _nPosition ) ); #if OSL_DEBUG_LEVEL > 0 aRetText += " [" - + OUString::number(sal_Int32(GetCurRow())) + + OUString::number(GetCurRow()) + "," + OUString::number(sal_Int32(GetCurColumnId())) + "]"; @@ -395,7 +395,7 @@ void BrowseBox::GrabTableFocus() GrabFocus(); } -OUString BrowseBox::GetCellText(tools::Long, sal_uInt16 ) const +OUString BrowseBox::GetCellText(sal_Int32, sal_uInt16 ) const { SAL_WARN("svtools", "This method has to be implemented by the derived classes! BUG!!"); return OUString(); @@ -459,7 +459,7 @@ void BrowseBox::SelectColumn( sal_uInt16 _nColumn, bool _bSelect ) SelectColumnPos( _nColumn, _bSelect ); } -bool BrowseBox::IsColumnSelected( tools::Long _nColumn ) const +bool BrowseBox::IsColumnSelected( sal_Int32 _nColumn ) const { return ( pColSel && (0 <= _nColumn) && (_nColumn <= 0xFFF) ) && pColSel->IsSelected( static_cast< sal_uInt16 >( _nColumn ) ); @@ -520,7 +520,7 @@ bool BrowseBox::IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const return IsFieldVisible( _nRow, GetColumnId( _nColumnPos ) ); } -OUString BrowseBox::GetAccessibleCellText(tools::Long _nRow, sal_uInt16 _nColPos) const +OUString BrowseBox::GetAccessibleCellText(sal_Int32 _nRow, sal_uInt16 _nColPos) const { return GetCellText( _nRow, GetColumnId( _nColPos ) ); } diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index f4cc3a7ce65c..fd1e12a0d46d 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -298,10 +298,10 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel ) BrowseBox *pBox = GetParent(); // seek to row under mouse - tools::Long nRelRow = rPosPixel.Y() < 0 + sal_Int32 nRelRow = rPosPixel.Y() < 0 ? -1 : rPosPixel.Y() / pBox->GetDataRowHeight(); - tools::Long nRow = nRelRow < 0 ? -1 : nRelRow + pBox->nTopRow; + sal_Int32 nRow = nRelRow < 0 ? -1 : nRelRow + pBox->nTopRow; // find column under mouse tools::Long nMouseX = rPosPixel.X(); @@ -376,7 +376,7 @@ void BrowserDataWin::Command( const CommandEvent& rEvt ) return; Point aEventPos( rEvt.GetMousePosPixel() ); - tools::Long nRow = pBox->GetRowAtYPosPixel( aEventPos.Y(), false); + sal_Int32 nRow = pBox->GetRowAtYPosPixel( aEventPos.Y(), false); MouseEvent aMouseEvt( aEventPos, 1, MouseEventModifiers::SELECT, MOUSE_LEFT ); if ( CommandEventId::ContextMenu == rEvt.GetCommand() && rEvt.IsMouseEvent() && nRow < pBox->GetRowCount() && !pBox->IsRowSelected(nRow) ) @@ -574,7 +574,7 @@ void BrowserDataWin::RequestHelp( const HelpEvent& rHEvt ) BrowseEvent::BrowseEvent( vcl::Window* pWindow, - tools::Long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId, + sal_Int32 nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId, const tools::Rectangle& rRect ): pWin(pWindow), nRow(nAbsRow), @@ -594,7 +594,7 @@ BrowserMouseEvent::BrowserMouseEvent( BrowserDataWin *pWindow, BrowserMouseEvent::BrowserMouseEvent( vcl::Window *pWindow, const MouseEvent& rEvt, - tools::Long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId, + sal_Int32 nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId, const tools::Rectangle& rRect ): MouseEvent(rEvt), BrowseEvent( pWindow, nAbsRow, nColumn, nColumnId, rRect ) diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 1c451fa95943..4c2559ea2742 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -196,7 +196,7 @@ namespace svt } - bool EditBrowseBox::SeekRow(tools::Long nRow) + bool EditBrowseBox::SeekRow(sal_Int32 nRow) { nPaintRow = nRow; return true; @@ -364,7 +364,7 @@ namespace svt } - EditBrowseBox::RowStatus EditBrowseBox::GetRowStatus(tools::Long) const + EditBrowseBox::RowStatus EditBrowseBox::GetRowStatus(sal_Int32) const { return CLEAN; } @@ -770,7 +770,7 @@ namespace svt } - bool EditBrowseBox::IsCursorMoveAllowed(tools::Long nNewRow, sal_uInt16 nNewColId) const + bool EditBrowseBox::IsCursorMoveAllowed(sal_Int32 nNewRow, sal_uInt16 nNewColId) const { sal_uInt16 nInfo = 0; @@ -874,7 +874,7 @@ namespace svt } - bool EditBrowseBox::CursorMoving(tools::Long, sal_uInt16) + bool EditBrowseBox::CursorMoving(sal_Int32, sal_uInt16) { DeactivateCell(false); return true; @@ -883,7 +883,7 @@ namespace svt void EditBrowseBox::CursorMoved() { - tools::Long nNewRow = GetCurRow(); + sal_Int32 nNewRow = GetCurRow(); if (nEditRow != nNewRow) { if (!(GetBrowserFlags() & EditBrowseBoxFlags::NO_HANDLE_COLUMN_CONTENT)) @@ -909,7 +909,7 @@ namespace svt } - void EditBrowseBox::ActivateCell(tools::Long nRow, sal_uInt16 nCol, bool bCellFocus) + void EditBrowseBox::ActivateCell(sal_Int32 nRow, sal_uInt16 nCol, bool bCellFocus) { if (IsEditing()) return; @@ -992,7 +992,7 @@ namespace svt } - tools::Rectangle EditBrowseBox::GetCellRect(tools::Long nRow, sal_uInt16 nColId, bool bRel) const + tools::Rectangle EditBrowseBox::GetCellRect(sal_Int32 nRow, sal_uInt16 nColId, bool bRel) const { tools::Rectangle aRect( GetFieldRectPixel(nRow, nColId, bRel)); if ((GetMode() & BrowserMode::CURSOR_WO_FOCUS) == BrowserMode::CURSOR_WO_FOCUS) @@ -1102,7 +1102,7 @@ namespace svt { } - CellController* EditBrowseBox::GetController(tools::Long, sal_uInt16) + CellController* EditBrowseBox::GetController(sal_Int32, sal_uInt16) { return nullptr; } @@ -1122,7 +1122,7 @@ namespace svt rControl.SetPosSizePixel(aPoint, aSize); } - void EditBrowseBox::InitController(CellControllerRef&, tools::Long, sal_uInt16) + void EditBrowseBox::InitController(CellControllerRef&, sal_Int32, sal_uInt16) { } @@ -1152,8 +1152,8 @@ namespace svt sal_uInt32 nCurColWidth = GetColumnWidth(nColId); sal_uInt32 nMinColWidth = CalcZoom(20); // minimum sal_uInt32 nNewColWidth = nMinColWidth; - tools::Long nMaxRows = std::min(tools::Long(GetVisibleRows()), GetRowCount()); - tools::Long nLastVisRow = GetTopRow() + nMaxRows - 1; + sal_Int32 nMaxRows = std::min(sal_Int32(GetVisibleRows()), GetRowCount()); + sal_Int32 nLastVisRow = GetTopRow() + nMaxRows - 1; if (GetTopRow() <= nLastVisRow) // calc the column with using the cell contents { @@ -1168,7 +1168,7 @@ namespace svt return nNewColWidth; } - sal_uInt32 EditBrowseBox::GetTotalCellWidth(tools::Long, sal_uInt16) + sal_uInt32 EditBrowseBox::GetTotalCellWidth(sal_Int32, sal_uInt16) { return 0; } diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx index fece6c6dc0a0..3bc8dc8f5b4c 100644 --- a/svtools/source/brwbox/editbrowsebox2.cxx +++ b/svtools/source/brwbox/editbrowsebox2.cxx @@ -35,7 +35,7 @@ namespace svt using namespace ::com::sun::star::accessibility::AccessibleEventId; -Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(tools::Long _nRow, sal_uInt16 _nColumnPos,const TriState& eState) +Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(sal_Int32 _nRow, sal_uInt16 _nColumnPos,const TriState& eState) { Reference< XAccessible > xAccessible( GetAccessible() ); Reference< XAccessibleContext > xAccContext; @@ -143,7 +143,7 @@ void EditBrowseBox::DetermineFocus( const GetFocusFlags _nGetFocusFlags ) ) return; - tools::Long nRows = GetRowCount(); + sal_Int32 nRows = GetRowCount(); sal_uInt16 nCols = ColCount(); if (( nRows <= 0 ) || ( nCols <= 0 )) diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 2655843b3339..433535a07e1e 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -540,13 +540,13 @@ namespace svt::table } - tools::Long TableControl::GetRowCount() const + sal_Int32 TableControl::GetRowCount() const { return GetModel()->getRowCount(); } - tools::Long TableControl::GetColumnCount() const + sal_Int32 TableControl::GetColumnCount() const { return GetModel()->getColumnCount(); } |