summaryrefslogtreecommitdiff
path: root/basctl/source
diff options
context:
space:
mode:
authorAman Jha <amanjha752001@gmail.com>2023-01-09 19:34:40 +0530
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2023-05-02 12:30:27 +0200
commit53c641702a280be8b80976301f3427b41d2e0b74 (patch)
tree2d2f864116ee886f9b4c5514f5596adde7903870 /basctl/source
parentdbcf188d39ff70ac87312dd28444df97e3cea993 (diff)
tdf#114441 Convert sal_uLong to better integer types
* Use tools::Long for nY as it stores calculations with result values that can be sometimes negative * Cast nLine to sal_uInt16 as rModulWindow.ToggleBreakPoint() takes parameter of type sal_uInt16 Change-Id: Ibfdee40f37714406ee0f089c9a87f8b9a650e492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145210 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Diffstat (limited to 'basctl/source')
-rw-r--r--basctl/source/basicide/baside2b.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index a82cf2ae4e4b..cf7e7388dd52 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1476,7 +1476,7 @@ void BreakPointWindow::ShowMarker(vcl::RenderContext& rRenderContext)
aMarkerOff.setX( (aOutSz.Width() - aMarkerSz.Width()) / 2 );
aMarkerOff.setY( (nLineHeight - aMarkerSz.Height()) / 2 );
- sal_uLong nY = nMarkerPos * nLineHeight - nCurYOffset;
+ tools::Long nY = nMarkerPos * nLineHeight - nCurYOffset;
Point aPos(0, nY);
aPos += aMarkerOff;
@@ -1531,7 +1531,7 @@ void BreakPointWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
tools::Long nYPos = aMousePos.Y() + nCurYOffset;
tools::Long nLine = nYPos / nLineHeight + 1;
- rModulWindow.ToggleBreakPoint( static_cast<sal_uLong>(nLine) );
+ rModulWindow.ToggleBreakPoint( static_cast<sal_uInt16>(nLine) );
Invalidate();
}
}