diff options
-rw-r--r-- | include/vcl/seleng.hxx | 12 | ||||
-rw-r--r-- | sc/source/ui/inc/select.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/select.cxx | 12 | ||||
-rw-r--r-- | vcl/source/window/seleng.cxx | 2 |
4 files changed, 14 insertions, 14 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 ) diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx index e1223f91e793..299463afddd2 100644 --- a/sc/source/ui/inc/select.hxx +++ b/sc/source/ui/inc/select.hxx @@ -49,7 +49,7 @@ private: ScSplitPos GetWhich() const; - sal_uLong CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos, + sal_uInt64 CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos, bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll ); public: diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index 961f511131ba..d972c9b4eb8d 100644 --- a/sc/source/ui/view/select.cxx +++ b/sc/source/ui/view/select.cxx @@ -60,10 +60,10 @@ ScSplitPos ScViewFunctionSet::GetWhich() const return m_pViewData->GetActivePart(); } -sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos, +sal_uInt64 ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos, bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll ) { - sal_uLong nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX; + sal_uInt64 nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX; vcl::Window* pWin = m_pEngine->GetWindow(); AbsoluteScreenPixelRectangle aScrRect = pWin->GetDesktopRectPixel(); AbsoluteScreenPixelPoint aRootPos = pWin->OutputToAbsoluteScreenPixel(Point(0,0)); @@ -77,7 +77,7 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Poi if (nHAccelRate > 1.0) nHAccelRate = 1.0; - nUpdateInterval = static_cast<sal_uLong>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate)); + nUpdateInterval = SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nHAccelRate); } if (bLeftScroll) @@ -104,7 +104,7 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Poi if (nVAccelRate > 1.0) nVAccelRate = 1.0; - sal_uLong nTmp = static_cast<sal_uLong>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate)); + sal_uInt64 nTmp = SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate); if (nUpdateInterval > nTmp) nUpdateInterval = nTmp; } @@ -118,7 +118,7 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Poi if (nVAccelRate > 1.0) nVAccelRate = 1.0; - sal_uLong nTmp = static_cast<sal_uLong>(SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate)); + sal_uInt64 nTmp = SELENG_AUTOREPEAT_INTERVAL_MAX*(1.0 - nVAccelRate); if (nUpdateInterval > nTmp) nUpdateInterval = nTmp; } @@ -409,7 +409,7 @@ void ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDon if (bScroll) { // Adjust update interval based on how far the mouse pointer is from the edge. - sal_uLong nUpdateInterval = CalcUpdateInterval( + sal_uInt64 nUpdateInterval = CalcUpdateInterval( aWinSize, aEffPos, bLeftScroll, bTopScroll, bRightScroll, bBottomScroll); m_pEngine->SetUpdateInterval(nUpdateInterval); } diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index 9cb70cf99d83..a22ecaa7c5dd 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -395,7 +395,7 @@ bool SelectionEngine::Command( const CommandEvent& rCEvt ) return true; } -void SelectionEngine::SetUpdateInterval( sal_uLong nInterval ) +void SelectionEngine::SetUpdateInterval( sal_uInt64 nInterval ) { if (nInterval < SELENG_AUTOREPEAT_INTERVAL_MIN) // Set a lower threshold. On Windows, setting this value too low |