25#include <com/sun/star/i18n/CalendarDisplayCode.hpp>
26#include <com/sun/star/i18n/CalendarDisplayIndex.hpp>
27#include <com/sun/star/i18n/NativeNumberMode.hpp>
28#include <com/sun/star/i18n/reservedWords.hpp>
31#include <rtl/math.hxx>
37#define erDUMP_ICU_CALENDAR 0
38#define erDUMP_I18N_CALENDAR 0
39#if erDUMP_ICU_CALENDAR || erDUMP_I18N_CALENDAR
47static void debug_cal_loc(
const char *f, int32_t l)
49 fprintf(stderr,
"%s:%d: ", f, l);
52static void debug_cal_msg(
const char *pat, ...)
56 vfprintf(stderr, pat, ap);
60#if erDUMP_ICU_CALENDAR
65extern void ucal_dump(
const icu::Calendar & );
66static void debug_icu_cal_dump( const ::icu::Calendar & r )
73#define DUMP_ICU_CAL_MSG(x) {debug_cal_loc(__FILE__,__LINE__);debug_cal_msg x;debug_icu_cal_dump(*body);}
75#define DUMP_ICU_CAL_MSG(x)
78#if erDUMP_I18N_CALENDAR
79static void debug_cal_millis_to_time(
long nMillis,
long & h,
long & m,
long & s,
long & f )
81 int sign = (nMillis < 0 ? -1 : 1);
82 nMillis = ::std::abs(nMillis);
83 h = sign * nMillis / (60 * 60 * 1000);
84 nMillis -= sign *
h * (60 * 60 * 1000);
85 m = nMillis / (60 * 1000);
86 nMillis -=
m * (60 * 1000);
88 nMillis -= s * (1000);
91static void debug_i18n_cal_dump( const ::icu::Calendar & r )
94 long nMillis,
h,
m, s, f;
95 fprintf( stderr,
" %04ld", (
long)r.get( UCAL_YEAR, status = U_ZERO_ERROR));
96 fprintf( stderr,
"-%02ld", (
long)r.get( UCAL_MONTH, status = U_ZERO_ERROR)+1);
97 fprintf( stderr,
"-%02ld", (
long)r.get( UCAL_DATE, status = U_ZERO_ERROR));
98 fprintf( stderr,
" %02ld", (
long)r.get( UCAL_HOUR_OF_DAY, status = U_ZERO_ERROR));
99 fprintf( stderr,
":%02ld", (
long)r.get( UCAL_MINUTE, status = U_ZERO_ERROR));
100 fprintf( stderr,
":%02ld", (
long)r.get( UCAL_SECOND, status = U_ZERO_ERROR));
101 fprintf( stderr,
" zone: %ld", (
long)(nMillis = r.get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR)));
102 fprintf( stderr,
" (%f min)", (
double)nMillis / 60000);
103 debug_cal_millis_to_time( nMillis, h, m, s, f);
104 fprintf( stderr,
" (%ld:%02ld:%02ld.%ld)", h, m, s, f);
105 fprintf( stderr,
" DST: %ld", (
long)(nMillis = r.get( UCAL_DST_OFFSET, status = U_ZERO_ERROR)));
106 fprintf( stderr,
" (%f min)", (
double)nMillis / 60000);
107 debug_cal_millis_to_time( nMillis, h, m, s, f);
108 fprintf( stderr,
" (%ld:%02ld:%02ld.%ld)", h, m, s, f);
109 fprintf( stderr,
"\n");
113#define DUMP_I18N_CAL_MSG(x) {debug_cal_loc(__FILE__,__LINE__);debug_cal_msg x;debug_i18n_cal_dump(*body);}
115#define DUMP_I18N_CAL_MSG(x)
119#define DUMP_ICU_CAL_MSG(x)
120#define DUMP_I18N_CAL_MSG(x)
139 return static_cast<sal_Int16
>(
a);
144 return static_cast<sal_Int32
>(
static_cast<sal_uInt16
>(
i));
160 cCalendar =
"com.sun.star.i18n.Calendar_gregorian";
183 icu::Locale aIcuLocale(
"",
nullptr,
nullptr,
"calendar=gregorian");
190 UErrorCode status = U_ZERO_ERROR;
191 body.reset( icu::Calendar::createInstance( aIcuLocale, status) );
202 cCalendar =
"com.sun.star.i18n.Calendar_hanja";
208 if ( displayIndex == CalendarDisplayIndex::AM_PM ) {
210 css::lang::Locale jaLocale(
"ja", OUString(), OUString());
222 cCalendar =
"com.sun.star.i18n.Calendar_hanja_yoil";
228 if ( displayIndex == CalendarDisplayIndex::AM_PM ) {
230 css::lang::Locale jaLocale(
"ja", OUString(), OUString());
250 cCalendar =
"com.sun.star.i18n.Calendar_gengou";
259 cCalendar =
"com.sun.star.i18n.Calendar_ROC";
272 cCalendar =
"com.sun.star.i18n.Calendar_dangi";
281 cCalendar =
"com.sun.star.i18n.Calendar_buddhist";
292 for (
const auto& rCal : xC)
294 if (uniqueID == rCal.Name)
299 aCalendar.MinimumNumberOfDaysForFirstWeek);
301 for (sal_Int16
day = sal::static_int_cast<sal_Int16>(
317css::i18n::Calendar2 SAL_CALL
323css::i18n::Calendar SAL_CALL
345 double fM = fTimeInDays * U_MILLIS_PER_DAY;
346 double fR = rtl::math::round( fM );
348 "Calendar_gregorian::setDateTime: " << std::fixed << fM <<
" rounded to " << fR);
349 UErrorCode status = U_ZERO_ERROR;
350 body->setTime( fR, status);
362 UErrorCode status = U_ZERO_ERROR;
363 double fR =
body->getTime(status);
365 return fR / U_MILLIS_PER_DAY;
372 double fM = fTimeInDays * U_MILLIS_PER_DAY;
373 double fR = rtl::math::round( fM );
375 "Calendar_gregorian::setLocalDateTime: " << std::fixed << fM <<
" rounded to " << fR);
376 int32_t nZoneOffset, nDSTOffset;
377 UErrorCode status = U_ZERO_ERROR;
378 body->getTimeZone().getOffset( fR,
true, nZoneOffset, nDSTOffset, status );
381 status = U_ZERO_ERROR;
382 body->setTime( fR - (nZoneOffset + nDSTOffset), status );
394 UErrorCode status = U_ZERO_ERROR;
395 double fTime =
body->getTime( status );
397 status = U_ZERO_ERROR;
398 int32_t nZoneOffset =
body->get( UCAL_ZONE_OFFSET, status );
400 status = U_ZERO_ERROR;
401 int32_t nDSTOffset =
body->get( UCAL_DST_OFFSET, status );
403 return (fTime + (nZoneOffset + nDSTOffset)) / U_MILLIS_PER_DAY;
413 const icu::UnicodeString aID(
reinterpret_cast<const UChar*
>(rTimeZone.getStr()), rTimeZone.getLength());
414 const std::unique_ptr<const icu::TimeZone> pTZ( icu::TimeZone::createTimeZone(aID));
418 body->setTimeZone(*pTZ);
451#define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR))
459 sal_Int16 e =
fieldValue[CalendarFieldIndex::ERA];
474 UCalendarDateFields f;
476 switch (fieldIndex) {
477 case CalendarFieldIndex::AM_PM: f = UCAL_AM_PM;
break;
478 case CalendarFieldIndex::DAY_OF_MONTH: f = UCAL_DATE;
break;
479 case CalendarFieldIndex::DAY_OF_WEEK: f = UCAL_DAY_OF_WEEK;
break;
480 case CalendarFieldIndex::DAY_OF_YEAR: f = UCAL_DAY_OF_YEAR;
break;
481 case CalendarFieldIndex::DST_OFFSET: f = UCAL_DST_OFFSET;
break;
482 case CalendarFieldIndex::ZONE_OFFSET: f = UCAL_ZONE_OFFSET;
break;
483 case CalendarFieldIndex::HOUR: f = UCAL_HOUR_OF_DAY;
break;
484 case CalendarFieldIndex::MINUTE: f = UCAL_MINUTE;
break;
485 case CalendarFieldIndex::SECOND: f = UCAL_SECOND;
break;
486 case CalendarFieldIndex::MILLISECOND: f = UCAL_MILLISECOND;
break;
487 case CalendarFieldIndex::WEEK_OF_MONTH: f = UCAL_WEEK_OF_MONTH;
break;
488 case CalendarFieldIndex::WEEK_OF_YEAR: f = UCAL_WEEK_OF_YEAR;
break;
489 case CalendarFieldIndex::YEAR: f = UCAL_YEAR;
break;
490 case CalendarFieldIndex::MONTH: f = UCAL_MONTH;
break;
491 case CalendarFieldIndex::ERA: f = UCAL_ERA;
break;
507 sal_Int16 nParentFieldIndex, sal_Int16 nChildFieldIndex )
const
510 bool bFieldsSet =
false;
511 if (
fieldSet & (1 << nParentFieldIndex))
514 o_nOffset =
static_cast<sal_Int32
>(
fieldValue[nParentFieldIndex]) * 60000;
516 if (
fieldSet & (1 << nChildFieldIndex))
520 o_nOffset -=
static_cast<sal_uInt16
>(
fieldValue[nChildFieldIndex]);
522 o_nOffset +=
static_cast<sal_uInt16
>(
fieldValue[nChildFieldIndex]);
530 CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS);
536 CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS);
550 case CalendarFieldIndex::ZONE_OFFSET:
551 case CalendarFieldIndex::DST_OFFSET:
552 case CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS:
553 case CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS:
558 sal_Int32 nZoneOffset, nDSTOffset;
580#if erDUMP_ICU_CALENDAR || erDUMP_I18N_CALENDAR
584 sal_Int32 nTmp =
body->get( UCAL_DATE, status = U_ZERO_ERROR);
597 if (fieldIndex == CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS ||
598 fieldIndex == CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS)
601 UErrorCode status = U_ZERO_ERROR;
603 fieldIndex), status);
608 if (fieldIndex == CalendarFieldIndex::ZONE_OFFSET)
610 sal_Int32 nMinutes =
value / 60000;
611 sal_Int16 nMillis =
static_cast<sal_Int16
>(
static_cast<sal_uInt16
>(
613 fieldValue[CalendarFieldIndex::ZONE_OFFSET] =
static_cast<sal_Int16
>( nMinutes);
614 fieldValue[CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS] = nMillis;
616 else if (fieldIndex == CalendarFieldIndex::DST_OFFSET)
618 sal_Int32 nMinutes =
value / 60000;
619 sal_Int16 nMillis =
static_cast<sal_Int16
>(
static_cast<sal_uInt16
>(
621 fieldValue[CalendarFieldIndex::DST_OFFSET] =
static_cast<sal_Int16
>( nMinutes);
622 fieldValue[CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS] = nMillis;
628 if ( fieldIndex == CalendarFieldIndex::DAY_OF_WEEK )
653 UErrorCode status = U_ZERO_ERROR;
669 if (tmp & (1 << fieldIndex)) {
687 sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode, sal_Int32 value )
689 bool isShort = ((nCalendarDisplayCode == CalendarDisplayCode::SHORT_YEAR ||
690 nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR) &&
value >= 100) ||
691 nCalendarDisplayCode == CalendarDisplayCode::SHORT_QUARTER ||
692 nCalendarDisplayCode == CalendarDisplayCode::LONG_QUARTER;
693 bool isChinese = aLocale.Language ==
"zh";
694 bool isJapanese = aLocale.Language ==
"ja";
695 bool isKorean = aLocale.Language ==
"ko";
697 if (isChinese || isJapanese || isKorean) {
698 switch (nNativeNumberMode) {
699 case NativeNumberMode::NATNUM1:
701 nNativeNumberMode = isJapanese ? NativeNumberMode::NATNUM4 : NativeNumberMode::NATNUM7;
703 case NativeNumberMode::NATNUM2:
705 nNativeNumberMode = isJapanese ? NativeNumberMode::NATNUM5 : NativeNumberMode::NATNUM8;
707 case NativeNumberMode::NATNUM3:
709 case NativeNumberMode::NATNUM4:
711 return isShort ? NativeNumberMode::NATNUM9 : NativeNumberMode::NATNUM11;
716 return nNativeNumberMode;
721 switch( nCalendarDisplayCode ) {
722 case CalendarDisplayCode::SHORT_DAY:
723 case CalendarDisplayCode::LONG_DAY:
724 return CalendarFieldIndex::DAY_OF_MONTH;
725 case CalendarDisplayCode::SHORT_DAY_NAME:
726 case CalendarDisplayCode::LONG_DAY_NAME:
727 case CalendarDisplayCode::NARROW_DAY_NAME:
728 return CalendarFieldIndex::DAY_OF_WEEK;
729 case CalendarDisplayCode::SHORT_QUARTER:
730 case CalendarDisplayCode::LONG_QUARTER:
731 case CalendarDisplayCode::SHORT_MONTH:
732 case CalendarDisplayCode::LONG_MONTH:
733 case CalendarDisplayCode::SHORT_MONTH_NAME:
734 case CalendarDisplayCode::LONG_MONTH_NAME:
735 case CalendarDisplayCode::NARROW_MONTH_NAME:
736 case CalendarDisplayCode::SHORT_GENITIVE_MONTH_NAME:
737 case CalendarDisplayCode::LONG_GENITIVE_MONTH_NAME:
738 case CalendarDisplayCode::NARROW_GENITIVE_MONTH_NAME:
739 case CalendarDisplayCode::SHORT_PARTITIVE_MONTH_NAME:
740 case CalendarDisplayCode::LONG_PARTITIVE_MONTH_NAME:
741 case CalendarDisplayCode::NARROW_PARTITIVE_MONTH_NAME:
742 return CalendarFieldIndex::MONTH;
743 case CalendarDisplayCode::SHORT_YEAR:
744 case CalendarDisplayCode::LONG_YEAR:
745 return CalendarFieldIndex::YEAR;
746 case CalendarDisplayCode::SHORT_ERA:
747 case CalendarDisplayCode::LONG_ERA:
748 return CalendarFieldIndex::ERA;
749 case CalendarDisplayCode::SHORT_YEAR_AND_ERA:
750 case CalendarDisplayCode::LONG_YEAR_AND_ERA:
751 return CalendarFieldIndex::YEAR;
762 return ::std::max( sal::static_int_cast<sal_Int16>(0),
763 sal::static_int_cast<sal_Int16>(
static_cast<sal_Int16
>(
764 body->getFirstDayOfWeek()) - 1));
771 body->setFirstDayOfWeek(
static_cast<UCalendarDaysOfWeek
>(
day + 1));
777 aCalendar.MinimumNumberOfDaysForFirstWeek = days;
778 body->setMinimalDaysInFirstWeek(
static_cast<uint8_t
>( days));
784 return aCalendar.MinimumNumberOfDaysForFirstWeek;
790 return static_cast<sal_Int16
>(
aCalendar.Months.getLength());
797 return static_cast<sal_Int16
>(
aCalendar.Days.getLength());
801Sequence< CalendarItem > SAL_CALL
808Sequence< CalendarItem > SAL_CALL
815Sequence< CalendarItem2 > SAL_CALL
822Sequence< CalendarItem2 > SAL_CALL
829Sequence< CalendarItem2 > SAL_CALL
836Sequence< CalendarItem2 > SAL_CALL
848 switch( displayIndex ) {
849 case CalendarDisplayIndex::AM_PM:
854 case CalendarDisplayIndex::DAY:
861 case CalendarDisplayIndex::MONTH:
868 case CalendarDisplayIndex::GENITIVE_MONTH:
875 case CalendarDisplayIndex::PARTITIVE_MONTH:
882 case CalendarDisplayIndex::ERA:
888 case CalendarDisplayIndex::YEAR:
910 if (nCalendarDisplayCode == CalendarDisplayCode::SHORT_QUARTER ||
911 nCalendarDisplayCode == CalendarDisplayCode::LONG_QUARTER) {
913 sal_Int16 quarter =
value / 3;
922 quarter = sal::static_int_cast<sal_Int16>( quarter +
923 ((nCalendarDisplayCode == CalendarDisplayCode::SHORT_QUARTER) ?
924 reservedWords::QUARTER1_ABBREVIATION : reservedWords::QUARTER1_WORD) );
925 aOUStr = xR[quarter];
930 switch( nCalendarDisplayCode ) {
931 case CalendarDisplayCode::SHORT_MONTH:
934 case CalendarDisplayCode::SHORT_DAY:
935 aOUStr = OUString::number(
value);
937 case CalendarDisplayCode::LONG_YEAR:
942 aOUStr = OUString::createFromAscii(
aStr);
945 aOUStr = OUString::number(
value);
947 case CalendarDisplayCode::LONG_MONTH:
952 aOUStr = OUString::createFromAscii(
aStr);
955 case CalendarDisplayCode::SHORT_YEAR:
968 aOUStr = OUString::number(
value);
973 aOUStr = OUString::createFromAscii(
aStr);
976 case CalendarDisplayCode::LONG_DAY:
980 aOUStr = OUString::createFromAscii(
aStr);
984 case CalendarDisplayCode::SHORT_DAY_NAME:
986 case CalendarDisplayCode::LONG_DAY_NAME:
988 case CalendarDisplayCode::NARROW_DAY_NAME:
990 case CalendarDisplayCode::SHORT_MONTH_NAME:
992 case CalendarDisplayCode::LONG_MONTH_NAME:
994 case CalendarDisplayCode::NARROW_MONTH_NAME:
996 case CalendarDisplayCode::SHORT_GENITIVE_MONTH_NAME:
998 case CalendarDisplayCode::LONG_GENITIVE_MONTH_NAME:
1000 case CalendarDisplayCode::NARROW_GENITIVE_MONTH_NAME:
1002 case CalendarDisplayCode::SHORT_PARTITIVE_MONTH_NAME:
1004 case CalendarDisplayCode::LONG_PARTITIVE_MONTH_NAME:
1006 case CalendarDisplayCode::NARROW_PARTITIVE_MONTH_NAME:
1008 case CalendarDisplayCode::SHORT_ERA:
1010 case CalendarDisplayCode::LONG_ERA:
1013 case CalendarDisplayCode::SHORT_YEAR_AND_ERA:
1017 case CalendarDisplayCode::LONG_YEAR_AND_ERA:
1026 if (nNativeNumberMode > 0 && nNativeNumberMode != 12) {
1029 && (nCalendarDisplayCode == CalendarDisplayCode::SHORT_YEAR ||
1030 nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR)
1031 && (nNativeNumberMode == NativeNumberMode::NATNUM1 ||
1032 nNativeNumberMode == NativeNumberMode::NATNUM2)) {
1034 return OUString(&gan, 1);
1048 if ((nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR_AND_ERA ||
1049 nCalendarDisplayCode == CalendarDisplayCode::SHORT_YEAR_AND_ERA) &&
1050 getValue(CalendarFieldIndex::ERA) == 0) {
1051 if (nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR_AND_ERA)
1064 return OUString::createFromAscii(
cCalendar);
1073Sequence< OUString > SAL_CALL
1076 Sequence< OUString > aRet { OUString::createFromAscii(
cCalendar) };
#define DUMP_ICU_CAL_MSG(x)
#define DUMP_I18N_CAL_MSG(x)
virtual OUString SAL_CALL getDisplayString(sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode) override
std::unique_ptr< icu::Calendar > body
sal_Int16 fieldSetValue[FIELD_INDEX_COUNT]
css::i18n::Calendar2 aCalendar
virtual double SAL_CALL getDateTime() override
void submitFields()
Submit fieldSetValue array according to fieldSet.
virtual void SAL_CALL loadCalendar(const OUString &uniqueID, const css::lang::Locale &rLocale) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< css::i18n::CalendarItem2 > SAL_CALL getDays2() override
void init(const Era *_eraArray)
virtual void SAL_CALL setLocalDateTime(double TimeInDays) override
virtual sal_Int16 SAL_CALL getMinimumNumberOfDaysForFirstWeek() override
virtual sal_Int16 SAL_CALL getFirstDayOfWeek() override
OUString getDisplayStringImpl(sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode, bool bEraMode)
virtual css::uno::Sequence< css::i18n::CalendarItem2 > SAL_CALL getGenitiveMonths2() override
rtl::Reference< NativeNumberSupplierService > mxNatNum
virtual void mapFromGregorian()
virtual double SAL_CALL getLocalDateTime() override
virtual css::uno::Sequence< css::i18n::CalendarItem > SAL_CALL getMonths() override
virtual OUString SAL_CALL getDisplayString(sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode) override
virtual OUString SAL_CALL getUniqueID() override
virtual css::uno::Sequence< css::i18n::CalendarItem2 > SAL_CALL getMonths2() override
virtual void SAL_CALL addValue(sal_Int16 nFieldIndex, sal_Int32 nAmount) override
virtual void SAL_CALL setDateTime(double fTimeInDays) override
bool getZoneOffset(sal_Int32 &o_nOffset) const
Obtain combined field values for timezone offset (minutes+secondmillis) in milliseconds and whether f...
virtual void SAL_CALL setMinimumNumberOfDaysForFirstWeek(sal_Int16 nDays) override
virtual ~Calendar_gregorian() override
Destructor.
void setValue()
Set fields internally.
bool getDSTOffset(sal_Int32 &o_nOffset) const
Obtain combined field values for DST offset (minutes+secondmillis) in milliseconds and whether fields...
virtual css::uno::Sequence< css::i18n::CalendarItem2 > SAL_CALL getPartitiveMonths2() override
virtual css::i18n::Calendar2 SAL_CALL getLoadedCalendar2() override
virtual css::uno::Sequence< css::i18n::CalendarItem > SAL_CALL getDays() override
css::lang::Locale aLocale
virtual sal_Bool SAL_CALL isValid() override
virtual void mapToGregorian()
virtual css::i18n::Calendar SAL_CALL getLoadedCalendar() override
virtual void SAL_CALL setFirstDayOfWeek(sal_Int16 nDay) override
bool setTimeZone(const OUString &rTimeZone)
sal_Int16 fieldValue[FIELD_INDEX_COUNT]
virtual OUString SAL_CALL getDisplayName(sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Int16 SAL_CALL getNumberOfDaysInWeek() override
bool getCombinedOffset(sal_Int32 &o_nOffset, sal_Int16 nParentFieldIndex, sal_Int16 nChildFieldIndex) const
Used by getZoneOffset() and getDSTOffset().
virtual sal_Int16 SAL_CALL getNumberOfMonthsInYear() override
virtual OUString SAL_CALL getImplementationName() override
virtual OUString SAL_CALL getDisplayName(sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType) override
virtual OUString SAL_CALL getDisplayName(sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType) override
static rtl::Reference< LocaleDataImpl > get()
static css::uno::Sequence< css::i18n::CalendarItem > downcastCalendarItems(const css::uno::Sequence< css::i18n::CalendarItem2 > &rCi)
static css::i18n::Calendar downcastCalendar(const css::i18n::Calendar2 &rC)
#define SAL_INFO_IF(condition, area, stream)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Constant values shared between i18npool and, for example, the number formatter.
static sal_Int32 DisplayCode2FieldIndex(sal_Int32 nCalendarDisplayCode)
static UCalendarDateFields fieldNameConverter(sal_Int16 fieldIndex)
static sal_Int32 cast16To32(sal_Int16 i)
const Era buddhist_eraArray[]
const sal_Int16 FIELD_INDEX_COUNT
const Era gengou_eraArray[]
static sal_Int16 cast32To16(sal_Int32 a)
const Era dangi_eraArray[]
The start year of the Korean traditional calendar (Dan-gi) is the inaugural year of Dan-gun (BC 2333)...
const sal_uInt8 kDisplayEraForcedLongYear
static sal_Int16 NatNumForCalendar(const css::lang::Locale &aLocale, sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode, sal_Int32 value)
int sprintf(char(&s)[N], char const *format, T &&... arguments)
SwNodeOffset abs(const SwNodeOffset &a)