From 1b648b3705039cf8f708e57f1c91910cfe73b25b Mon Sep 17 00:00:00 2001 From: Deepanshu Sharma <129deepanshusharma@gmail.com> Date: Mon, 30 Sep 2024 14:08:45 +0530 Subject: tdf#114441 change the sal_uLong to tools::Long and sal_Int32 in svtools Change-Id: I1f5e2233b34e115723f3c1b49b7f0f982e16cfcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174264 Tested-by: Jenkins Reviewed-by: Hossein --- svtools/source/brwbox/brwbox2.cxx | 30 +++++++++++----------- svtools/source/misc/openfiledroptargetlistener.cxx | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'svtools') diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 3d3d2f36ba05..0b6c622d4905 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -478,12 +478,12 @@ void BrowseBox::Resize() pDataWin->bResizeOnPaint = false; // calc the size of the scrollbars - sal_uLong nSBHeight = GetBarHeight(); - sal_uLong nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize(); + tools::Long nSBHeight = GetBarHeight(); + tools::Long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize(); if (IsZoom()) { - nSBHeight = static_cast(nSBHeight * static_cast(GetZoom())); - nSBWidth = static_cast(nSBWidth * static_cast(GetZoom())); + nSBHeight = static_cast(nSBHeight * static_cast(GetZoom())); + nSBWidth = static_cast(nSBWidth * static_cast(GetZoom())); } DoHideCursor(); @@ -800,12 +800,12 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const tools::Rectangle& _rRec tools::Long nDataRowHeight = GetDataRowHeight(); // compute relative rows to redraw - sal_uLong nRelTopRow = 0; - sal_uLong nRelBottomRow = aOverallAreaSize.Height(); + sal_Int32 nRelTopRow = 0; + sal_Int32 nRelBottomRow = aOverallAreaSize.Height(); if (!_bForeignDevice && nDataRowHeight) { - nRelTopRow = (static_cast(_rRect.Top()) / nDataRowHeight); - nRelBottomRow = static_cast(_rRect.Bottom()) / nDataRowHeight; + nRelTopRow = static_cast((_rRect.Top()) / nDataRowHeight); + nRelBottomRow = static_cast((_rRect.Bottom()) / nDataRowHeight); } // cache frequently used values @@ -824,8 +824,8 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const tools::Rectangle& _rRec Color aDelimiterLineColor( ::svtools::ColorConfig().GetColorValue( ::svtools::CALCGRID ).nColor ); // redraw the invalid fields - for ( sal_uLong nRelRow = nRelTopRow; - nRelRow <= nRelBottomRow && static_cast(nTopRow)+nRelRow < o3tl::make_unsigned(nRowCount); + for ( sal_Int32 nRelRow = nRelTopRow; + nRelRow <= nRelBottomRow && nTopRow+nRelRow < nRowCount; ++nRelRow, aPos.AdjustY(nDataRowHeight ) ) { // get row @@ -835,7 +835,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const tools::Rectangle& _rRec continue; // prepare row - sal_uLong nRow = nTopRow+nRelRow; + sal_Int32 nRow = nTopRow+nRelRow; if ( !SeekRow( nRow) ) { OSL_FAIL("BrowseBox::ImplPaintData: SeekRow failed"); } @@ -897,7 +897,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const tools::Rectangle& _rRec _rOut.DrawRect( aFieldRect ); } - if (!m_bFocusOnlyCursor && (pCol->GetId() == GetCurColumnId()) && (nRow == static_cast(GetCurRow()))) + if (!m_bFocusOnlyCursor && (pCol->GetId() == GetCurColumnId()) && (nRow == GetCurRow())) DrawCursor(); // draw a single field. @@ -1067,8 +1067,8 @@ void BrowseBox::UpdateScrollbars() m_nCornerWidth = GetSettings().GetStyleSettings().GetScrollBarSize(); if (IsZoom()) { - m_nCornerHeight = static_cast(m_nCornerHeight * static_cast(GetZoom())); - m_nCornerWidth = static_cast(m_nCornerWidth * static_cast(GetZoom())); + m_nCornerHeight = static_cast(m_nCornerHeight * static_cast(GetZoom())); + m_nCornerWidth = static_cast(m_nCornerWidth * static_cast(GetZoom())); } bool bNeedsVScroll = false; @@ -1100,7 +1100,7 @@ void BrowseBox::UpdateScrollbars() } // needs HScroll? - sal_uLong nLastCol = GetColumnAtXPosPixel( aDataWinSize.Width() - 1 ); + sal_uInt16 nLastCol = GetColumnAtXPosPixel( aDataWinSize.Width() - 1 ); sal_uInt16 nFrozenCols = FrozenColCount(); bool bNeedsHScroll = pDataWin->bAutoHScroll diff --git a/svtools/source/misc/openfiledroptargetlistener.cxx b/svtools/source/misc/openfiledroptargetlistener.cxx index 516636c564b5..4d4528a39e81 100644 --- a/svtools/source/misc/openfiledroptargetlistener.cxx +++ b/svtools/source/misc/openfiledroptargetlistener.cxx @@ -71,7 +71,7 @@ void SAL_CALL OpenFileDropTargetListener::drop( const css::datatransfer::dnd::Dr // at first check filelist format if ( aHelper.GetFileList( SotClipboardFormatId::FILE_LIST, aFileList ) ) { - sal_uLong i, nCount = aFileList.Count(); + size_t i, nCount = aFileList.Count(); for ( i = 0; i < nCount; ++i ) implts_OpenFile( aFileList.GetFile(i) ); bFormatFound = true; -- cgit v1.2.3