From b225980d2d65694278c9ed89512fbe21b08febd6 Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 19 Oct 2020 15:17:25 +0200 Subject: use tools::Long in sc Change-Id: I8f37a8d1174ed816df971b8cee036d4e88d4a7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104526 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/view/tabview5.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sc/source/ui/view/tabview5.cxx') diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index b5ed82510dba..73727a0f13d4 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -549,7 +549,7 @@ void ScTabView::MakeVisible( const tools::Rectangle& rHMMRect ) tools::Rectangle aRect = pWin->LogicToPixel( rHMMRect ); - long nScrollX=0, nScrollY=0; // pixel + tools::Long nScrollX=0, nScrollY=0; // pixel if ( aRect.Right() >= aWinSize.Width() ) // right out { @@ -582,12 +582,12 @@ void ScTabView::MakeVisible( const tools::Rectangle& rHMMRect ) SCCOL nPosX = aViewData.GetPosX(WhichH(eWhich)); SCROW nPosY = aViewData.GetPosY(WhichV(eWhich)); - long nLinesX=0, nLinesY=0; // columns/rows - scroll at least nScrollX/Y + tools::Long nLinesX=0, nLinesY=0; // columns/rows - scroll at least nScrollX/Y if (nScrollX > 0) while (nScrollX > 0 && nPosX < rDoc.MaxCol()) { - nScrollX -= static_cast( rDoc.GetColWidth(nPosX, nTab) * nPPTX ); + nScrollX -= static_cast( rDoc.GetColWidth(nPosX, nTab) * nPPTX ); ++nPosX; ++nLinesX; } @@ -595,14 +595,14 @@ void ScTabView::MakeVisible( const tools::Rectangle& rHMMRect ) while (nScrollX < 0 && nPosX > 0) { --nPosX; - nScrollX += static_cast( rDoc.GetColWidth(nPosX, nTab) * nPPTX ); + nScrollX += static_cast( rDoc.GetColWidth(nPosX, nTab) * nPPTX ); --nLinesX; } if (nScrollY > 0) while (nScrollY > 0 && nPosY < rDoc.MaxRow()) { - nScrollY -= static_cast( rDoc.GetRowHeight(nPosY, nTab) * nPPTY ); + nScrollY -= static_cast( rDoc.GetRowHeight(nPosY, nTab) * nPPTY ); ++nPosY; ++nLinesY; } @@ -610,7 +610,7 @@ void ScTabView::MakeVisible( const tools::Rectangle& rHMMRect ) while (nScrollY < 0 && nPosY > 0) { --nPosY; - nScrollY += static_cast( rDoc.GetRowHeight(nPosY, nTab) * nPPTY ); + nScrollY += static_cast( rDoc.GetRowHeight(nPosY, nTab) * nPPTY ); --nLinesY; } -- cgit