LibreOffice Module i18npool (master)  1
Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
i18npool::Calendar_hijri Class Referencefinal

#include <calendar_hijri.hxx>

Inheritance diagram for i18npool::Calendar_hijri:
[legend]
Collaboration diagram for i18npool::Calendar_hijri:
[legend]

Public Member Functions

 Calendar_hijri ()
 
- Public Member Functions inherited from i18npool::Calendar_gregorian
 Calendar_gregorian ()
 
 Calendar_gregorian (const Era *_eraArray)
 
void init (const Era *_eraArray)
 
bool setTimeZone (const OUString &rTimeZone)
 
virtual ~Calendar_gregorian () override
 Destructor. More...
 
virtual void SAL_CALL loadCalendar (const OUString &uniqueID, const css::lang::Locale &rLocale) override
 
virtual void SAL_CALL setDateTime (double fTimeInDays) override
 
virtual double SAL_CALL getDateTime () override
 
virtual void SAL_CALL setValue (sal_Int16 nFieldIndex, sal_Int16 nValue) override
 
virtual sal_Int16 SAL_CALL getValue (sal_Int16 nFieldIndex) override
 
virtual void SAL_CALL addValue (sal_Int16 nFieldIndex, sal_Int32 nAmount) override
 
virtual sal_Bool SAL_CALL isValid () override
 
virtual css::i18n::Calendar SAL_CALL getLoadedCalendar () override
 
virtual OUString SAL_CALL getUniqueID () override
 
virtual sal_Int16 SAL_CALL getFirstDayOfWeek () override
 
virtual void SAL_CALL setFirstDayOfWeek (sal_Int16 nDay) override
 
virtual void SAL_CALL setMinimumNumberOfDaysForFirstWeek (sal_Int16 nDays) override
 
virtual sal_Int16 SAL_CALL getMinimumNumberOfDaysForFirstWeek () override
 
virtual sal_Int16 SAL_CALL getNumberOfMonthsInYear () override
 
virtual sal_Int16 SAL_CALL getNumberOfDaysInWeek () override
 
virtual css::uno::Sequence< css::i18n::CalendarItem > SAL_CALL getMonths () override
 
virtual css::uno::Sequence< css::i18n::CalendarItem > SAL_CALL getDays () override
 
virtual OUString SAL_CALL getDisplayName (sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType) override
 
virtual OUString SAL_CALL getDisplayString (sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode) override
 
virtual css::i18n::Calendar2 SAL_CALL getLoadedCalendar2 () override
 
virtual css::uno::Sequence< css::i18n::CalendarItem2 > SAL_CALL getDays2 () override
 
virtual css::uno::Sequence< css::i18n::CalendarItem2 > SAL_CALL getMonths2 () override
 
virtual css::uno::Sequence< css::i18n::CalendarItem2 > SAL_CALL getGenitiveMonths2 () override
 
virtual css::uno::Sequence< css::i18n::CalendarItem2 > SAL_CALL getPartitiveMonths2 () override
 
virtual void SAL_CALL setLocalDateTime (double TimeInDays) override
 
virtual double SAL_CALL getLocalDateTime () override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
- Public Member Functions inherited from i18npool::CalendarImpl
 CalendarImpl ()
 
 CalendarImpl (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~CalendarImpl () override
 Destructor. More...
 
virtual void SAL_CALL loadDefaultCalendar (const css::lang::Locale &rLocale) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getAllCalendars (const css::lang::Locale &rLocale) override
 
virtual void SAL_CALL loadDefaultCalendarTZ (const css::lang::Locale &rLocale, const OUString &rTimeZone) override
 
virtual void SAL_CALL loadCalendarTZ (const OUString &uniqueID, const css::lang::Locale &rLocale, const OUString &rTimeZone) override
 

Private Member Functions

void mapToGregorian () override
 
void mapFromGregorian () override
 

Static Private Member Functions

static double NewMoon (sal_Int32 n)
 
static void getHijri (sal_Int32 *day, sal_Int32 *month, sal_Int32 *year)
 
static void ToGregorian (sal_Int32 *day, sal_Int32 *month, sal_Int32 *year)
 
static void getGregorianDay (sal_Int32 jd, sal_Int32 *pnDay, sal_Int32 *pnMonth, sal_Int32 *pnYear)
 
static sal_Int32 getJulianDay (sal_Int32 day, sal_Int32 month, sal_Int32 year)
 

Static Private Attributes

static const double RadPerDeg = 0.01745329251994329577
 
static const double SynPeriod = 29.53058868
 
static const double SynMonth = 365.25/29.53058868
 
static const double jd1900 = 2415020.75933
 
static const sal_Int32 SynRef = 1252
 
static const sal_Int32 GregRef = 1422
 
static const double SA_TimeZone = 3.0
 
static const double EveningPeriod = 6.0
 
static const sal_Int32 LeapYear []
 

Additional Inherited Members

- Protected Member Functions inherited from i18npool::Calendar_gregorian
void getValue ()
 
OUString getDisplayStringImpl (sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode, bool bEraMode)
 
- Protected Attributes inherited from i18npool::Calendar_gregorian
const EraeraArray
 
std::unique_ptr< icu::Calendar > body
 
rtl::Reference< NativeNumberSupplierServicemxNatNum
 
const char * cCalendar
 
css::lang::Locale aLocale
 
sal_uInt32 fieldSet
 
sal_Int16 fieldValue [FIELD_INDEX_COUNT]
 
sal_Int16 fieldSetValue [FIELD_INDEX_COUNT]
 

Detailed Description

Definition at line 29 of file calendar_hijri.hxx.

Constructor & Destructor Documentation

i18npool::Calendar_hijri::Calendar_hijri ( )

Definition at line 62 of file calendar_hijri.cxx.

References i18npool::Calendar_gregorian::cCalendar.

Member Function Documentation

void i18npool::Calendar_hijri::getGregorianDay ( sal_Int32  jd,
sal_Int32 *  pnDay,
sal_Int32 *  pnMonth,
sal_Int32 *  pnYear 
)
staticprivate

Definition at line 258 of file calendar_hijri.cxx.

References GREGORIAN_CROSSOVER.

Referenced by ToGregorian().

void i18npool::Calendar_hijri::getHijri ( sal_Int32 *  day,
sal_Int32 *  month,
sal_Int32 *  year 
)
staticprivate

Definition at line 175 of file calendar_hijri.cxx.

References getJulianDay(), GregRef, jd1900, NewMoon(), SynPeriod, and SynRef.

Referenced by mapFromGregorian().

sal_Int32 i18npool::Calendar_hijri::getJulianDay ( sal_Int32  day,
sal_Int32  month,
sal_Int32  year 
)
staticprivate

Definition at line 299 of file calendar_hijri.cxx.

References year.

Referenced by getHijri().

void i18npool::Calendar_hijri::mapFromGregorian ( )
overrideprivatevirtual
Exceptions
css::uno::RuntimeException

Reimplemented from i18npool::Calendar_gregorian.

Definition at line 91 of file calendar_hijri.cxx.

References abs(), day, i18npool::Calendar_gregorian::fieldValue, getHijri(), month, and year.

void i18npool::Calendar_hijri::mapToGregorian ( )
overrideprivatevirtual
Exceptions
css::uno::RuntimeException

Reimplemented from i18npool::Calendar_gregorian.

Definition at line 70 of file calendar_hijri.cxx.

References abs(), day, FIELDS, i18npool::Calendar_gregorian::fieldSet, i18npool::Calendar_gregorian::fieldSetValue, month, ToGregorian(), and year.

double i18npool::Calendar_hijri::NewMoon ( sal_Int32  n)
staticprivate

Definition at line 118 of file calendar_hijri.cxx.

References jd1900, RadPerDeg, SynPeriod, and t.

Referenced by getHijri(), and ToGregorian().

void i18npool::Calendar_hijri::ToGregorian ( sal_Int32 *  day,
sal_Int32 *  month,
sal_Int32 *  year 
)
staticprivate

Definition at line 223 of file calendar_hijri.cxx.

References day, getGregorianDay(), GregRef, NewMoon(), and SynRef.

Referenced by mapToGregorian().

Member Data Documentation

const double i18npool::Calendar_hijri::EveningPeriod = 6.0
staticprivate

Definition at line 59 of file calendar_hijri.hxx.

const sal_Int32 i18npool::Calendar_hijri::GregRef = 1422
staticprivate

Definition at line 53 of file calendar_hijri.hxx.

Referenced by getHijri(), and ToGregorian().

const double i18npool::Calendar_hijri::jd1900 = 2415020.75933
staticprivate

Definition at line 49 of file calendar_hijri.hxx.

Referenced by getHijri(), and NewMoon().

const sal_Int32 i18npool::Calendar_hijri::LeapYear
staticprivate
Initial value:
= {
2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29
}

Definition at line 62 of file calendar_hijri.hxx.

const double i18npool::Calendar_hijri::RadPerDeg = 0.01745329251994329577
staticprivate

Definition at line 41 of file calendar_hijri.hxx.

Referenced by NewMoon().

const double i18npool::Calendar_hijri::SA_TimeZone = 3.0
staticprivate

Definition at line 56 of file calendar_hijri.hxx.

const double i18npool::Calendar_hijri::SynMonth = 365.25/29.53058868
staticprivate

Definition at line 46 of file calendar_hijri.hxx.

const double i18npool::Calendar_hijri::SynPeriod = 29.53058868
staticprivate

Definition at line 44 of file calendar_hijri.hxx.

Referenced by getHijri(), and NewMoon().

const sal_Int32 i18npool::Calendar_hijri::SynRef = 1252
staticprivate

Definition at line 52 of file calendar_hijri.hxx.

Referenced by getHijri(), and ToGregorian().


The documentation for this class was generated from the following files: