This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 448dc86220cf9531c9c48d1efc4e906d246b1899 Author: Damjan Jovanovic <[email protected]> AuthorDate: Fri Jan 3 07:01:21 2025 +0200 Change the return type of Get10ThSec() to clock_t, so it works regardless of the size of the integer type. Patch by: me --- main/sfx2/source/bastyp/progress.cxx | 3 +-- main/sfx2/source/view/sfxbasecontroller.cxx | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/main/sfx2/source/bastyp/progress.cxx b/main/sfx2/source/bastyp/progress.cxx index 3e189c066a..f360c0574a 100644 --- a/main/sfx2/source/bastyp/progress.cxx +++ b/main/sfx2/source/bastyp/progress.cxx @@ -110,8 +110,7 @@ struct SfxProgress_Impl #define aTypeLibInfo aProgressTypeLibImpl //======================================================================== -extern sal_uInt32 Get10ThSec(); // must match the definition in sfxbasecontroller.cxx - // (sal_uInt32); sal_uIntPtr diverges from it on x64 +extern clock_t Get10ThSec(); // ----------------------------------------------------------------------- diff --git a/main/sfx2/source/view/sfxbasecontroller.cxx b/main/sfx2/source/view/sfxbasecontroller.cxx index bb174eeeb6..015084586b 100644 --- a/main/sfx2/source/view/sfxbasecontroller.cxx +++ b/main/sfx2/source/view/sfxbasecontroller.cxx @@ -220,9 +220,9 @@ sal_Bool SupportsCommandGroup( sal_Int16 nCommandGroup ) return sal_False; } -sal_uInt32 Get10ThSec() +clock_t Get10ThSec() { - sal_uInt32 n10Ticks = 10 * (sal_uInt32)clock(); + clock_t n10Ticks = 10 * clock(); return n10Ticks / CLOCKS_PER_SEC; } @@ -246,7 +246,7 @@ friend class SfxBaseController; SfxWorkWindow* pWorkWindow; sal_Int32 _nRange; sal_Int32 _nValue; - long _nStartTime; + clock_t _nStartTime; public: SfxStatusIndicator(SfxBaseController* pController, SfxWorkWindow* pWork) : xOwner( pController )
