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 /vcl | |
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>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/osx/salframe.h | 2 | ||||
-rw-r--r-- | vcl/inc/salwtype.hxx | 10 | ||||
-rw-r--r-- | vcl/inc/svdata.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/window.h | 4 | ||||
-rw-r--r-- | vcl/osx/salframeview.mm | 12 | ||||
-rw-r--r-- | vcl/source/app/help.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/settings.cxx | 6 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/debugevent.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/dockwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/mouse.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/scrwnd.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/scrwnd.hxx | 4 | ||||
-rw-r--r-- | vcl/source/window/winproc.cxx | 4 |
15 files changed, 34 insertions, 34 deletions
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; |