diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-07-30 13:39:09 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-07-30 13:39:09 +0000 |
commit | 14fa9dbe4a71af54675285ef3bb38870be56b191 (patch) | |
tree | 520e999685a75349297d3641ea0adce748905ca0 /i18npool/source/calendar | |
parent | INTEGRATION: CWS i18n13 (1.8.92); FILE MERGED (diff) | |
download | core-14fa9dbe4a71af54675285ef3bb38870be56b191.tar.gz core-14fa9dbe4a71af54675285ef3bb38870be56b191.zip |
INTEGRATION: CWS i18n13 (1.9.26); FILE MERGED
2004/06/08 22:19:05 khong 1.9.26.1: #111946# add more gregorian calendar in different languages for Arabic locales
Diffstat (limited to 'i18npool/source/calendar')
-rw-r--r-- | i18npool/source/calendar/calendarImpl.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx index 15168c9fcaab..efba8eb60002 100644 --- a/i18npool/source/calendar/calendarImpl.cxx +++ b/i18npool/source/calendar/calendarImpl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: calendarImpl.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: rt $ $Date: 2004-01-20 13:20:45 $ + * last change: $Author: kz $ $Date: 2004-07-30 14:39:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -113,6 +113,19 @@ CalendarImpl::loadCalendar(const OUString& uniqueID, const Locale& rLocale ) thr if (i >= lookupTable.size()) { Reference < XInterface > xI = xMSF->createInstance( OUString::createFromAscii("com.sun.star.i18n.Calendar_") + uniqueID); + + if ( ! xI.is() ) { + // check if the calendar is defined in localedata, load gregorian calendar service. + Sequence< Calendar> xC = LocaleData().getAllCalendars(rLocale); + for (i = 0; i < xC.getLength(); i++) { + if (uniqueID == xC[i].Name) { + xI = xMSF->createInstance( + OUString::createFromAscii("com.sun.star.i18n.Calendar_gregorian")); + break; + } + } + } + if ( xI.is() ) xI->queryInterface(::getCppuType((const Reference< XExtendedCalendar>*)0)) >>= xCalendar; else |