LibreOffice Module i18npool (master) 1
|
#include <calendar_gregorian.hxx>
Public Member Functions | |
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 void SAL_CALL | loadCalendar (const OUString &uniqueID, const css::lang::Locale &rLocale) override |
virtual css::i18n::Calendar SAL_CALL | getLoadedCalendar () override |
virtual css::uno::Sequence< OUString > SAL_CALL | getAllCalendars (const css::lang::Locale &rLocale) override |
virtual OUString SAL_CALL | getUniqueID () 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 sal_Bool SAL_CALL | isValid () override |
virtual void SAL_CALL | addValue (sal_Int16 nFieldIndex, sal_Int32 nAmount) 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 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 |
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 |
Protected Member Functions | |
virtual void | mapToGregorian () |
virtual void | mapFromGregorian () |
void | getValue () |
OUString | getDisplayStringImpl (sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode, bool bEraMode) |
Protected Attributes | |
const Era * | eraArray |
std::unique_ptr< icu::Calendar > | body |
rtl::Reference< NativeNumberSupplierService > | mxNatNum |
const char * | cCalendar |
css::lang::Locale | aLocale |
sal_uInt32 | fieldSet |
sal_Int16 | fieldValue [FIELD_INDEX_COUNT] |
sal_Int16 | fieldSetValue [FIELD_INDEX_COUNT] |
Private Member Functions | |
void | submitFields () |
Submit fieldSetValue array according to fieldSet. More... | |
void | setValue () |
Set fields internally. More... | |
bool | getZoneOffset (sal_Int32 &o_nOffset) const |
Obtain combined field values for timezone offset (minutes+secondmillis) in milliseconds and whether fields were set. More... | |
bool | getDSTOffset (sal_Int32 &o_nOffset) const |
Obtain combined field values for DST offset (minutes+secondmillis) in milliseconds and whether fields were set. More... | |
bool | getCombinedOffset (sal_Int32 &o_nOffset, sal_Int16 nParentFieldIndex, sal_Int16 nChildFieldIndex) const |
Used by getZoneOffset() and getDSTOffset(). More... | |
Private Attributes | |
css::i18n::Calendar2 | aCalendar |
Definition at line 47 of file calendar_gregorian.hxx.
i18npool::Calendar_gregorian::Calendar_gregorian | ( | ) |
Definition at line 147 of file calendar_gregorian.cxx.
References init().
i18npool::Calendar_gregorian::Calendar_gregorian | ( | const Era * | _eraArray | ) |
Definition at line 152 of file calendar_gregorian.cxx.
References init().
|
overridevirtual |
Destructor.
Definition at line 196 of file calendar_gregorian.cxx.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 650 of file calendar_gregorian.cxx.
References body, i18npool::fieldNameConverter(), getValue(), and value.
|
private |
Used by getZoneOffset() and getDSTOffset().
Parent is CalendarFieldIndex for offset in minutes, child is CalendarFieldIndex for offset in milliseconds.
Definition at line 506 of file calendar_gregorian.cxx.
References fieldSet, and fieldValue.
Referenced by getDSTOffset(), and getZoneOffset().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 356 of file calendar_gregorian.cxx.
References body, fieldSet, getValue(), and setValue().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 802 of file calendar_gregorian.cxx.
References aCalendar, and i18npool::LocaleDataImpl::downcastCalendarItems().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 816 of file calendar_gregorian.cxx.
References aCalendar.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Reimplemented in i18npool::Calendar_hanja, and i18npool::Calendar_hanja_yoil.
Definition at line 844 of file calendar_gregorian.cxx.
References aCalendar, aLocale, aStr, i18npool::LocaleDataImpl::get(), and idx.
Referenced by i18npool::Calendar_hanja::getDisplayName(), i18npool::Calendar_hanja_yoil::getDisplayName(), and getDisplayStringImpl().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Reimplemented in i18npool::Calendar_buddhist, and i18npool::Calendar_jewish.
Definition at line 898 of file calendar_gregorian.cxx.
References getDisplayStringImpl().
Referenced by i18npool::Calendar_buddhist::getDisplayString(), and i18npool::Calendar_jewish::getDisplayString().
|
protected |
css::uno::RuntimeException |
Definition at line 904 of file calendar_gregorian.cxx.
References aCalendar, aLocale, aStr, i18npool::cast16To32(), i18npool::DisplayCode2FieldIndex(), eraArray, i18npool::gengou_eraArray, i18npool::LocaleDataImpl::get(), getDisplayName(), getDisplayStringImpl(), getValue(), i18npool::kDisplayEraForcedLongYear, mxNatNum, i18npool::NatNumForCalendar(), nNatNum, o3tl::sprintf(), and value.
Referenced by getDisplayString(), i18npool::Calendar_buddhist::getDisplayString(), and getDisplayStringImpl().
|
private |
Obtain combined field values for DST offset (minutes+secondmillis) in milliseconds and whether fields were set.
Definition at line 533 of file calendar_gregorian.cxx.
References getCombinedOffset().
Referenced by submitFields().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 758 of file calendar_gregorian.cxx.
References body.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 830 of file calendar_gregorian.cxx.
References aCalendar.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 1062 of file calendar_gregorian.cxx.
References cCalendar.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 324 of file calendar_gregorian.cxx.
References aCalendar, and i18npool::LocaleDataImpl::downcastCalendar().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 318 of file calendar_gregorian.cxx.
References aCalendar.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 388 of file calendar_gregorian.cxx.
References body, fieldSet, getValue(), and setValue().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 782 of file calendar_gregorian.cxx.
References aCalendar.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 809 of file calendar_gregorian.cxx.
References aCalendar, and i18npool::LocaleDataImpl::downcastCalendarItems().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 823 of file calendar_gregorian.cxx.
References aCalendar.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 795 of file calendar_gregorian.cxx.
References aCalendar.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 788 of file calendar_gregorian.cxx.
References aCalendar.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 837 of file calendar_gregorian.cxx.
References aCalendar.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 1074 of file calendar_gregorian.cxx.
References cCalendar.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 330 of file calendar_gregorian.cxx.
References aCalendar.
|
protected |
css::uno::RuntimeException |
Definition at line 591 of file calendar_gregorian.cxx.
References abs(), body, DUMP_I18N_CAL_MSG, DUMP_ICU_CAL_MSG, i18npool::FIELD_INDEX_COUNT, i18npool::fieldNameConverter(), fieldSet, fieldValue, mapFromGregorian(), and value.
Referenced by addValue(), getDateTime(), i18npool::Calendar_buddhist::getDisplayString(), i18npool::Calendar_jewish::getDisplayString(), getDisplayStringImpl(), getLocalDateTime(), getValue(), isValid(), loadCalendar(), setDateTime(), setLocalDateTime(), and setTimeZone().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 636 of file calendar_gregorian.cxx.
References i18npool::FIELD_INDEX_COUNT, fieldSet, fieldValue, getValue(), and setValue().
|
private |
Obtain combined field values for timezone offset (minutes+secondmillis) in milliseconds and whether fields were set.
Definition at line 527 of file calendar_gregorian.cxx.
References getCombinedOffset().
Referenced by submitFields().
void i18npool::Calendar_gregorian::init | ( | const Era * | _eraArray | ) |
Definition at line 158 of file calendar_gregorian.cxx.
References body, cCalendar, eraArray, and fieldSet.
Referenced by Calendar_gregorian().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 660 of file calendar_gregorian.cxx.
References i18npool::FIELD_INDEX_COUNT, fieldSet, fieldSetValue, fieldValue, getValue(), and setValue().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 285 of file calendar_gregorian.cxx.
References aCalendar, aLocale, day, i18npool::LocaleDataImpl::get(), getValue(), setFirstDayOfWeek(), and setMinimumNumberOfDaysForFirstWeek().
|
protectedvirtual |
css::uno::RuntimeException |
Reimplemented in i18npool::Calendar_hijri, and i18npool::Calendar_jewish.
Definition at line 424 of file calendar_gregorian.cxx.
References i18npool::cast16To32(), i18npool::cast32To16(), d, day, eraArray, fieldValue, m, month, y, i18npool::Era::year, and year.
Referenced by getValue().
|
protectedvirtual |
css::uno::RuntimeException |
Reimplemented in i18npool::Calendar_hijri, and i18npool::Calendar_jewish.
Definition at line 454 of file calendar_gregorian.cxx.
References i18npool::cast16To32(), i18npool::cast32To16(), eraArray, FIELDS, fieldSet, fieldSetValue, fieldValue, y, and i18npool::Era::year.
Referenced by setValue().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 336 of file calendar_gregorian.cxx.
References body, getValue(), and SAL_INFO_IF.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 768 of file calendar_gregorian.cxx.
Referenced by loadCalendar().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 369 of file calendar_gregorian.cxx.
References body, getValue(), and SAL_INFO_IF.
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 775 of file calendar_gregorian.cxx.
References aCalendar, and body.
Referenced by loadCalendar().
bool i18npool::Calendar_gregorian::setTimeZone | ( | const OUString & | rTimeZone | ) |
Definition at line 406 of file calendar_gregorian.cxx.
References body, fieldSet, getValue(), and setValue().
Referenced by i18npool::CalendarImpl::loadCalendarTZ().
|
private |
Set fields internally.
css::uno::RuntimeException |
Definition at line 565 of file calendar_gregorian.cxx.
References body, DUMP_I18N_CAL_MSG, DUMP_ICU_CAL_MSG, fieldSetValue, fieldValue, mapToGregorian(), and submitFields().
Referenced by getDateTime(), getLocalDateTime(), getValue(), isValid(), and setTimeZone().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 498 of file calendar_gregorian.cxx.
References i18npool::FIELD_INDEX_COUNT, fieldSet, fieldValue, and value.
|
private |
Submit fieldSetValue array according to fieldSet.
css::uno::RuntimeException |
Definition at line 539 of file calendar_gregorian.cxx.
References body, i18npool::FIELD_INDEX_COUNT, i18npool::fieldNameConverter(), fieldSet, fieldSetValue, getDSTOffset(), and getZoneOffset().
Referenced by setValue().
|
overridevirtual |
Reimplemented from i18npool::CalendarImpl.
Definition at line 1068 of file calendar_gregorian.cxx.
References cppu::supportsService().
|
private |
Definition at line 122 of file calendar_gregorian.hxx.
Referenced by getDays(), getDays2(), getDisplayName(), getDisplayStringImpl(), getGenitiveMonths2(), getLoadedCalendar(), getLoadedCalendar2(), getMinimumNumberOfDaysForFirstWeek(), getMonths(), getMonths2(), getNumberOfDaysInWeek(), getNumberOfMonthsInYear(), getPartitiveMonths2(), getUniqueID(), loadCalendar(), and setMinimumNumberOfDaysForFirstWeek().
|
protected |
Definition at line 106 of file calendar_gregorian.hxx.
Referenced by getDisplayName(), i18npool::Calendar_jewish::getDisplayString(), getDisplayStringImpl(), and loadCalendar().
|
protected |
Definition at line 103 of file calendar_gregorian.hxx.
Referenced by addValue(), getDateTime(), getFirstDayOfWeek(), getLocalDateTime(), getValue(), init(), setDateTime(), setFirstDayOfWeek(), setLocalDateTime(), setMinimumNumberOfDaysForFirstWeek(), setTimeZone(), setValue(), and submitFields().
|
protected |
Definition at line 105 of file calendar_gregorian.hxx.
Referenced by i18npool::Calendar_buddhist::Calendar_buddhist(), i18npool::Calendar_dangi::Calendar_dangi(), i18npool::Calendar_gengou::Calendar_gengou(), i18npool::Calendar_hanja::Calendar_hanja(), i18npool::Calendar_hanja_yoil::Calendar_hanja_yoil(), i18npool::Calendar_hijri::Calendar_hijri(), i18npool::Calendar_jewish::Calendar_jewish(), i18npool::Calendar_ROC::Calendar_ROC(), getImplementationName(), getSupportedServiceNames(), and init().
|
protected |
Definition at line 102 of file calendar_gregorian.hxx.
Referenced by getDisplayStringImpl(), init(), mapFromGregorian(), and mapToGregorian().
|
protected |
Definition at line 107 of file calendar_gregorian.hxx.
Referenced by getCombinedOffset(), getDateTime(), getLocalDateTime(), getValue(), init(), isValid(), mapToGregorian(), i18npool::Calendar_hijri::mapToGregorian(), i18npool::Calendar_jewish::mapToGregorian(), setTimeZone(), setValue(), and submitFields().
|
protected |
Definition at line 109 of file calendar_gregorian.hxx.
Referenced by isValid(), mapToGregorian(), i18npool::Calendar_hijri::mapToGregorian(), i18npool::Calendar_jewish::mapToGregorian(), setValue(), and submitFields().
|
protected |
Definition at line 108 of file calendar_gregorian.hxx.
Referenced by getCombinedOffset(), getValue(), isValid(), mapFromGregorian(), i18npool::Calendar_hijri::mapFromGregorian(), i18npool::Calendar_jewish::mapFromGregorian(), mapToGregorian(), and setValue().
|
protected |
Definition at line 104 of file calendar_gregorian.hxx.
Referenced by i18npool::Calendar_jewish::getDisplayString(), and getDisplayStringImpl().