tdf#96505 Get rid of cargo cult "long" integer literals
Change-Id: Ic1602a57d1662cb30b2339de9eeb6483fdfbef37 Reviewed-on: https://gerrit.libreoffice.org/29242 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
This commit is contained in:
parent
7b8832ff97
commit
dad35b0463
@ -441,15 +441,15 @@ void ColorFieldControl::ShowPosition( const Point& rPos, bool bUpdate )
|
|||||||
|
|
||||||
long nX = rPos.X();
|
long nX = rPos.X();
|
||||||
long nY = rPos.Y();
|
long nY = rPos.Y();
|
||||||
if (nX < 0L)
|
if (nX < 0)
|
||||||
nX = 0L;
|
nX = 0;
|
||||||
else if (nX >= aSize.Width())
|
else if (nX >= aSize.Width())
|
||||||
nX = aSize.Width() - 1L;
|
nX = aSize.Width() - 1;
|
||||||
|
|
||||||
if (nY < 0L)
|
if (nY < 0)
|
||||||
nY = 0L;
|
nY = 0;
|
||||||
else if (nY >= aSize.Height())
|
else if (nY >= aSize.Height())
|
||||||
nY = aSize.Height() - 1L;
|
nY = aSize.Height() - 1;
|
||||||
|
|
||||||
Point aPos = maPosition;
|
Point aPos = maPosition;
|
||||||
maPosition.X() = nX - 5;
|
maPosition.X() = nX - 5;
|
||||||
@ -765,7 +765,7 @@ void ColorSliderControl::ChangePosition(long nY)
|
|||||||
{
|
{
|
||||||
const long nHeight = GetOutputSizePixel().Height() - 1;
|
const long nHeight = GetOutputSizePixel().Height() - 1;
|
||||||
|
|
||||||
if (nY < 0L)
|
if (nY < 0)
|
||||||
nY = 0;
|
nY = 0;
|
||||||
else if (nY > nHeight)
|
else if (nY > nHeight)
|
||||||
nY = nHeight;
|
nY = nHeight;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user