diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-21 15:30:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-22 08:08:05 +0200 |
commit | e25fd7782ad04dc363b4265e1bd08d6e092b50c5 (patch) | |
tree | 1dd202549adbc1ed7dbe17e5a81abbe408086e85 /i18npool | |
parent | 180dd91c189de0bf03d5062e33c20da94c5d35d9 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/calendar/calendar_hijri.cxx | 15 | ||||
-rw-r--r-- | i18npool/source/localedata/saxparser.cxx | 4 |
2 files changed, 10 insertions, 9 deletions
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 <stdlib.h> #include <calendar_hijri.hxx> +#include <tools/long.hxx> 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<long>((static_cast<float>(lJulianDay - 1867216) - 0.25) / 36524.25); + tools::Long lAdjust = static_cast<tools::Long>((static_cast<float>(lJulianDay - 1867216) - 0.25) / 36524.25); - lFactorA = lJulianDay + 1 + lAdjust - static_cast<long>(0.25 * lAdjust); + lFactorA = lJulianDay + 1 + lAdjust - static_cast<tools::Long>(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<long>(6680.0 + (static_cast<float>(lFactorB - 2439870) - 122.1) / 365.25); - lFactorD = static_cast<long>(365 * lFactorC + (0.25 * lFactorC)); - lFactorE = static_cast<long>((lFactorB - lFactorD) / 30.6001); + lFactorC = static_cast<tools::Long>(6680.0 + (static_cast<float>(lFactorB - 2439870) - 122.1) / 365.25); + lFactorD = static_cast<tools::Long>(365 * lFactorC + (0.25 * lFactorC)); + lFactorE = static_cast<tools::Long>((lFactorB - lFactorD) / 30.6001); /* now, pull out the day number */ - *pnDay = lFactorB - lFactorD - static_cast<long>(30.6001 * lFactorE); + *pnDay = lFactorB - lFactorD - static_cast<tools::Long>(30.6001 * lFactorE); /* ...and the month, adjusting it if necessary */ *pnMonth = lFactorE - 1; diff --git a/i18npool/source/localedata/saxparser.cxx b/i18npool/source/localedata/saxparser.cxx index e667f523316c..d26ad504f7b9 100644 --- a/i18npool/source/localedata/saxparser.cxx +++ b/i18npool/source/localedata/saxparser.cxx @@ -35,7 +35,7 @@ #include <cppuhelper/bootstrap.hxx> #include <cppuhelper/implbase.hxx> - +#include <tools/long.hxx> #include "LocaleNode.hxx" @@ -113,7 +113,7 @@ static Reference< XInputStream > createStreamFromFile( return r; } - long nLength = ftell( f ); + tools::Long nLength = ftell( f ); if (nLength == -1) { fprintf(stderr, "failure ftelling %s\n", pcFile); |