From e25fd7782ad04dc363b4265e1bd08d6e092b50c5 Mon Sep 17 00:00:00 2001 From: Noel Date: Wed, 21 Oct 2020 15:30:37 +0200 Subject: long->tools::Long in hwpfilter..oox Change-Id: I9ab8876aac7b2f8b488db6dfa9c6fd0cecd2238b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104626 Tested-by: Jenkins Reviewed-by: Noel Grandin --- i18npool/source/calendar/calendar_hijri.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'i18npool/source/calendar') diff --git a/i18npool/source/calendar/calendar_hijri.cxx b/i18npool/source/calendar/calendar_hijri.cxx index dca8b95836fc..75a155104cbb 100644 --- a/i18npool/source/calendar/calendar_hijri.cxx +++ b/i18npool/source/calendar/calendar_hijri.cxx @@ -23,6 +23,7 @@ #include #include +#include using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -257,14 +258,14 @@ void Calendar_hijri::getGregorianDay(sal_Int32 lJulianDay, sal_Int32 *pnDay, sal_Int32 *pnMonth, sal_Int32 *pnYear) { /* working variables */ - long lFactorA, lFactorB, lFactorC, lFactorD, lFactorE; + tools::Long lFactorA, lFactorB, lFactorC, lFactorD, lFactorE; /* test whether to adjust for the Gregorian calendar crossover */ if (lJulianDay >= GREGORIAN_CROSSOVER) { /* calculate a small adjustment */ - long lAdjust = static_cast((static_cast(lJulianDay - 1867216) - 0.25) / 36524.25); + tools::Long lAdjust = static_cast((static_cast(lJulianDay - 1867216) - 0.25) / 36524.25); - lFactorA = lJulianDay + 1 + lAdjust - static_cast(0.25 * lAdjust); + lFactorA = lJulianDay + 1 + lAdjust - static_cast(0.25 * lAdjust); } else { /* no adjustment needed */ @@ -272,12 +273,12 @@ Calendar_hijri::getGregorianDay(sal_Int32 lJulianDay, sal_Int32 *pnDay, sal_Int3 } lFactorB = lFactorA + 1524; - lFactorC = static_cast(6680.0 + (static_cast(lFactorB - 2439870) - 122.1) / 365.25); - lFactorD = static_cast(365 * lFactorC + (0.25 * lFactorC)); - lFactorE = static_cast((lFactorB - lFactorD) / 30.6001); + lFactorC = static_cast(6680.0 + (static_cast(lFactorB - 2439870) - 122.1) / 365.25); + lFactorD = static_cast(365 * lFactorC + (0.25 * lFactorC)); + lFactorE = static_cast((lFactorB - lFactorD) / 30.6001); /* now, pull out the day number */ - *pnDay = lFactorB - lFactorD - static_cast(30.6001 * lFactorE); + *pnDay = lFactorB - lFactorD - static_cast(30.6001 * lFactorE); /* ...and the month, adjusting it if necessary */ *pnMonth = lFactorE - 1; -- cgit