i18npool/inc/calendar_hijri.hxx | 3 --- i18npool/source/calendar/calendar_hijri.cxx | 9 --------- 2 files changed, 12 deletions(-)
New commits: commit dd8b064af0b4cb44575eb4f3482db18485bfc8d3 Author: Hossein <hoss...@libreoffice.org> AuthorDate: Thu Nov 18 02:25:20 2021 +0100 Commit: Hossein <hoss...@libreoffice.org> CommitDate: Thu Nov 18 10:03:35 2021 +0100 Cleanup Calendar_hijri * Removed the static member variable SA_TimeZone, which is not used elsewhere * It is write-only according to the clang compilerplugins output: compilerplugins/clang/unusedvarsglobal.writeonly.results * Time zone should not be allocated as a constant * Removed unused local variables commented out 15 years ago to avoid warnings in: 4170cbdbdfc9ceb282d25e1e19cd7b4d178436bf Change-Id: Ifc24651ae0aee33dd6a01c77c919ce0cb0426366 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125432 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Jenkins diff --git a/i18npool/inc/calendar_hijri.hxx b/i18npool/inc/calendar_hijri.hxx index 9732ca373155..c11a507bb420 100644 --- a/i18npool/inc/calendar_hijri.hxx +++ b/i18npool/inc/calendar_hijri.hxx @@ -49,9 +49,6 @@ private: static const sal_Int32 SynRef; static const sal_Int32 GregRef; - // Local time (Saudi Arabia) - static const double SA_TimeZone; // Time Zone - // Period between 1.30pm - 6:30pm static const double EveningPeriod; diff --git a/i18npool/source/calendar/calendar_hijri.cxx b/i18npool/source/calendar/calendar_hijri.cxx index 3bc6ccfa841d..2944f455bb37 100644 --- a/i18npool/source/calendar/calendar_hijri.cxx +++ b/i18npool/source/calendar/calendar_hijri.cxx @@ -34,9 +34,6 @@ using namespace ::com::sun::star::i18n; namespace i18npool { -// not used -//static UErrorCode status; // status is shared in all calls to Calendar, it has to be reset for each call. - // Synodic Period (mean time between 2 successive new moon: 29d, 12 hr, 44min, 3sec const double Calendar_hijri::SynPeriod = 29.53058868; const double Calendar_hijri::SynMonth = 365.25/29.53058868; // Solar days in a year/SynPeriod @@ -48,9 +45,6 @@ const double Calendar_hijri::jd1900 = 2415020.75933; const sal_Int32 Calendar_hijri::SynRef = 1252; const sal_Int32 Calendar_hijri::GregRef = 1422; -// Local time specific to Saudi Arabia -const double Calendar_hijri::SA_TimeZone = 3.0; - const double Calendar_hijri::EveningPeriod = 6.0; const sal_Int32 Calendar_hijri::LeapYear[] = { @@ -173,7 +167,6 @@ void Calendar_hijri::getHijri(sal_Int32 *day, sal_Int32 *month, sal_Int32 *year) { double prevday; -// double dayfraction; sal_Int32 syndiff; sal_Int32 newsyn; double newjd; @@ -221,9 +214,7 @@ void Calendar_hijri::ToGregorian(sal_Int32 *day, sal_Int32 *month, sal_Int32 *year) { sal_Int32 nmonth; -// double dayfraction; double jday; -// sal_Int32 dayint; if ( *year < 0 ) (*year)++;