From b9f080e012d0e4f5343da940079c20d3f9c63513 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 29 Oct 2014 12:23:43 +0100 Subject: Fix -fsanitize=signed-integer-overflow ...when std::clock_t is sufficiently small. Though the formula used in SwLayAction::CheckWaitCrsr does look odd... Change-Id: Iee32350850be4a1896c5cb41eff748f0cb5382a2 --- sw/source/core/inc/layact.hxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sw/source/core/inc/layact.hxx') diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 3d8d42c5875c..897dc7eb9695 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -18,6 +18,11 @@ */ #ifndef INCLUDED_SW_SOURCE_CORE_INC_LAYACT_HXX #define INCLUDED_SW_SOURCE_CORE_INC_LAYACT_HXX + +#include + +#include + #include "swtypes.hxx" #include "swrect.hxx" @@ -62,7 +67,7 @@ class SwLayAction // The InternalAction can then take the appropriate steps. sal_uInt16 nPreInvaPage; - sal_uLong nStartTicks; // The Action's starting time; if too much time passes the + std::clock_t nStartTicks; // The Action's starting time; if too much time passes the // WaitCrsr can be enabled via CheckWaitCrsr() sal_uInt16 nInputType; // Which input should terminate processing @@ -111,7 +116,7 @@ class SwLayAction bool RemoveEmptyBrowserPages(); inline void CheckIdleEnd(); - inline sal_uLong GetStartTicks() { return nStartTicks; } + inline std::clock_t GetStartTicks() { return nStartTicks; } public: SwLayAction( SwRootFrm *pRt, SwViewImp *pImp ); -- cgit v1.2.3