summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorsahil <gautamsahil1947@gmail.com>2023-08-23 22:03:34 +0530
committerHossein <hossein@libreoffice.org>2023-10-25 11:27:28 +0200
commite558cbed9b350f2e6cbe948d648471499e0deffc (patch)
tree81c088e6771aaaa817e34c8d226900218785bcee /include/vcl
parent0c50fe53acbd0ee98e93d52e9967f94543301473 (diff)
tdf#114441 - Convert use of sal_uLong to better integer types
nUpdateInterval (sal_uLong --> sal_uInt64) because it is passed as argument to Timer::SetTimeout function that takes a sal_uInt64 func CalcUpdateInterval (sal_uLong --> sal_uInt64 return type) because this function is only being called once, and in that call, the return value is passed to a function which takes sal_uInt64 type int. line 412 (https://opengrok.libreoffice.org/xref/core/sc/source/ui/view/select.cxx?r=b6b26421#412) two lines after which it is passed to a function ... and the function changed in vcl/source/window/seleng.cxx is the one to which the value of nUpdateInterval is being passed as explained in the lines above. Change-Id: I73441c2d3520a222ddb39b8c0c205b4dd61d4751 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156015 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/seleng.hxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/vcl/seleng.hxx b/include/vcl/seleng.hxx
index 580ae74177bf..a0f069e04c1e 100644
--- a/include/vcl/seleng.hxx
+++ b/include/vcl/seleng.hxx
@@ -33,10 +33,10 @@ namespace vcl {
}
// Timerticks
-#define SELENG_DRAGDROP_TIMEOUT 400
-#define SELENG_AUTOREPEAT_INTERVAL 50
-#define SELENG_AUTOREPEAT_INTERVAL_MIN 25
-#define SELENG_AUTOREPEAT_INTERVAL_MAX 300
+constexpr sal_uInt64 SELENG_DRAGDROP_TIMEOUT = 400;
+constexpr sal_uInt64 SELENG_AUTOREPEAT_INTERVAL = 50;
+constexpr sal_uInt64 SELENG_AUTOREPEAT_INTERVAL_MIN = 25;
+constexpr sal_uInt64 SELENG_AUTOREPEAT_INTERVAL_MAX = 300;
class VCL_DLLPUBLIC FunctionSet
{
@@ -84,7 +84,7 @@ private:
Timer aWTimer; // generate fake mouse moves
MouseEvent aLastMove;
SelectionMode eSelMode;
- sal_uLong nUpdateInterval;
+ sal_uInt64 nUpdateInterval;
sal_uInt16 nLockedMods;
SelectionEngineFlags nFlags;
DECL_DLLPRIVATE_LINK( ImpWatchDog, Timer*, void );
@@ -159,7 +159,7 @@ public:
bool HasAnchor() const;
void SetAnchor( bool bAnchor );
- void SetUpdateInterval( sal_uLong nInterval );
+ void SetUpdateInterval( sal_uInt64 nInterval );
// is switched on in the Ctor
void ExpandSelectionOnMouseMove( bool bExpand = true )