diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-09 14:27:30 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-09 18:57:00 +0000 |
commit | 91b914882948c6acbb2dd6442083b8c6ccd9cf17 (patch) | |
tree | f0fd12aff18c9918b0fcd6adce52caf4ba9091a7 | |
parent | d6398719abecfca60db37637490e602222992dc2 (diff) |
Change tools::Time::GetSystemTicks to sal_uInt64
...as follow-up clean-up after 71fefe1dc2bcda3a4cc18d71e1acaf161cc059f2 "Change
'blink times' to be of type sal_uInt64 and thus consistent with
Timer::Get/SetTimeout since 9c7016b5b530ca212b1275f44f9e2fc0527109ee 'Scheduler:
Changed uLong to uInt32/uInt64.'"
Transitively meant to change quite a number of further time-related places from
sal_uLong/sal_uIntPtr to consistently use sal_uInt64.
Change-Id: I38eb493943906356138bf58eb098d2f54a3dee34
Reviewed-on: https://gerrit.libreoffice.org/15214
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
29 files changed, 68 insertions, 67 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 59cbae5769bf..76e80d21dadc 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -517,7 +517,7 @@ void ChartController::startDoubleClickWaiting() m_bWaitingForDoubleClick = true; - sal_uLong nDblClkTime = 500; + sal_uInt64 nDblClkTime = 500; if( m_pChartWindow ) { const MouseSettings& rMSettings = m_pChartWindow->GetSettings().GetMouseSettings(); diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx index d9a858907a82..7e5dc03e90ad 100644 --- a/include/svtools/tabbar.hxx +++ b/include/svtools/tabbar.hxx @@ -325,7 +325,7 @@ private: long mnOffY; long mnLastOffX; long mnSplitSize; - sal_uLong mnSwitchTime; + sal_uInt64 mnSwitchTime; WinBits mnWinStyle; sal_uInt16 mnCurPageId; sal_uInt16 mnFirstPos; diff --git a/include/tools/time.hxx b/include/tools/time.hxx index 1ece6c4c209a..2b950b860ee9 100644 --- a/include/tools/time.hxx +++ b/include/tools/time.hxx @@ -123,7 +123,7 @@ public: { return (nTime <= rTime.nTime); } static Time GetUTCOffset(); - static sal_uIntPtr GetSystemTicks(); // Elapsed time + static sal_uInt64 GetSystemTicks(); // Elapsed time void ConvertToUTC() { *this -= Time::GetUTCOffset(); } void ConvertToLocalTime() { *this += Time::GetUTCOffset(); } diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index 1b41ed2a7a2b..1775e095874a 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -80,8 +80,8 @@ public: void SetOptions( sal_uLong nOptions ); sal_uLong GetOptions() const; - void SetDoubleClickTime( sal_uLong nDoubleClkTime ); - sal_uLong GetDoubleClickTime() const; + void SetDoubleClickTime( sal_uInt64 nDoubleClkTime ); + sal_uInt64 GetDoubleClickTime() const; void SetDoubleClickWidth( long nDoubleClkWidth ); long GetDoubleClickWidth() const; diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 3ef9677dad82..720bf7eeeecf 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -652,7 +652,7 @@ public: @see AnyInput */ - static sal_uLong GetLastInputInterval(); + static sal_uInt64 GetLastInputInterval(); ///@} diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 74756f598f79..dc023bb7ad21 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -462,7 +462,7 @@ class IdleCalcTextWidthScope ScDocument& mrDoc; ScAddress& mrCalcPos; MapMode maOldMapMode; - sal_uLong mnStartTime; + sal_uInt64 mnStartTime; ScStyleSheetPool* mpStylePool; sal_uInt16 mnOldSearchMask; SfxStyleFamily meOldFamily; @@ -517,7 +517,7 @@ public: void setNeedMore(bool b) { mbNeedMore = b; } bool getNeedMore() const { return mbNeedMore; } - sal_uLong getStartTime() const { return mnStartTime; } + sal_uInt64 getStartTime() const { return mnStartTime; } void createProgressBar() { diff --git a/sc/workben/test.cxx b/sc/workben/test.cxx index a16cdd65f802..3d36f50db40a 100644 --- a/sc/workben/test.cxx +++ b/sc/workben/test.cxx @@ -427,7 +427,7 @@ void lcl_Annotations( FixedText& aTimeText ) if (xPos && xControl) { - sal_uLong nStart = tools::Time::GetSystemTicks(); + sal_uInt64 nStart = tools::Time::GetSystemTicks(); xAnnotationText->setText(L"bla"); xCursor->gotoEnd(false); @@ -441,7 +441,7 @@ void lcl_Annotations( FixedText& aTimeText ) xPos->setText(L"dumdi"); } - sal_uLong nEnd = tools::Time::GetSystemTicks(); + sal_uInt64 nEnd = tools::Time::GetSystemTicks(); aTimeText.SetText(String(nEnd-nStart)+String(" ms")); } } @@ -585,7 +585,7 @@ void lcl_Cells( FixedText& aTimeText ) if (xDoc) { long nCount = 0; - sal_uLong nStart = tools::Time::GetSystemTicks(); + sal_uInt64 nStart = tools::Time::GetSystemTicks(); XActionLockableRef xLock = (XActionLockable*) xDoc->queryInterface(XActionLockable::getSmartUik()); @@ -624,7 +624,7 @@ void lcl_Cells( FixedText& aTimeText ) } } - sal_uLong nEnd = tools::Time::GetSystemTicks(); + sal_uInt64 nEnd = tools::Time::GetSystemTicks(); aTimeText.SetText(String(nCount)+String(" ")+String(nEnd-nStart)+String(" ms")); // if (xLock) @@ -1510,9 +1510,9 @@ IMPL_LINK_NOARG(MyWindow, CountHdl) { case 0: { - sal_uLong nStart = tools::Time::GetSystemTicks(); + sal_uInt64 nStart = tools::Time::GetSystemTicks(); lcl_DoCount(); - sal_uLong nEnd = tools::Time::GetSystemTicks(); + sal_uInt64 nEnd = tools::Time::GetSystemTicks(); aTimeText.SetText(String("Count: ")+String(nEnd-nStart)+String(" ms")); } break; diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 2881e392c239..1eaf723dd3bd 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -624,8 +624,8 @@ void AnimationWindow::ResetAttrs() void AnimationWindow::WaitInEffect( sal_uLong nMilliSeconds, sal_uLong nTime, SfxProgress* pProgress ) const { - clock_t aEnd = tools::Time::GetSystemTicks() + nMilliSeconds; - clock_t aCurrent = tools::Time::GetSystemTicks(); + sal_uInt64 aEnd = tools::Time::GetSystemTicks() + nMilliSeconds; + sal_uInt64 aCurrent = tools::Time::GetSystemTicks(); while (aCurrent < aEnd) { aCurrent = tools::Time::GetSystemTicks(); diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx index db00687631e4..712a73c5d3f7 100644 --- a/sd/source/ui/slideshow/showwin.cxx +++ b/sd/source/ui/slideshow/showwin.cxx @@ -38,8 +38,8 @@ using namespace ::com::sun::star; namespace sd { -static const sal_uLong HIDE_MOUSE_TIMEOUT = 10000; -static const sal_uLong SHOW_MOUSE_TIMEOUT = 1000; +static const sal_uInt64 HIDE_MOUSE_TIMEOUT = 10000; +static const sal_uInt64 SHOW_MOUSE_TIMEOUT = 1000; ShowWindow::ShowWindow( const ::rtl::Reference< SlideshowImpl >& xController, vcl::Window* pParent ) : ::sd::Window( pParent ) @@ -187,7 +187,7 @@ void ShowWindow::MouseMove(const MouseEvent& /*rMEvt*/) { // if this is not the first mouse move while hidden, see if // enough time has pasted to show mouse pointer again - sal_uLong nTime = ::tools::Time::GetSystemTicks(); + sal_uInt64 nTime = ::tools::Time::GetSystemTicks(); if( (nTime - mnFirstMouseMove) >= SHOW_MOUSE_TIMEOUT ) { ShowPointer( true ); diff --git a/sd/source/ui/slideshow/showwindow.hxx b/sd/source/ui/slideshow/showwindow.hxx index b55876a0fc36..894938f86043 100644 --- a/sd/source/ui/slideshow/showwindow.hxx +++ b/sd/source/ui/slideshow/showwindow.hxx @@ -104,7 +104,7 @@ private: Rectangle maPresArea; bool mbMouseAutoHide; bool mbMouseCursorHidden; - sal_uLong mnFirstMouseMove; + sal_uInt64 mnFirstMouseMove; DECL_LINK( PauseTimeoutHdl, Timer* pTimer ); DECL_LINK(MouseTimeoutHdl, void *); diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index c50ba5876059..d92b437a4210 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -576,7 +576,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, s static bool bTimesInited(false); static sal_uInt32 nRepeatCount(10L); static double fLastTimes[REMEMBERED_TIMES_COUNT]; - const sal_uInt32 nStartTime(tools::Time::GetSystemTicks()); + const sal_uInt64 nStartTime(tools::Time::GetSystemTicks()); sal_uInt32 count(1L); sal_uInt32 a; @@ -650,8 +650,8 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, s if(bDoTimerTest) { - const sal_uInt32 nStopTime(tools::Time::GetSystemTicks()); - const sal_uInt32 nNeededTime(nStopTime - nStartTime); + const sal_uInt64 nStopTime(tools::Time::GetSystemTicks()); + const sal_uInt64 nNeededTime(nStopTime - nStartTime); const double fTimePerPaint((double)nNeededTime / (double)nRepeatCount); if(!bTimesInited) @@ -683,7 +683,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, s const double fAverageTimePerPaint(fAddedTimes / (double)REMEMBERED_TIMES_COUNT); fprintf(stderr, "-----------(start result)----------\n"); - fprintf(stderr, "StartTime : %u, StopTime: %u, NeededTime: %u, TimePerPaint: %f\n", nStartTime, nStopTime, nNeededTime, fTimePerPaint); + fprintf(stderr, "StartTime : %" SAL_PRIuUINT64 ", StopTime: %" SAL_PRIuUINT64 ", NeededTime: %" SAL_PRIuUINT64 ", TimePerPaint: %f\n", nStartTime, nStopTime, nNeededTime, fTimePerPaint); fprintf(stderr, "Remembered times: "); for(a = 0L; a < REMEMBERED_TIMES_COUNT; a++) diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx index 2bcccfa2b978..4bea14d66947 100644 --- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx +++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx @@ -40,7 +40,7 @@ FormatPaintBrushToolBoxControl::FormatPaintBrushToolBoxControl( sal_uInt16 nSlot , m_bPersistentCopy(false) , m_aDoubleClickTimer() { - sal_uIntPtr nDblClkTime = rTbx.GetSettings().GetMouseSettings().GetDoubleClickTime(); + sal_uInt64 nDblClkTime = rTbx.GetSettings().GetMouseSettings().GetDoubleClickTime(); m_aDoubleClickTimer.SetTimeoutHdl( LINK(this, FormatPaintBrushToolBoxControl, WaitDoubleClickHdl) ); m_aDoubleClickTimer.SetTimeout(nDblClkTime); diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index f72191ca2ec0..e3d86869daac 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -344,8 +344,8 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) aWin.Right() -= nMargin; aWin.Bottom() -= nMargin; if(!aWin.IsInside(aPixPt)) { - static sal_uLong last_tick = 0; - sal_uLong current_tick = tools::Time::GetSystemTicks(); + static sal_uInt64 last_tick = 0; + sal_uInt64 current_tick = tools::Time::GetSystemTicks(); if((current_tick-last_tick) > 500) { last_tick = current_tick; if(!m_bOldIdleSet) { diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx index 6f764569d490..455c4a90ae19 100644 --- a/tools/source/datetime/ttime.cxx +++ b/tools/source/datetime/ttime.cxx @@ -363,9 +363,9 @@ Time tools::Time::GetUTCOffset() aTime = -aTime; return aTime; #else - static sal_uIntPtr nCacheTicks = 0; + static sal_uInt64 nCacheTicks = 0; static sal_Int32 nCacheSecOffset = -1; - sal_uIntPtr nTicks = tools::Time::GetSystemTicks(); + sal_uInt64 nTicks = tools::Time::GetSystemTicks(); time_t nTime; tm aTM; sal_Int32 nLocalTime; @@ -404,7 +404,7 @@ Time tools::Time::GetUTCOffset() #endif } -sal_uIntPtr tools::Time::GetSystemTicks() +sal_uInt64 tools::Time::GetSystemTicks() { #if defined WNT static LARGE_INTEGER nTicksPerSecond; @@ -418,7 +418,8 @@ sal_uIntPtr tools::Time::GetSystemTicks() LARGE_INTEGER nPerformanceCount; QueryPerformanceCounter(&nPerformanceCount); - return (sal_uIntPtr)((nPerformanceCount.QuadPart*1000)/nTicksPerSecond.QuadPart); + return static_cast<sal_uInt64>( + (nPerformanceCount.QuadPart*1000)/nTicksPerSecond.QuadPart); #else timeval tv; gettimeofday (&tv, 0); @@ -427,8 +428,8 @@ sal_uIntPtr tools::Time::GetSystemTicks() fTicks *= 1000; fTicks += ((tv.tv_usec + 500) / 1000); - fTicks = fmod (fTicks, double(ULONG_MAX)); - return sal_uIntPtr(fTicks); + fTicks = fmod (fTicks, double(SAL_MAX_UINT64)); + return static_cast<sal_uInt64>(fTicks); #endif } diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h index 20c89c8ea93d..4db73fb84c56 100644 --- a/vcl/inc/osx/salframe.h +++ b/vcl/inc/osx/salframe.h @@ -73,7 +73,7 @@ public: sal_uLong mnStyle; unsigned int mnStyleMask; // our style mask from NSWindow creation - sal_uLong mnLastEventTime; + sal_uInt64 mnLastEventTime; unsigned int mnLastModifierFlags; AquaSalMenu* mpMenu; diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx index 67ad505b2fd7..c20c45442b3a 100644 --- a/vcl/inc/salwtype.hxx +++ b/vcl/inc/salwtype.hxx @@ -87,7 +87,7 @@ class FontSelectPattern; // MAC: Ctrl+Button is MOUSE_RIGHT struct SalMouseEvent { - sal_uLong mnTime; // Time in ms, when event is created + sal_uInt64 mnTime; // Time in ms, when event is created long mnX; // X-Position (Pixel, TopLeft-Output) long mnY; // Y-Position (Pixel, TopLeft-Output) sal_uInt16 mnButton; // 0-MouseMove/MouseLeave, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE @@ -97,7 +97,7 @@ struct SalMouseEvent // KEYINPUT and KEYUP struct SalKeyEvent { - sal_uLong mnTime; // Time in ms, when event is created + sal_uInt64 mnTime; // Time in ms, when event is created sal_uInt16 mnCode; // SV-KeyCode (KEY_xxx | KEY_SHIFT | KEY_MOD1 | KEY_MOD2) sal_uInt16 mnCharCode; // SV-CharCode sal_uInt16 mnRepeat; // Repeat-Count (KeyInputs-1) @@ -117,7 +117,7 @@ struct SalMenuEvent // KEYMODCHANGE struct SalKeyModEvent { - sal_uLong mnTime; // Time in ms, when event is created + sal_uInt64 mnTime; // Time in ms, when event is created sal_uInt16 mnCode; // SV-Modifiercode (KEY_SHIFT|KEY_MOD1|KEY_MOD2) sal_uInt16 mnModKeyCode; // extended Modifier (MODKEY_LEFT,MODKEY_RIGHT,MODKEY_PRESS,MODKEY_RELEASE) }; @@ -145,7 +145,7 @@ struct SalPaintEvent #define SAL_WHEELMOUSE_EVENT_PAGESCROLL ((sal_uLong)0xFFFFFFFF) struct SalWheelMouseEvent { - sal_uLong mnTime; // Time in ms, when event is created + sal_uInt64 mnTime; // Time in ms, when event is created long mnX; // X-Position (Pixel, TopLeft-Output) long mnY; // Y-Position (Pixel, TopLeft-Output) long mnDelta; // Number of rotations @@ -170,7 +170,7 @@ struct SalMouseActivateEvent // EXTTEXTINPUT struct SalExtTextInputEvent { - sal_uLong mnTime; // Time in ms, when event is created + sal_uInt64 mnTime; // Time in ms, when event is created OUString maText; // Text const sal_uInt16* mpTextAttr; // Text-Attribute sal_Int32 mnCursorPos; // Cursor-Position diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 3b04e76f6d9c..4847e19e049e 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -126,7 +126,7 @@ struct ImplSVAppData ImplHotKey* mpFirstHotKey; // HotKey-Verwaltung ImplEventHook* mpFirstEventHook; // Event-Hooks VclEventListeners2* mpPostYieldListeners; // post yield listeners - sal_uLong mnLastInputTime; // GetLastInputTime() + sal_uInt64 mnLastInputTime; // GetLastInputTime() sal_uInt16 mnDispatchLevel; // DispatchLevel sal_uInt16 mnModalMode; // ModalMode Count sal_uInt16 mnModalDialog; // ModalDialog Count @@ -240,7 +240,7 @@ struct ImplSVHelpData bool mbAutoHelpId : 1; // generate HelpIds bool mbRequestingHelp : 1; // In Window::RequestHelp HelpTextWindow* mpHelpWin; // HelpWindow - sal_uLong mnLastHelpHideTime; // ticks of last show + sal_uInt64 mnLastHelpHideTime; // ticks of last show }; // "NWF" means "Native Widget Framework" and was the term used for the diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 31c5dff7f4ea..75b8f5af3f61 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -157,7 +157,7 @@ struct ImplFrameData long mnLastMouseWinX; //< last x mouse position, rel. to pMouseMoveWin long mnLastMouseWinY; //< last y mouse position, rel. to pMouseMoveWin sal_uInt16 mnModalMode; //< frame based modal count (app based makes no sense anymore) - sal_uIntPtr mnMouseDownTime; //< mouse button down time for double click + sal_uInt64 mnMouseDownTime; //< mouse button down time for double click sal_uInt16 mnClickCount; //< mouse click count sal_uInt16 mnFirstMouseCode; //< mouse code by mousebuttondown sal_uInt16 mnMouseCode; //< mouse code @@ -382,7 +382,7 @@ public: // helper methods bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool bMouseLeave, - long nX, long nY, sal_uIntPtr nMsgTime, + long nX, long nY, sal_uInt64 nMsgTime, sal_uInt16 nCode, MouseEventModifiers nMode ); void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight ); diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm index 67c0a9a4fc61..37b4602c4f9d 100644 --- a/vcl/osx/salframeview.mm +++ b/vcl/osx/salframeview.mm @@ -606,7 +606,7 @@ private: if( pDispatchFrame && AquaSalFrame::isAlive( pDispatchFrame ) ) { - pDispatchFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 ); + pDispatchFrame->mnLastEventTime = static_cast<sal_uInt64>( [pEvent timestamp] * 1000.0 ); pDispatchFrame->mnLastModifierFlags = [pEvent modifierFlags]; NSPoint aPt = [NSEvent mouseLocation]; @@ -746,7 +746,7 @@ private: if( AquaSalFrame::isAlive( mpFrame ) ) { const NSTimeInterval fMagnifyTime = [pEvent timestamp]; - mpFrame->mnLastEventTime = static_cast<sal_uLong>( fMagnifyTime * 1000.0 ); + mpFrame->mnLastEventTime = static_cast<sal_uInt64>( fMagnifyTime * 1000.0 ); mpFrame->mnLastModifierFlags = [pEvent modifierFlags]; // check if this is a new series of magnify events @@ -818,7 +818,7 @@ private: if( AquaSalFrame::isAlive( mpFrame ) ) { - mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 ); + mpFrame->mnLastEventTime = static_cast<sal_uInt64>( [pEvent timestamp] * 1000.0 ); mpFrame->mnLastModifierFlags = [pEvent modifierFlags]; // merge pending scroll wheel events @@ -878,7 +878,7 @@ private: if( AquaSalFrame::isAlive( mpFrame ) ) { - mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 ); + mpFrame->mnLastEventTime = static_cast<sal_uInt64>( [pEvent timestamp] * 1000.0 ); mpFrame->mnLastModifierFlags = [pEvent modifierFlags]; // merge pending scroll wheel events @@ -950,7 +950,7 @@ private: mbNeedSpecialKeyHandle = false; mbKeyHandled = false; - mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 ); + mpFrame->mnLastEventTime = static_cast<sal_uInt64>( [pEvent timestamp] * 1000.0 ); mpFrame->mnLastModifierFlags = [pEvent modifierFlags]; if( ! [self handleKeyDownException: pEvent] ) @@ -1007,7 +1007,7 @@ private: if( AquaSalFrame::isAlive( mpFrame ) ) { - mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 ); + mpFrame->mnLastEventTime = static_cast<sal_uInt64>( [pEvent timestamp] * 1000.0 ); mpFrame->mnLastModifierFlags = [pEvent modifierFlags]; } } diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 8a3a1f800c5a..53ebd746a3f6 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -517,7 +517,7 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, sal_uIn if (!pHelpWin && !rHelpText.isEmpty()) { - sal_uLong nCurTime = tools::Time::GetSystemTicks(); + sal_uInt64 nCurTime = tools::Time::GetSystemTicks(); if ( ( ( nCurTime - pSVData->maHelpData.mnLastHelpHideTime ) < pParent->GetSettings().GetHelpSettings().GetTipDelay() ) || ( ( nStyle & QUICKHELP_NO_DELAY ) != 0 ) ) diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 76d06be50c21..70511c58880a 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -61,7 +61,7 @@ struct ImplMouseData ImplMouseData( const ImplMouseData& rData ); sal_uLong mnOptions; - sal_uLong mnDoubleClkTime; + sal_uInt64 mnDoubleClkTime; long mnDoubleClkWidth; long mnDoubleClkHeight; long mnStartDragWidth; @@ -302,13 +302,13 @@ MouseSettings::GetOptions() const } void -MouseSettings::SetDoubleClickTime( sal_uLong nDoubleClkTime ) +MouseSettings::SetDoubleClickTime( sal_uInt64 nDoubleClkTime ) { CopyData(); mxData->mnDoubleClkTime = nDoubleClkTime; } -sal_uLong +sal_uInt64 MouseSettings::GetDoubleClickTime() const { return mxData->mnDoubleClkTime; diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 1c4eba9edb80..64b0336ddb87 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -441,7 +441,7 @@ bool Application::AnyInput( VclInputFlags nType ) return ImplGetSVData()->mpDefInst->AnyInput( nType ); } -sal_uLong Application::GetLastInputInterval() +sal_uInt64 Application::GetLastInputInterval() { return (tools::Time::GetSystemTicks()-ImplGetSVData()->maAppData.mnLastInputTime); } diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx index f2f037513dd5..11d17daa8f2a 100644 --- a/vcl/source/window/debugevent.cxx +++ b/vcl/source/window/debugevent.cxx @@ -117,7 +117,7 @@ static void InitKeyEvent( SalKeyEvent &rKeyEvent ) { double nRand = getRandom(); if (nRand < 0.001) - rKeyEvent.mnTime = getRandom() * ULONG_MAX; + rKeyEvent.mnTime = getRandom() * SAL_MAX_UINT64; else rKeyEvent.mnTime = tools::Time::GetSystemTicks(); diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index a389216fb914..66b01f9e1283 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -42,7 +42,7 @@ class ImplDockFloatWin2 : public FloatingWindow { private: ImplDockingWindowWrapper* mpDockWin; - sal_uLong mnLastTicks; + sal_uInt64 mnLastTicks; Idle maDockIdle; Idle maEndDockIdle; Point maDockPos; diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 94e32d34abf5..a170e3f3d5ca 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -60,7 +60,7 @@ class ImplDockFloatWin : public FloatingWindow { private: DockingWindow* mpDockWin; - sal_uLong mnLastTicks; + sal_uInt64 mnLastTicks; Idle maDockIdle; Point maDockPos; Rectangle maDockRect; diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 25de8d34c957..bb7698a8428e 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -136,7 +136,7 @@ void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged ) { if ( mpWindowImpl->mpFrameData->mbMouseIn && mpWindowImpl->mpFrameWindow->mpWindowImpl->mbReallyVisible ) { - sal_uLong nTime = tools::Time::GetSystemTicks(); + sal_uInt64 nTime = tools::Time::GetSystemTicks(); long nX = mpWindowImpl->mpFrameData->mnLastMouseX; long nY = mpWindowImpl->mpFrameData->mnLastMouseY; sal_uInt16 nCode = nMouseCode; diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index f03ce5a24fba..7532ccf9cdc4 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -167,13 +167,13 @@ void ImplWheelWindow::ImplRecalcScrollValues() } else { - sal_uLong nCurTime; + sal_uInt64 nCurTime; // calc current time if( mnMaxWidth ) { const double fExp = ( (double) mnActDist / mnMaxWidth ) * log10( (double) MAX_TIME / MIN_TIME ); - nCurTime = (sal_uLong) ( MAX_TIME / pow( 10., fExp ) ); + nCurTime = (sal_uInt64) ( MAX_TIME / pow( 10., fExp ) ); } else nCurTime = MAX_TIME; @@ -185,7 +185,7 @@ void ImplWheelWindow::ImplRecalcScrollValues() mnTimeout = nCurTime - mnRepaintTime; else { - long nMult = mnRepaintTime / nCurTime; + sal_uInt64 nMult = mnRepaintTime / nCurTime; if( !( mnRepaintTime % nCurTime ) ) mnTimeout = 0UL; @@ -350,12 +350,12 @@ IMPL_LINK_NOARG(ImplWheelWindow, ImplScrollHdl) if ( !ImplCallPreNotify( aNCmdEvt ) ) { - const sal_uLong nTime = tools::Time::GetSystemTicks(); + const sal_uInt64 nTime = tools::Time::GetSystemTicks(); ImplDelData aDel( this ); pWindow->Command( aCEvt ); if( aDel.IsDead() ) return 0; - mnRepaintTime = std::max( tools::Time::GetSystemTicks() - nTime, (sal_uLong)1 ); + mnRepaintTime = std::max( tools::Time::GetSystemTicks() - nTime, (sal_uInt64)1 ); ImplRecalcScrollValues(); } } diff --git a/vcl/source/window/scrwnd.hxx b/vcl/source/window/scrwnd.hxx index e71ca6d24676..ddd08f940cc9 100644 --- a/vcl/source/window/scrwnd.hxx +++ b/vcl/source/window/scrwnd.hxx @@ -44,8 +44,8 @@ private: Point maLastMousePos; Point maCenter; Timer* mpTimer; - sal_uLong mnRepaintTime; - sal_uLong mnTimeout; + sal_uInt64 mnRepaintTime; + sal_uInt64 mnTimeout; sal_uLong mnWheelMode; sal_uLong mnMaxWidth; sal_uLong mnActDist; diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 890cb61a9452..6cb1c902b6ff 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -263,7 +263,7 @@ static sal_IntPtr ContextMenuEventLink( void* pCEvent, void* ) } bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool bMouseLeave, - long nX, long nY, sal_uLong nMsgTime, + long nX, long nY, sal_uInt64 nMsgTime, sal_uInt16 nCode, MouseEventModifiers nMode ) { ImplSVData* pSVData = ImplGetSVData(); @@ -579,7 +579,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool if ( nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN ) { const MouseSettings& rMSettings = pChild->GetSettings().GetMouseSettings(); - sal_uLong nDblClkTime = rMSettings.GetDoubleClickTime(); + sal_uInt64 nDblClkTime = rMSettings.GetDoubleClickTime(); long nDblClkW = rMSettings.GetDoubleClickWidth(); long nDblClkH = rMSettings.GetDoubleClickHeight(); //long nMouseX = nX; |