summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorDeepanshu Sharma <129deepanshusharma@gmail.com>2024-09-30 14:08:45 +0530
committerHossein <hossein@libreoffice.org>2024-10-14 16:36:54 +0200
commit1b648b3705039cf8f708e57f1c91910cfe73b25b (patch)
treebd009121e057fcea264f1b59717e6a252383a34d /svtools
parent9790e2275384f6687aab9c5a7b4fc3b6ff5df981 (diff)
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 <hossein@libreoffice.org>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/brwbox/brwbox2.cxx30
-rw-r--r--svtools/source/misc/openfiledroptargetlistener.cxx2
2 files changed, 16 insertions, 16 deletions
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<sal_uLong>(nSBHeight * static_cast<double>(GetZoom()));
- nSBWidth = static_cast<sal_uLong>(nSBWidth * static_cast<double>(GetZoom()));
+ nSBHeight = static_cast<tools::Long>(nSBHeight * static_cast<double>(GetZoom()));
+ nSBWidth = static_cast<tools::Long>(nSBWidth * static_cast<double>(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<sal_uLong>(_rRect.Top()) / nDataRowHeight);
- nRelBottomRow = static_cast<sal_uLong>(_rRect.Bottom()) / nDataRowHeight;
+ nRelTopRow = static_cast<sal_Int32>((_rRect.Top()) / nDataRowHeight);
+ nRelBottomRow = static_cast<sal_Int32>((_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<sal_uLong>(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<sal_uLong>(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<sal_uLong>(m_nCornerHeight * static_cast<double>(GetZoom()));
- m_nCornerWidth = static_cast<sal_uLong>(m_nCornerWidth * static_cast<double>(GetZoom()));
+ m_nCornerHeight = static_cast<tools::Long>(m_nCornerHeight * static_cast<double>(GetZoom()));
+ m_nCornerWidth = static_cast<tools::Long>(m_nCornerWidth * static_cast<double>(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;