From 4e1fd2fa161708049f1c3b6039659d0bf4f4539e Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Tue, 6 Jan 2009 12:54:16 +0000 Subject: [PATCH] CWS-TOOLING: integrate CWS locales31 2008-12-10 14:56:44 +0100 er r265193 : calling convention mismatch 2008-12-08 12:04:56 +0100 er r264984 : #i96840# classify some extra languages as CTL 2008-12-05 19:54:02 +0100 erack r264916 : ImpSvNumberformatScan::ScanType: do not miscategorize as automtic currency if currency symbol in General string, such as R in Standard 2008-12-04 12:07:05 +0100 erack r264831 : CWS-TOOLING: rebase CWS locales31 to trunk@264807 (milestone: DEV300:m37) 2008-12-03 16:14:17 +0100 erack r264797 : #i93694# update script+language -> unicode digit mapping; patch from 2008-11-25 02:01:18 +0100 erack r264270 : #i83349# apply remaining parts of the patch, now that we use ICU 4.0; contributed by 2008-11-25 01:38:20 +0100 erack r264269 : #i93694# test the bit, not the constant ... 2008-11-24 10:34:58 +0100 erack r264211 : #i93694# LANGUAGE_ARABIC is gone 2008-11-24 01:39:25 +0100 erack r264192 : #i94435# LANGUAGE_SPANISH now is an alias of LANGUAGE_SPANISH_MODERN, need LANGUAGE_SPANISH_DATED in switch case if both are to be used 2008-11-23 22:54:17 +0100 erack r264190 : CWS-TOOLING: rebase CWS locales31 to trunk@263288 (milestone: DEV300:m35) 2008-11-23 20:23:28 +0100 erack r264189 : migrate CWS locales31 to SVN --- cppcanvas/source/mtfrenderer/implrenderer.cxx | 64 +-- i18npool/inc/calendar_gregorian.hxx | 41 +- i18npool/inc/calendar_hijri.hxx | 4 +- i18npool/inc/calendar_jewish.hxx | 4 +- i18npool/inc/i18npool/lang.h | 19 +- i18npool/inc/i18npool/mslangid.hxx | 6 +- i18npool/inc/transliteration_caseignore.hxx | 8 +- i18npool/inc/xdictionary.hxx | 38 +- i18npool/source/breakiterator/xdictionary.cxx | 34 +- .../source/calendar/calendar_gregorian.cxx | 373 +++++++++++--- i18npool/source/calendar/calendar_hijri.cxx | 4 +- i18npool/source/calendar/calendar_jewish.cxx | 4 +- .../source/collator/data/collator_data.map | 1 + .../source/collator/data/my_dictionary.txt | 373 ++++++++++++++ .../defaultnumberingprovider.cxx | 59 ++- i18npool/source/isolang/isolang.cxx | 40 +- i18npool/source/isolang/mslangid.cxx | 63 ++- i18npool/source/localedata/LocaleNode.cxx | 78 ++- i18npool/source/localedata/LocaleNode.hxx | 4 +- i18npool/source/localedata/data/it_IT.xml | 16 +- i18npool/source/localedata/data/locale.dtd | 15 +- .../localedata/data/localedata_euro.map | 17 + .../localedata/data/localedata_others.map | 51 ++ i18npool/source/localedata/data/makefile.mk | 10 +- i18npool/source/localedata/data/mt_MT.xml | 359 +++++++++++++ i18npool/source/localedata/data/my_MM.xml | 486 ++++++++++++++++++ i18npool/source/localedata/data/sh_RS.xml | 70 +-- i18npool/source/localedata/data/shs_CA.xml | 414 +++++++++++++++ i18npool/source/localedata/data/sr_RS.xml | 24 +- i18npool/source/localedata/data/tpi_PG.xml | 358 +++++++++++++ i18npool/source/localedata/data/zh_CN.xml | 8 +- i18npool/source/localedata/localedata.cxx | 6 +- i18npool/source/search/levdis.cxx | 96 ++-- i18npool/source/search/levdis.hxx | 14 +- .../transliteration_caseignore.cxx | 8 +- svtools/source/config/ctloptions.cxx | 10 +- svtools/source/misc/langtab.cxx | 7 +- svtools/source/misc/langtab.src | 42 +- svtools/source/numbers/zforfind.cxx | 38 +- svtools/source/numbers/zforlist.cxx | 41 +- svtools/source/numbers/zformat.cxx | 3 +- svtools/source/numbers/zforscan.cxx | 56 +- tools/source/rc/resmgr.cxx | 4 +- unotools/inc/unotools/calendarwrapper.hxx | 19 +- unotools/source/i18n/calendarwrapper.cxx | 78 ++- vcl/source/gdi/outdev3.cxx | 1 + vcl/source/gdi/sallayout.cxx | 101 ++-- 47 files changed, 3047 insertions(+), 522 deletions(-) create mode 100644 i18npool/source/collator/data/my_dictionary.txt create mode 100644 i18npool/source/localedata/data/mt_MT.xml create mode 100644 i18npool/source/localedata/data/my_MM.xml create mode 100644 i18npool/source/localedata/data/shs_CA.xml create mode 100644 i18npool/source/localedata/data/tpi_PG.xml diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index e50026b21b27..acf858536f9b 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -365,72 +365,62 @@ namespace return nChar; sal_Unicode nOffset(0); - switch( eLang ) + // eLang & LANGUAGE_MASK_PRIMARY catches language independent of region. + // CAVEAT! To some like Mongolian MS assigned the same primary language + // although the script type is different! + switch( eLang & LANGUAGE_MASK_PRIMARY ) { default: break; - case LANGUAGE_ARABIC: - // FALLTHROUGS intended - case LANGUAGE_ARABIC_SAUDI_ARABIA: - case LANGUAGE_ARABIC_IRAQ: - case LANGUAGE_ARABIC_EGYPT: - case LANGUAGE_ARABIC_LIBYA: - case LANGUAGE_ARABIC_ALGERIA: - case LANGUAGE_ARABIC_MOROCCO: - case LANGUAGE_ARABIC_TUNISIA: - case LANGUAGE_ARABIC_OMAN: - case LANGUAGE_ARABIC_YEMEN: - case LANGUAGE_ARABIC_SYRIA: - case LANGUAGE_ARABIC_JORDAN: - case LANGUAGE_ARABIC_LEBANON: - case LANGUAGE_ARABIC_KUWAIT: - case LANGUAGE_ARABIC_UAE: - case LANGUAGE_ARABIC_BAHRAIN: - case LANGUAGE_ARABIC_QATAR: - case LANGUAGE_URDU: - case LANGUAGE_URDU_PAKISTAN: - case LANGUAGE_URDU_INDIA: - case LANGUAGE_PUNJABI: //??? + case LANGUAGE_ARABIC_SAUDI_ARABIA & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_URDU & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_PUNJABI & LANGUAGE_MASK_PRIMARY: //??? nOffset = 0x0660 - '0'; // arabic/persian/urdu break; - case LANGUAGE_BENGALI: + case LANGUAGE_BENGALI & LANGUAGE_MASK_PRIMARY: nOffset = 0x09E6 - '0'; // bengali break; - case LANGUAGE_HINDI: + case LANGUAGE_BURMESE & LANGUAGE_MASK_PRIMARY: + nOffset = 0x1040 - '0'; // burmese + break; + case LANGUAGE_HINDI & LANGUAGE_MASK_PRIMARY: nOffset = 0x0966 - '0'; // devanagari break; - case LANGUAGE_GUJARATI: + case LANGUAGE_GUJARATI & LANGUAGE_MASK_PRIMARY: nOffset = 0x0AE6 - '0'; // gujarati break; - case LANGUAGE_KANNADA: + case LANGUAGE_KANNADA & LANGUAGE_MASK_PRIMARY: nOffset = 0x0CE6 - '0'; // kannada break; - case LANGUAGE_KHMER: + case LANGUAGE_KHMER & LANGUAGE_MASK_PRIMARY: nOffset = 0x17E0 - '0'; // khmer break; - case LANGUAGE_LAO: + case LANGUAGE_LAO & LANGUAGE_MASK_PRIMARY: nOffset = 0x0ED0 - '0'; // lao break; - case LANGUAGE_MALAYALAM: + case LANGUAGE_MALAYALAM & LANGUAGE_MASK_PRIMARY: nOffset = 0x0D66 - '0'; // malayalam break; - case LANGUAGE_MONGOLIAN: - nOffset = 0x1810 - '0'; // mongolian + case LANGUAGE_MONGOLIAN & LANGUAGE_MASK_PRIMARY: + if (eLang == LANGUAGE_MONGOLIAN_MONGOLIAN) + nOffset = 0x1810 - '0'; // mongolian + else + nOffset = 0; // mongolian cyrillic break; - case LANGUAGE_ORIYA: + case LANGUAGE_ORIYA & LANGUAGE_MASK_PRIMARY: nOffset = 0x0B66 - '0'; // oriya break; - case LANGUAGE_TAMIL: + case LANGUAGE_TAMIL & LANGUAGE_MASK_PRIMARY: nOffset = 0x0BE7 - '0'; // tamil break; - case LANGUAGE_TELUGU: + case LANGUAGE_TELUGU & LANGUAGE_MASK_PRIMARY: nOffset = 0x0C66 - '0'; // telugu break; - case LANGUAGE_THAI: + case LANGUAGE_THAI & LANGUAGE_MASK_PRIMARY: nOffset = 0x0E50 - '0'; // thai break; - case LANGUAGE_TIBETAN: + case LANGUAGE_TIBETAN & LANGUAGE_MASK_PRIMARY: nOffset = 0x0F20 - '0'; // tibetan break; } diff --git a/i18npool/inc/calendar_gregorian.hxx b/i18npool/inc/calendar_gregorian.hxx index dcfc2bc74ef1..3af095cc7959 100644 --- a/i18npool/inc/calendar_gregorian.hxx +++ b/i18npool/inc/calendar_gregorian.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: calendar_gregorian.hxx,v $ - * $Revision: 1.16 $ + * $Revision: 1.16.24.1 $ * * This file is part of OpenOffice.org. * @@ -47,6 +47,8 @@ struct Era { sal_Int32 day; }; +const sal_Int16 FIELD_INDEX_COUNT = CalendarFieldIndex::FIELD_COUNT2; + class Calendar_gregorian : public CalendarImpl { public: @@ -61,7 +63,7 @@ public: */ ~Calendar_gregorian(); - // Methods + // Methods in XCalendar virtual void SAL_CALL loadCalendar(const rtl::OUString& uniqueID, const com::sun::star::lang::Locale& rLocale) throw(com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDateTime(double nTimeInDays) throw(com::sun::star::uno::RuntimeException); virtual double SAL_CALL getDateTime() throw(com::sun::star::uno::RuntimeException); @@ -96,18 +98,33 @@ protected: const sal_Char* cCalendar; com::sun::star::lang::Locale aLocale; sal_uInt32 fieldSet; - sal_Int16 fieldValue[CalendarFieldIndex::FIELD_COUNT]; - sal_Int16 fieldSetValue[CalendarFieldIndex::FIELD_COUNT]; - virtual void SAL_CALL mapToGregorian() throw(com::sun::star::uno::RuntimeException); - virtual void SAL_CALL mapFromGregorian() throw(com::sun::star::uno::RuntimeException); - void SAL_CALL getValue() throw(com::sun::star::uno::RuntimeException); + sal_Int16 fieldValue[FIELD_INDEX_COUNT]; + sal_Int16 fieldSetValue[FIELD_INDEX_COUNT]; + + virtual void mapToGregorian() throw(com::sun::star::uno::RuntimeException); + virtual void mapFromGregorian() throw(com::sun::star::uno::RuntimeException); + void getValue() throw(com::sun::star::uno::RuntimeException); + private: - // submit fieldSetValue array according to fieldSet - void SAL_CALL submitFields() throw(com::sun::star::uno::RuntimeException); - // submit fieldSetValue array according to fieldSet, plus YMDhms if >=0 - void SAL_CALL submitValues( sal_Int32 nYear, sal_Int32 nMonth, sal_Int32 nDay, sal_Int32 nHour, sal_Int32 nMinute, sal_Int32 nSecond, sal_Int32 nMilliSecond) throw(com::sun::star::uno::RuntimeException); - void SAL_CALL setValue() throw(com::sun::star::uno::RuntimeException); Calendar aCalendar; + + /** Submit fieldSetValue array according to fieldSet. */ + void submitFields() throw(com::sun::star::uno::RuntimeException); + /** Submit fieldSetValue array according to fieldSet, plus YMDhms if >=0, + plus zone and DST if != 0 */ + void submitValues( sal_Int32 nYear, sal_Int32 nMonth, sal_Int32 nDay, sal_Int32 nHour, sal_Int32 nMinute, sal_Int32 nSecond, sal_Int32 nMilliSecond, sal_Int32 nZone, sal_Int32 nDST) throw(com::sun::star::uno::RuntimeException); + /** Set fields internally. */ + void setValue() throw(com::sun::star::uno::RuntimeException); + /** Obtain combined field values for timezone offset (minutes+secondmillis) + in milliseconds and whether fields were set. */ + bool getZoneOffset( sal_Int32 & o_nOffset ) const; + /** Obtain combined field values for DST offset (minutes+secondmillis) in + milliseconds and whether fields were set. */ + bool getDSTOffset( sal_Int32 & o_nOffset ) const; + /** Used by getZoneOffset() and getDSTOffset(). Parent is + CalendarFieldIndex for offset in minutes, child is CalendarFieldIndex + for offset in milliseconds. */ + bool getCombinedOffset( sal_Int32 & o_nOffset, sal_Int16 nParentFieldIndex, sal_Int16 nChildFieldIndex ) const; }; // ---------------------------------------------------- diff --git a/i18npool/inc/calendar_hijri.hxx b/i18npool/inc/calendar_hijri.hxx index 404f9955843e..bd10985aaad2 100644 --- a/i18npool/inc/calendar_hijri.hxx +++ b/i18npool/inc/calendar_hijri.hxx @@ -47,8 +47,8 @@ public: Calendar_hijri(); protected: - void SAL_CALL mapToGregorian() throw(com::sun::star::uno::RuntimeException); - void SAL_CALL mapFromGregorian() throw(com::sun::star::uno::RuntimeException); + void mapToGregorian() throw(com::sun::star::uno::RuntimeException); + void mapFromGregorian() throw(com::sun::star::uno::RuntimeException); // radians per degree (pi/180) static const double RadPerDeg; diff --git a/i18npool/inc/calendar_jewish.hxx b/i18npool/inc/calendar_jewish.hxx index c6170c8d6cac..1af374192558 100644 --- a/i18npool/inc/calendar_jewish.hxx +++ b/i18npool/inc/calendar_jewish.hxx @@ -48,8 +48,8 @@ public: virtual rtl::OUString SAL_CALL getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) throw (com::sun::star::uno::RuntimeException); protected: - void SAL_CALL mapToGregorian() throw(com::sun::star::uno::RuntimeException); - void SAL_CALL mapFromGregorian() throw(com::sun::star::uno::RuntimeException); + void mapToGregorian() throw(com::sun::star::uno::RuntimeException); + void mapFromGregorian() throw(com::sun::star::uno::RuntimeException); }; } } } } diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h index b86db2453dad..68ae24bc2c21 100644 --- a/i18npool/inc/i18npool/lang.h +++ b/i18npool/inc/i18npool/lang.h @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: lang.h,v $ - * $Revision: 1.12 $ + * $Revision: 1.12.24.7 $ * * This file is part of OpenOffice.org. * @@ -117,7 +117,6 @@ typedef unsigned short LanguageType; #define LANGUAGE_ALBANIAN 0x041C #define LANGUAGE_ALSATIAN_FRANCE 0x0484 #define LANGUAGE_AMHARIC_ETHIOPIA 0x045E -#define LANGUAGE_ARABIC 0x0001 /* primary only, not a locale! */ #define LANGUAGE_ARABIC_ALGERIA 0x1401 #define LANGUAGE_ARABIC_BAHRAIN 0x3C01 #define LANGUAGE_ARABIC_EGYPT 0x0C01 @@ -134,6 +133,7 @@ typedef unsigned short LanguageType; #define LANGUAGE_ARABIC_TUNISIA 0x1C01 #define LANGUAGE_ARABIC_UAE 0x3801 #define LANGUAGE_ARABIC_YEMEN 0x2401 +#define LANGUAGE_ARABIC_PRIMARY_ONLY 0x0001 /* primary only, not a locale! */ #define LANGUAGE_ARMENIAN 0x042B #define LANGUAGE_ASSAMESE 0x044D #define LANGUAGE_AZERI 0x002C /* primary only, not a locale! */ @@ -323,7 +323,7 @@ typedef unsigned short LanguageType; #define LANGUAGE_UPPER_SORBIAN_GERMANY 0x042E /* obsoletes LANGUAGE_USER_UPPER_SORBIAN 0x0623 */ #define LANGUAGE_LOWER_SORBIAN_GERMANY 0x082E /* obsoletes LANGUAGE_USER_LOWER_SORBIAN 0x0624. NOTE: the primary ID is identical to Upper Sorbian, which is not quite correct because they're distinct languages */ #define LANGUAGE_SORBIAN LANGUAGE_USER_UPPER_SORBIAN /* a strange MS definition */ -#define LANGUAGE_SPANISH 0x040A +#define LANGUAGE_SPANISH_DATED 0x040A /* old collation, not supported, see #i94435# */ #define LANGUAGE_SPANISH_ARGENTINA 0x2C0A #define LANGUAGE_SPANISH_BOLIVIA 0x400A #define LANGUAGE_SPANISH_CHILE 0x340A @@ -345,6 +345,7 @@ typedef unsigned short LanguageType; #define LANGUAGE_SPANISH_UNITED_STATES 0x540A #define LANGUAGE_SPANISH_URUGUAY 0x380A #define LANGUAGE_SPANISH_VENEZUELA 0x200A +#define LANGUAGE_SPANISH LANGUAGE_SPANISH_MODERN /* modern collation, see #i94435# */ #define LANGUAGE_SWAHILI 0x0441 /* Kenya */ #define LANGUAGE_SWEDISH 0x041D #define LANGUAGE_SWEDISH_FINLAND 0x081D @@ -370,7 +371,6 @@ typedef unsigned short LanguageType; #define LANGUAGE_URDU 0x0020 /* primary only, not a locale! */ #define LANGUAGE_URDU_INDIA 0x0820 #define LANGUAGE_URDU_PAKISTAN 0x0420 -#define LANGUAGE_UZBEK 0x0043 /* primary only, not a locale! */ #define LANGUAGE_UZBEK_CYRILLIC 0x0843 #define LANGUAGE_UZBEK_LATIN 0x0443 #define LANGUAGE_VENDA 0x0433 @@ -490,5 +490,16 @@ typedef unsigned short LanguageType; #define LANGUAGE_USER_MAITHILI_INDIA 0x0645 #define LANGUAGE_USER_SANTALI_INDIA 0x0646 #define LANGUAGE_USER_TETUN_TIMOR_LESTE 0x0A40 /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_USER_TETUN)) */ +#define LANGUAGE_USER_TOK_PISIN 0x0647 +#define LANGUAGE_USER_SHUSWAP 0x0648 +#define LANGUAGE_USER_ARABIC_CHAD 0x8001 /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_ARABIC_SAUDI_ARABIA)) */ +#define LANGUAGE_USER_ARABIC_COMOROS 0x8401 /* makeLangID( 0x21, getPrimaryLanguage( LANGUAGE_ARABIC_SAUDI_ARABIA)) */ +#define LANGUAGE_USER_ARABIC_DJIBOUTI 0x8801 /* makeLangID( 0x22, getPrimaryLanguage( LANGUAGE_ARABIC_SAUDI_ARABIA)) */ +#define LANGUAGE_USER_ARABIC_ERITREA 0x8C01 /* makeLangID( 0x23, getPrimaryLanguage( LANGUAGE_ARABIC_SAUDI_ARABIA)) */ +#define LANGUAGE_USER_ARABIC_ISRAEL 0x9001 /* makeLangID( 0x24, getPrimaryLanguage( LANGUAGE_ARABIC_SAUDI_ARABIA)) */ +#define LANGUAGE_USER_ARABIC_MAURITANIA 0x9401 /* makeLangID( 0x25, getPrimaryLanguage( LANGUAGE_ARABIC_SAUDI_ARABIA)) */ +#define LANGUAGE_USER_ARABIC_PALESTINE 0x9801 /* makeLangID( 0x26, getPrimaryLanguage( LANGUAGE_ARABIC_SAUDI_ARABIA)) */ +#define LANGUAGE_USER_ARABIC_SOMALIA 0x9C01 /* makeLangID( 0x27, getPrimaryLanguage( LANGUAGE_ARABIC_SAUDI_ARABIA)) */ +#define LANGUAGE_USER_ARABIC_SUDAN 0xA001 /* makeLangID( 0x28, getPrimaryLanguage( LANGUAGE_ARABIC_SAUDI_ARABIA)) */ #endif /* INCLUDED_I18NPOOL_LANG_H */ diff --git a/i18npool/inc/i18npool/mslangid.hxx b/i18npool/inc/i18npool/mslangid.hxx index ed7fda61f3f3..7cc5e6bd8926 100644 --- a/i18npool/inc/i18npool/mslangid.hxx +++ b/i18npool/inc/i18npool/mslangid.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: mslangid.hxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.24.1 $ * * This file is part of OpenOffice.org. * @@ -228,6 +228,10 @@ public: static bool hasForbiddenCharacters( LanguageType nLang ); + /** Whether locale needs input sequence checking. CTL locales. */ + static bool needsSequenceChecking( LanguageType nLang ); + + /** Get ::com::sun::star::i18n::ScriptType of locale. */ static sal_Int16 getScriptType( LanguageType nLang ); diff --git a/i18npool/inc/transliteration_caseignore.hxx b/i18npool/inc/transliteration_caseignore.hxx index 74cfd5646824..12c8f7487ce0 100644 --- a/i18npool/inc/transliteration_caseignore.hxx +++ b/i18npool/inc/transliteration_caseignore.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: transliteration_caseignore.hxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.24.1 $ * * This file is part of OpenOffice.org. * @@ -74,12 +74,6 @@ private: throw(com::sun::star::uno::RuntimeException); }; -class Transliteration_simplecaseignore: public Transliteration_caseignore -{ -public: - Transliteration_simplecaseignore(); -}; - } } } } #endif diff --git a/i18npool/inc/xdictionary.hxx b/i18npool/inc/xdictionary.hxx index b78ecd0a9788..32ffdbbfe377 100644 --- a/i18npool/inc/xdictionary.hxx +++ b/i18npool/inc/xdictionary.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: xdictionary.hxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.24.1 $ * * This file is part of OpenOffice.org. * @@ -37,17 +37,20 @@ namespace com { namespace sun { namespace star { namespace i18n { +// Whether to use cell boundary code, currently unused but prepared. +#define USE_CELL_BOUNDARY_CODE 0 + #define CACHE_MAX 32 // max cache structure number #define DEFAULT_SIZE 256 // for boundary size, to avoid alloc and release memory // cache structure. -typedef struct _WrodBreakCache { - sal_Bool SAL_CALL equals(const sal_Unicode *str, Boundary& boundary); // checking cached string +struct WordBreakCache { + sal_Bool equals(const sal_Unicode *str, Boundary& boundary); // checking cached string sal_Int32 length; // contents length saved here. sal_Unicode *contents; // seperated segment contents. sal_Int32* wordboundary; // word boundaries in segments. sal_Int32 size; // size of wordboundary -} WordBreakCache; +}; class xdictionary { @@ -59,26 +62,33 @@ private: const sal_Unicode* dataArea; oslModule hModule; Boundary boundary; + sal_Bool japaneseWordBreak; + +#if USE_CELL_BOUNDARY_CODE + // For CTL breakiterator, where the word boundary should not be inside cell. sal_Bool useCellBoundary; sal_Int32* cellBoundary; - sal_Bool japaneseWordBreak; +#endif public: xdictionary(const sal_Char *lang); ~xdictionary(); - Boundary SAL_CALL nextWord( const rtl::OUString& rText, sal_Int32 nPos, sal_Int16 wordType); - Boundary SAL_CALL previousWord( const rtl::OUString& rText, sal_Int32 nPos, sal_Int16 wordType); - Boundary SAL_CALL getWordBoundary( const rtl::OUString& rText, sal_Int32 nPos, sal_Int16 wordType, sal_Bool bDirection ); - void SAL_CALL setCellBoundary(sal_Int32* cellBondary); - void SAL_CALL setJapaneseWordBreak(); + Boundary nextWord( const rtl::OUString& rText, sal_Int32 nPos, sal_Int16 wordType); + Boundary previousWord( const rtl::OUString& rText, sal_Int32 nPos, sal_Int16 wordType); + Boundary getWordBoundary( const rtl::OUString& rText, sal_Int32 nPos, sal_Int16 wordType, sal_Bool bDirection ); + void setJapaneseWordBreak(); + +#if USE_CELL_BOUNDARY_CODE + void setCellBoundary(sal_Int32* cellArray); +#endif private: WordBreakCache cache[CACHE_MAX]; - sal_Bool SAL_CALL seekSegment(const sal_Unicode *text, sal_Int32 pos, sal_Int32 len, Boundary& boundary); - WordBreakCache& SAL_CALL getCache(const sal_Unicode *text, Boundary& boundary); - sal_Bool SAL_CALL exists(const sal_Unicode u); - sal_Int32 SAL_CALL getLongestMatch(const sal_Unicode *text, sal_Int32 len); + sal_Bool seekSegment(const sal_Unicode *text, sal_Int32 pos, sal_Int32 len, Boundary& boundary); + WordBreakCache& getCache(const sal_Unicode *text, Boundary& boundary); + sal_Bool exists(const sal_Unicode u); + sal_Int32 getLongestMatch(const sal_Unicode *text, sal_Int32 len); }; } } } } diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx index e532c0520077..eeafc899a39f 100644 --- a/i18npool/source/breakiterator/xdictionary.cxx +++ b/i18npool/source/breakiterator/xdictionary.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: xdictionary.cxx,v $ - * $Revision: 1.18.22.1 $ + * $Revision: 1.18.24.1 $ * * This file is part of OpenOffice.org. * @@ -90,8 +90,9 @@ xdictionary::xdictionary(const sal_Char *lang) for (sal_Int32 i = 0; i < CACHE_MAX; i++) cache[i].size = 0; - // for CTL breakiterator, which the word boundary should not inside cell. +#if USE_CELL_BOUNDARY_CODE useCellBoundary = sal_False; +#endif japaneseWordBreak = sal_False; } @@ -105,7 +106,7 @@ xdictionary::~xdictionary() { } } -void SAL_CALL xdictionary::setJapaneseWordBreak() +void xdictionary::setJapaneseWordBreak() { japaneseWordBreak = sal_True; } @@ -118,8 +119,7 @@ sal_Bool xdictionary::exists(const sal_Unicode c) { return exist; } -sal_Int32 SAL_CALL -xdictionary::getLongestMatch(const sal_Unicode* str, sal_Int32 sLen) { +sal_Int32 xdictionary::getLongestMatch(const sal_Unicode* str, sal_Int32 sLen) { if ( !index1 ) return 0; @@ -153,7 +153,7 @@ xdictionary::getLongestMatch(const sal_Unicode* str, sal_Int32 sLen) { * Compare two unicode string, */ -sal_Bool SAL_CALL WordBreakCache::equals(const sal_Unicode* str, Boundary& boundary) { +sal_Bool WordBreakCache::equals(const sal_Unicode* str, Boundary& boundary) { // Different length, different string. if (length != boundary.endPos - boundary.startPos) return sal_False; @@ -169,7 +169,7 @@ sal_Bool SAL_CALL WordBreakCache::equals(const sal_Unicode* str, Boundary& bound * @param pos : Position of the given character. * @return true if CJK. */ -sal_Bool SAL_CALL xdictionary::seekSegment(const sal_Unicode *text, sal_Int32 pos, +sal_Bool xdictionary::seekSegment(const sal_Unicode *text, sal_Int32 pos, sal_Int32 len, Boundary& segBoundary) { for (segBoundary.startPos = pos - 1; segBoundary.startPos >= 0 && @@ -189,7 +189,7 @@ sal_Bool SAL_CALL xdictionary::seekSegment(const sal_Unicode *text, sal_Int32 po #define KATAKANA 2 #define HIRAKANA 3 -static sal_Int16 SAL_CALL JapaneseCharType(sal_Unicode c) +static sal_Int16 JapaneseCharType(sal_Unicode c) { if (0x3041 <= c && c <= 0x309e) return HIRAKANA; @@ -198,7 +198,7 @@ static sal_Int16 SAL_CALL JapaneseCharType(sal_Unicode c) return KANJA; } -WordBreakCache& SAL_CALL xdictionary::getCache(const sal_Unicode *text, Boundary& wordBoundary) +WordBreakCache& xdictionary::getCache(const sal_Unicode *text, Boundary& wordBoundary) { WordBreakCache& aCache = cache[text[0] & 0x1f]; @@ -253,11 +253,14 @@ WordBreakCache& SAL_CALL xdictionary::getCache(const sal_Unicode *text, Boundary if (count) { aCache.wordboundary[i+1] = aCache.wordboundary[i] + count; i++; + +#if USE_CELL_BOUNDARY_CODE if (useCellBoundary) { sal_Int32 cBoundary = cellBoundary[aCache.wordboundary[i] + wordBoundary.startPos - 1]; if (cBoundary > 0) aCache.wordboundary[i] = cBoundary - wordBoundary.startPos; } +#endif } } @@ -265,11 +268,13 @@ WordBreakCache& SAL_CALL xdictionary::getCache(const sal_Unicode *text, Boundary aCache.wordboundary[i+1] = aCache.wordboundary[i] + len; i++; +#if USE_CELL_BOUNDARY_CODE if (useCellBoundary) { sal_Int32 cBoundary = cellBoundary[aCache.wordboundary[i] + wordBoundary.startPos - 1]; if (cBoundary > 0) aCache.wordboundary[i] = cBoundary - wordBoundary.startPos; } +#endif } } aCache.wordboundary[i + 1] = aCache.length + 1; @@ -277,7 +282,7 @@ WordBreakCache& SAL_CALL xdictionary::getCache(const sal_Unicode *text, Boundary return aCache; } -Boundary SAL_CALL xdictionary::previousWord(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType) +Boundary xdictionary::previousWord(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType) { // looking for the first non-whitespace character from anyPos sal_uInt32 ch = rText.iterateCodePoints(&anyPos, -1); @@ -287,7 +292,7 @@ Boundary SAL_CALL xdictionary::previousWord(const OUString& rText, sal_Int32 any return getWordBoundary(rText, anyPos, wordType, true); } -Boundary SAL_CALL xdictionary::nextWord(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType) +Boundary xdictionary::nextWord(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType) { boundary = getWordBoundary(rText, anyPos, wordType, true); anyPos = boundary.endPos; @@ -301,7 +306,7 @@ Boundary SAL_CALL xdictionary::nextWord(const OUString& rText, sal_Int32 anyPos, return getWordBoundary(rText, anyPos, wordType, true); } -Boundary SAL_CALL xdictionary::getWordBoundary(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType, sal_Bool bDirection) +Boundary xdictionary::getWordBoundary(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType, sal_Bool bDirection) { const sal_Unicode *text=rText.getStr(); sal_Int32 len=rText.getLength(); @@ -334,11 +339,12 @@ Boundary SAL_CALL xdictionary::getWordBoundary(const OUString& rText, sal_Int32 return boundary; } - -void SAL_CALL xdictionary::setCellBoundary(sal_Int32* cellArray) +#if USE_CELL_BOUNDARY_CODE +void xdictionary::setCellBoundary(sal_Int32* cellArray) { useCellBoundary = sal_True; cellBoundary = cellArray; } +#endif } } } } diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index 415e345ce82b..8a19ce5bade9 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: calendar_gregorian.cxx,v $ - * $Revision: 1.34 $ + * $Revision: 1.34.24.1 $ * * This file is part of OpenOffice.org. * @@ -44,37 +44,90 @@ #include #define erDUMP_ICU_CALENDAR 0 -#if erDUMP_ICU_CALENDAR -// Make icu with -// DEFS = -DU_DEBUG_CALSVC -DUCAL_DEBUG_DUMP -// in icu/$(INPATH)/misc/build/icu/source/icudefs.mk -// May need some patches to fix unmaintained things there. -extern void ucal_dump( const icu::Calendar & ); -# include -static void debug_cal_dump( const ::icu::Calendar & r ) -{ - ucal_dump(r); - fflush(stderr); - // set a breakpoint here to pause display between dumps -} +#define erDUMP_I18N_CALENDAR 0 +#if erDUMP_ICU_CALENDAR || erDUMP_I18N_CALENDAR +// If both are used, DUMP_ICU_CAL_MSG() must be used before DUMP_I18N_CAL_MSG() +// to obtain internally set values from ICU, else Calendar::get() calls in +// DUMP_I18N_CAL_MSG() recalculate! + // These pieces of macro are shamelessly borrowed from icu's olsontz.cpp, the -// double parens'ed approach to passing multiple parameters as one macro -// parameter is appealing. +// double parens'ed approach to pass multiple parameters as one macro parameter +// is appealing. static void debug_cal_loc(const char *f, int32_t l) { fprintf(stderr, "%s:%d: ", f, l); } +# include static void debug_cal_msg(const char *pat, ...) { va_list ap; va_start(ap, pat); vfprintf(stderr, pat, ap); } -// must use double parens, i.e.: DUMP_CAL_MSG(("four is: %d",4)); -#define DUMP_CAL_MSG(x) {debug_cal_loc(__FILE__,__LINE__);debug_cal_msg x;debug_cal_dump(*body);} -#else -#define DUMP_CAL_MSG(x) -#endif + +#if erDUMP_ICU_CALENDAR +// Make icu with +// DEFS = -DU_DEBUG_CALSVC -DUCAL_DEBUG_DUMP +// in icu/$(INPATH)/misc/build/icu/source/icudefs.mk +// May need some patches to fix unmaintained things there. +extern void ucal_dump( const icu::Calendar & ); +static void debug_icu_cal_dump( const ::icu::Calendar & r ) +{ + ucal_dump(r); + fflush(stderr); + // set a breakpoint here to pause display between dumps +} +// must use double parens, i.e.: DUMP_ICU_CAL_MSG(("four is: %d",4)); +#define DUMP_ICU_CAL_MSG(x) {debug_cal_loc(__FILE__,__LINE__);debug_cal_msg x;debug_icu_cal_dump(*body);} +#else // erDUMP_ICU_CALENDAR +#define DUMP_ICU_CAL_MSG(x) +#endif // erDUMP_ICU_CALENDAR + +#if erDUMP_I18N_CALENDAR +static void debug_cal_millis_to_time( long nMillis, long & h, long & m, long & s, long & f ) +{ + int sign = (nMillis < 0 ? -1 : 1); + nMillis = ::std::abs(nMillis); + h = sign * nMillis / (60 * 60 * 1000); + nMillis -= sign * h * (60 * 60 * 1000); + m = nMillis / (60 * 1000); + nMillis -= m * (60 * 1000); + s = nMillis / (1000); + nMillis -= s * (1000); + f = nMillis; +} +static void debug_i18n_cal_dump( const ::icu::Calendar & r ) +{ + UErrorCode status; + long nMillis, h, m, s, f; + fprintf( stderr, " %04ld", (long)r.get( UCAL_YEAR, status = U_ZERO_ERROR)); + fprintf( stderr, "-%02ld", (long)r.get( UCAL_MONTH, status = U_ZERO_ERROR)+1); + fprintf( stderr, "-%02ld", (long)r.get( UCAL_DATE, status = U_ZERO_ERROR)); + fprintf( stderr, " %02ld", (long)r.get( UCAL_HOUR_OF_DAY, status = U_ZERO_ERROR)); + fprintf( stderr, ":%02ld", (long)r.get( UCAL_MINUTE, status = U_ZERO_ERROR)); + fprintf( stderr, ":%02ld", (long)r.get( UCAL_SECOND, status = U_ZERO_ERROR)); + fprintf( stderr, " zone: %ld", (long)(nMillis = r.get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR))); + fprintf( stderr, " (%f min)", (double)nMillis / 60000); + debug_cal_millis_to_time( nMillis, h, m, s, f); + fprintf( stderr, " (%ld:%02ld:%02ld.%ld)", h, m, s, f); + fprintf( stderr, " DST: %ld", (long)(nMillis = r.get( UCAL_DST_OFFSET, status = U_ZERO_ERROR))); + fprintf( stderr, " (%f min)", (double)nMillis / 60000); + debug_cal_millis_to_time( nMillis, h, m, s, f); + fprintf( stderr, " (%ld:%02ld:%02ld.%ld)", h, m, s, f); + fprintf( stderr, "\n"); + fflush(stderr); +} +// must use double parens, i.e.: DUMP_I18N_CAL_MSG(("four is: %d",4)); +#define DUMP_I18N_CAL_MSG(x) {debug_cal_loc(__FILE__,__LINE__);debug_cal_msg x;debug_i18n_cal_dump(*body);} +#else // erDUMP_I18N_CALENDAR +#define DUMP_I18N_CAL_MSG(x) +#endif // erDUMP_I18N_CALENDAR + +#else // erDUMP_ICU_CALENDAR || erDUMP_I18N_CALENDAR +#define DUMP_ICU_CAL_MSG(x) +#define DUMP_I18N_CAL_MSG(x) +#endif // erDUMP_ICU_CALENDAR || erDUMP_I18N_CALENDAR + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -234,8 +287,7 @@ Calendar_gregorian::getDateTime() throw(RuntimeException) // map field value from gregorian calendar to other calendar, it can be overwritten by derived class. // By using eraArray, it can take care Japanese and Taiwan ROC calendar. -void SAL_CALL -Calendar_gregorian::mapFromGregorian() throw(RuntimeException) +void Calendar_gregorian::mapFromGregorian() throw(RuntimeException) { if (eraArray) { sal_Int16 e, y, m, d; @@ -263,7 +315,7 @@ Calendar_gregorian::mapFromGregorian() throw(RuntimeException) #define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR)) // map field value from other calendar to gregorian calendar, it can be overwritten by derived class. // By using eraArray, it can take care Japanese and Taiwan ROC calendar. -void SAL_CALL Calendar_gregorian::mapToGregorian() throw(RuntimeException) +void Calendar_gregorian::mapToGregorian() throw(RuntimeException) { if (eraArray && (fieldSet & FIELDS)) { sal_Int16 y, e = fieldValue[CalendarFieldIndex::ERA]; @@ -290,8 +342,8 @@ static UCalendarDateFields fieldNameConverter(sal_Int16 fieldIndex) throw(Runtim case CalendarFieldIndex::DST_OFFSET: f = UCAL_DST_OFFSET; break; case CalendarFieldIndex::ZONE_OFFSET: f = UCAL_ZONE_OFFSET; break; case CalendarFieldIndex::HOUR: f = UCAL_HOUR_OF_DAY; break; - case CalendarFieldIndex::MINUTE: f = UCAL_MINUTE; break; - case CalendarFieldIndex::SECOND: f = UCAL_SECOND; break; + case CalendarFieldIndex::MINUTE: f = UCAL_MINUTE; break; + case CalendarFieldIndex::SECOND: f = UCAL_SECOND; break; case CalendarFieldIndex::MILLISECOND: f = UCAL_MILLISECOND; break; case CalendarFieldIndex::WEEK_OF_MONTH: f = UCAL_WEEK_OF_MONTH; break; case CalendarFieldIndex::WEEK_OF_YEAR: f = UCAL_WEEK_OF_YEAR; break; @@ -306,27 +358,75 @@ static UCalendarDateFields fieldNameConverter(sal_Int16 fieldIndex) throw(Runtim void SAL_CALL Calendar_gregorian::setValue( sal_Int16 fieldIndex, sal_Int16 value ) throw(RuntimeException) { - fieldSet |= (1 << fieldIndex); - fieldValue[fieldIndex] = value; + if (fieldIndex < 0 || FIELD_INDEX_COUNT <= fieldIndex) + throw ERROR; + fieldSet |= (1 << fieldIndex); + fieldValue[fieldIndex] = value; } -void SAL_CALL Calendar_gregorian::submitFields() throw(com::sun::star::uno::RuntimeException) +bool Calendar_gregorian::getCombinedOffset( sal_Int32 & o_nOffset, + sal_Int16 nParentFieldIndex, sal_Int16 nChildFieldIndex ) const { - for (sal_Int16 fieldIndex = 0; fieldIndex < CalendarFieldIndex::FIELD_COUNT; fieldIndex++) + o_nOffset = 0; + bool bFieldsSet = false; + if (fieldSet & (1 << nParentFieldIndex)) + { + bFieldsSet = true; + o_nOffset = static_cast( fieldValue[nParentFieldIndex]) * 60000; + } + if (fieldSet & (1 << nChildFieldIndex)) + { + bFieldsSet = true; + if (o_nOffset < 0) + o_nOffset -= static_cast( fieldValue[nChildFieldIndex]); + else + o_nOffset += static_cast( fieldValue[nChildFieldIndex]); + } + return bFieldsSet; +} + +bool Calendar_gregorian::getZoneOffset( sal_Int32 & o_nOffset ) const +{ + return getCombinedOffset( o_nOffset, CalendarFieldIndex::ZONE_OFFSET, + CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS); +} + +bool Calendar_gregorian::getDSTOffset( sal_Int32 & o_nOffset ) const +{ + return getCombinedOffset( o_nOffset, CalendarFieldIndex::DST_OFFSET, + CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS); +} + +void Calendar_gregorian::submitFields() throw(com::sun::star::uno::RuntimeException) +{ + for (sal_Int16 fieldIndex = 0; fieldIndex < FIELD_INDEX_COUNT; fieldIndex++) { if (fieldSet & (1 << fieldIndex)) { - if (fieldIndex == CalendarFieldIndex::ZONE_OFFSET || fieldIndex == CalendarFieldIndex::DST_OFFSET) - body->set(fieldNameConverter(fieldIndex), (sal_Int32) fieldSetValue[fieldIndex] * 60000); - else - body->set(fieldNameConverter(fieldIndex), fieldSetValue[fieldIndex]); + switch (fieldIndex) + { + default: + body->set(fieldNameConverter(fieldIndex), fieldSetValue[fieldIndex]); + break; + case CalendarFieldIndex::ZONE_OFFSET: + case CalendarFieldIndex::DST_OFFSET: + case CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS: + case CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS: + break; // nothing, extra handling + } } } + sal_Int32 nZoneOffset, nDSTOffset; + if (getZoneOffset( nZoneOffset)) + body->set( fieldNameConverter( CalendarFieldIndex::ZONE_OFFSET), nZoneOffset); + if (getDSTOffset( nDSTOffset)) + body->set( fieldNameConverter( CalendarFieldIndex::DST_OFFSET), nDSTOffset); } -void SAL_CALL Calendar_gregorian::submitValues( sal_Int32 nYear, +void Calendar_gregorian::submitValues( sal_Int32 nYear, sal_Int32 nMonth, sal_Int32 nDay, sal_Int32 nHour, sal_Int32 nMinute, - sal_Int32 nSecond, sal_Int32 nMilliSecond ) throw(com::sun::star::uno::RuntimeException) + sal_Int32 nSecond, sal_Int32 nMilliSecond, sal_Int32 nZone, sal_Int32 nDST ) + throw(com::sun::star::uno::RuntimeException) { submitFields(); if (nYear >= 0) @@ -343,10 +443,25 @@ void SAL_CALL Calendar_gregorian::submitValues( sal_Int32 nYear, body->set( UCAL_SECOND, nSecond); if (nMilliSecond >= 0) body->set( UCAL_MILLISECOND, nMilliSecond); + if (nZone != 0) + body->set( UCAL_ZONE_OFFSET, nZone); + if (nDST != 0) + body->set( UCAL_DST_OFFSET, nDST); } -void SAL_CALL -Calendar_gregorian::setValue() throw(RuntimeException) +static void lcl_setCombinedOffsetFieldValues( sal_Int32 nValue, + sal_Int16 rFieldSetValue[], sal_Int16 rFieldValue[], + sal_Int16 nParentFieldIndex, sal_Int16 nChildFieldIndex ) +{ + sal_Int32 nTrunc = nValue / 60000; + rFieldSetValue[nParentFieldIndex] = rFieldValue[nParentFieldIndex] = + static_cast( nTrunc); + sal_uInt16 nMillis = static_cast( abs( nValue - nTrunc * 60000)); + rFieldSetValue[nChildFieldIndex] = rFieldValue[nChildFieldIndex] = + static_cast( nMillis); +} + +void Calendar_gregorian::setValue() throw(RuntimeException) { // Correct DST glitch, see also localtime/gmtime conversion pitfalls at // http://www.erack.de/download/timetest.c @@ -364,16 +479,30 @@ Calendar_gregorian::setValue() throw(RuntimeException) // being adjusted to 24:00 in this case, switching one day further. // => submit 2004-03-28T00:00 no DST. + // This got even weirder since ICU incorporated also historical data, + // even the timezone may differ for different dates! It is necessary to + // let ICU choose the corresponding OlsonTimeZone transitions and adapt + // values. + // #i86094# gives examples where that went wrong: + // TZ=Europe/Moscow date <= 1919-07-01 + // zone +2:30:48 (!) instead of +3h, DST +2h instead of +1h + // TZ=America/St_Johns date <= 1935-03-30 + // zone -3:30:52 (!) instead of -3:30 + // Copy fields before calling submitFields() directly or indirectly below. memcpy(fieldSetValue, fieldValue, sizeof(fieldSetValue)); // Possibly setup ERA and YEAR in fieldSetValue. mapToGregorian(); - bool bNeedDST = !(fieldSet & (1 << CalendarFieldIndex::DST_OFFSET)); - sal_Int32 nDST1, nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond; - nDST1 = 0; + DUMP_ICU_CAL_MSG(("%s\n","setValue() before any submission")); + DUMP_I18N_CAL_MSG(("%s\n","setValue() before any submission")); + + bool bNeedZone = !(fieldSet & (1 << CalendarFieldIndex::ZONE_OFFSET)); + bool bNeedDST = !(fieldSet & (1 << CalendarFieldIndex::DST_OFFSET)); + sal_Int32 nZone1, nDST1, nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone, nDST; + nZone1 = nDST1 = nZone = nDST = 0; nYear = nMonth = nDay = nHour = nMinute = nSecond = nMilliSecond = -1; - if ( bNeedDST ) + if ( bNeedZone || bNeedDST ) { UErrorCode status; if ( !(fieldSet & (1 << CalendarFieldIndex::YEAR)) ) @@ -418,36 +547,84 @@ Calendar_gregorian::setValue() throw(RuntimeException) if ( !U_SUCCESS(status) ) nMilliSecond = -1; } - // Submit values to obtain a DST corresponding to the date/time. - submitValues( nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond); + if ( !(fieldSet & (1 << CalendarFieldIndex::ZONE_OFFSET)) ) + { + nZone = body->get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR); + if ( !U_SUCCESS(status) ) + nZone = 0; + } + if ( !(fieldSet & (1 << CalendarFieldIndex::DST_OFFSET)) ) + { + nDST = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR); + if ( !U_SUCCESS(status) ) + nDST = 0; + } + + // Submit values to obtain a time zone and DST corresponding to the date/time. + submitValues( nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone, nDST); + + DUMP_ICU_CAL_MSG(("%s\n","setValue() in bNeedZone||bNeedDST after submitValues()")); + DUMP_I18N_CAL_MSG(("%s\n","setValue() in bNeedZone||bNeedDST after submitValues()")); + nZone1 = body->get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR); + if ( !U_SUCCESS(status) ) + nZone1 = 0; nDST1 = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR); if ( !U_SUCCESS(status) ) nDST1 = 0; - DUMP_CAL_MSG(("%s\n","setValue() in bNeedDST")); } - // The original submission, may lead to a different DST than in bNeedDST. + // The original submission, may lead to a different zone/DST. submitFields(); + DUMP_ICU_CAL_MSG(("%s\n","setValue() after original submission")); + DUMP_I18N_CAL_MSG(("%s\n","setValue() after original submission")); - if ( bNeedDST ) + if ( bNeedZone || bNeedDST ) { UErrorCode status; + sal_Int32 nZone2 = body->get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR); + if ( !U_SUCCESS(status) ) + nZone2 = nZone1; sal_Int32 nDST2 = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR); if ( !U_SUCCESS(status) ) nDST2 = nDST1; - if ( nDST2 != nDST1 ) + if ( nZone2 != nZone1 || nDST2 != nDST1 ) { - DUMP_CAL_MSG(("%s\n","setValue() submission with different DSTs")); - // Due to different DSTs, resulting date values may differ if // DST is onset at 00:00 and the very onsetRule date was // submitted with DST off => date-1 23:00, for example, which // is not what we want. // Resubmit all values, this time including DST => date 01:00 - fieldSet |= (1 << CalendarFieldIndex::DST_OFFSET); - fieldSetValue[CalendarFieldIndex::DST_OFFSET] = - fieldValue[CalendarFieldIndex::DST_OFFSET] = sal::static_int_cast( nDST2 / 60000 ); - submitValues( nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond); + // Similar for zone differences. + + // Set field values accordingly in case they were used. + if (!bNeedZone) + lcl_setCombinedOffsetFieldValues( nZone2, fieldSetValue, + fieldValue, CalendarFieldIndex::ZONE_OFFSET, + CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS); + if (!bNeedDST) + lcl_setCombinedOffsetFieldValues( nDST2, fieldSetValue, + fieldValue, CalendarFieldIndex::DST_OFFSET, + CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS); + submitValues( nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone2, nDST2); + DUMP_ICU_CAL_MSG(("%s\n","setValue() after Zone/DST glitch resubmit")); + DUMP_I18N_CAL_MSG(("%s\n","setValue() after Zone/DST glitch resubmit")); + + // Time zone transition => resubmit. + // TZ=America/St_Johns date <= 1935-03-30 + // -3:30:52 (!) instead of -3:30 + // if first submission included time zone -3:30 that would be wrong. + bool bResubmit = false; + sal_Int32 nZone3 = body->get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR); + if ( !U_SUCCESS(status) ) + nZone3 = nZone2; + if (nZone3 != nZone2) + { + bResubmit = true; + if (!bNeedZone) + lcl_setCombinedOffsetFieldValues( nZone3, fieldSetValue, + fieldValue, CalendarFieldIndex::ZONE_OFFSET, + CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS); + } // If the DST onset rule says to switch from 00:00 to 01:00 and // we tried to set onsetDay 00:00 with DST, the result was @@ -463,53 +640,89 @@ Calendar_gregorian::setValue() throw(RuntimeException) nDST3 = nDST2; if (nDST2 != nDST3 && !nDST3) { - DUMP_CAL_MSG(("%s\n","setValue() DST glitch")); - fieldSetValue[CalendarFieldIndex::DST_OFFSET] = - fieldValue[CalendarFieldIndex::DST_OFFSET] = 0; - submitValues( nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond); + bResubmit = true; + if (!bNeedDST) + { + fieldSetValue[CalendarFieldIndex::DST_OFFSET] = + fieldValue[CalendarFieldIndex::DST_OFFSET] = 0; + fieldSetValue[CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS] = + fieldValue[CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS] = 0; + } + } + if (bResubmit) + { + submitValues( nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone3, nDST3); + DUMP_ICU_CAL_MSG(("%s\n","setValue() after Zone/DST glitch 2nd resubmit")); + DUMP_I18N_CAL_MSG(("%s\n","setValue() after Zone/DST glitch 2nd resubmit")); } } } -#if erDUMP_ICU_CALENDAR +#if erDUMP_ICU_CALENDAR || erDUMP_I18N_CALENDAR { // force icu::Calendar to recalculate UErrorCode status; sal_Int32 nTmp = body->get( UCAL_DATE, status = U_ZERO_ERROR); - DUMP_CAL_MSG(("%s: %d\n","setValue() result day",nTmp)); + DUMP_ICU_CAL_MSG(("%s: %d\n","setValue() result day",nTmp)); + DUMP_I18N_CAL_MSG(("%s: %d\n","setValue() result day",nTmp)); } #endif } -void SAL_CALL Calendar_gregorian::getValue() throw(RuntimeException) +void Calendar_gregorian::getValue() throw(RuntimeException) { - for (sal_Int16 fieldIndex = 0; fieldIndex < CalendarFieldIndex::FIELD_COUNT; fieldIndex++) { - UErrorCode status; - sal_Int32 value = body->get(fieldNameConverter(fieldIndex), status = U_ZERO_ERROR); - if ( !U_SUCCESS(status) ) throw ERROR; + DUMP_ICU_CAL_MSG(("%s\n","getValue()")); + DUMP_I18N_CAL_MSG(("%s\n","getValue()")); + for (sal_Int16 fieldIndex = 0; fieldIndex < FIELD_INDEX_COUNT; fieldIndex++) + { + if (fieldIndex == CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS || + fieldIndex == CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS) + continue; // not ICU fields - // convert millisecond to minute for ZONE and DST. - if (fieldIndex == CalendarFieldIndex::ZONE_OFFSET || fieldIndex == CalendarFieldIndex::DST_OFFSET) - value /= 60000; + UErrorCode status; sal_Int32 value = body->get( fieldNameConverter( + fieldIndex), status = U_ZERO_ERROR); + if ( !U_SUCCESS(status) ) throw ERROR; + // Convert millisecond to minute for ZONE and DST and set remainder in + // second field. + if (fieldIndex == CalendarFieldIndex::ZONE_OFFSET) + { + sal_Int32 nMinutes = value / 60000; + sal_Int16 nMillis = static_cast( static_cast( + abs( value - nMinutes * 60000))); + fieldValue[CalendarFieldIndex::ZONE_OFFSET] = static_cast( nMinutes); + fieldValue[CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS] = nMillis; + } + else if (fieldIndex == CalendarFieldIndex::DST_OFFSET) + { + sal_Int32 nMinutes = value / 60000; + sal_Int16 nMillis = static_cast( static_cast( + abs( value - nMinutes * 60000))); + fieldValue[CalendarFieldIndex::DST_OFFSET] = static_cast( nMinutes); + fieldValue[CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS] = nMillis; + } + else fieldValue[fieldIndex] = (sal_Int16) value; - // offset 1 since the value for week start day SunDay is different between Calendar and Weekdays. - if ( fieldIndex == CalendarFieldIndex::DAY_OF_WEEK ) - fieldValue[fieldIndex]--; // UCAL_SUNDAY:/* == 1 */ ==> Weekdays::SUNDAY /* ==0 */ - } - mapFromGregorian(); - fieldSet = 0; + // offset 1 since the value for week start day SunDay is different between Calendar and Weekdays. + if ( fieldIndex == CalendarFieldIndex::DAY_OF_WEEK ) + fieldValue[fieldIndex]--; // UCAL_SUNDAY:/* == 1 */ ==> Weekdays::SUNDAY /* ==0 */ + } + mapFromGregorian(); + fieldSet = 0; } sal_Int16 SAL_CALL Calendar_gregorian::getValue( sal_Int16 fieldIndex ) throw(RuntimeException) { - if (fieldSet) { - setValue(); - getValue(); - } + if (fieldIndex < 0 || FIELD_INDEX_COUNT <= fieldIndex) + throw ERROR; - return fieldValue[fieldIndex]; + if (fieldSet) { + setValue(); + getValue(); + } + + return fieldValue[fieldIndex]; } void SAL_CALL @@ -530,7 +743,7 @@ Calendar_gregorian::isValid() throw(RuntimeException) setValue(); memcpy(fieldSetValue, fieldValue, sizeof(fieldSetValue)); getValue(); - for ( sal_Int16 fieldIndex = 0; fieldIndex < CalendarFieldIndex::FIELD_COUNT; fieldIndex++ ) { + for ( sal_Int16 fieldIndex = 0; fieldIndex < FIELD_INDEX_COUNT; fieldIndex++ ) { // compare only with fields that are set and reset fieldSet[] if (tmp & (1 << fieldIndex)) { if (fieldSetValue[fieldIndex] != fieldValue[fieldIndex]) diff --git a/i18npool/source/calendar/calendar_hijri.cxx b/i18npool/source/calendar/calendar_hijri.cxx index 74f168b82dff..903b17278a1d 100644 --- a/i18npool/source/calendar/calendar_hijri.cxx +++ b/i18npool/source/calendar/calendar_hijri.cxx @@ -79,7 +79,7 @@ Calendar_hijri::Calendar_hijri() #define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR) | (1 << CalendarFieldIndex::MONTH) | (1 << CalendarFieldIndex::DAY_OF_MONTH)) // map field value from hijri calendar to gregorian calendar -void SAL_CALL Calendar_hijri::mapToGregorian() throw(RuntimeException) +void Calendar_hijri::mapToGregorian() throw(RuntimeException) { if (fieldSet & FIELDS) { sal_Int32 day = (sal_Int32)fieldSetValue[CalendarFieldIndex::DAY_OF_MONTH]; @@ -99,7 +99,7 @@ void SAL_CALL Calendar_hijri::mapToGregorian() throw(RuntimeException) } // map field value from gregorian calendar to hijri calendar -void SAL_CALL Calendar_hijri::mapFromGregorian() throw(RuntimeException) +void Calendar_hijri::mapFromGregorian() throw(RuntimeException) { sal_Int32 month, day, year; diff --git a/i18npool/source/calendar/calendar_jewish.cxx b/i18npool/source/calendar/calendar_jewish.cxx index 50d473cd55a6..927b10a34deb 100644 --- a/i18npool/source/calendar/calendar_jewish.cxx +++ b/i18npool/source/calendar/calendar_jewish.cxx @@ -260,7 +260,7 @@ public: }; // map field value from gregorian calendar to other calendar, it can be overwritten by derived class. -void SAL_CALL Calendar_jewish::mapFromGregorian() throw(RuntimeException) +void Calendar_jewish::mapFromGregorian() throw(RuntimeException) { int y = fieldValue[CalendarFieldIndex::YEAR]; if (fieldValue[CalendarFieldIndex::ERA] == 0) @@ -276,7 +276,7 @@ void SAL_CALL Calendar_jewish::mapFromGregorian() throw(RuntimeException) #define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR) | (1 << CalendarFieldIndex::MONTH) | (1 << CalendarFieldIndex::DAY_OF_MONTH)) // map field value from other calendar to gregorian calendar, it should be implemented. -void SAL_CALL Calendar_jewish::mapToGregorian() throw(RuntimeException) +void Calendar_jewish::mapToGregorian() throw(RuntimeException) { if (fieldSet & FIELDS) { sal_Int16 y = fieldSetValue[CalendarFieldIndex::YEAR]; diff --git a/i18npool/source/collator/data/collator_data.map b/i18npool/source/collator/data/collator_data.map index 5caafac19316..09f298912ee9 100644 --- a/i18npool/source/collator/data/collator_data.map +++ b/i18npool/source/collator/data/collator_data.map @@ -18,6 +18,7 @@ global: get_ku_alphanumeric; get_hu_charset; get_ln_charset; + get_my_dictionary; local: *; diff --git a/i18npool/source/collator/data/my_dictionary.txt b/i18npool/source/collator/data/my_dictionary.txt new file mode 100644 index 000000000000..abeeae5ddf4d --- /dev/null +++ b/i18npool/source/collator/data/my_dictionary.txt @@ -0,0 +1,373 @@ +# Myanmar collation for dictionary sort order (based on CLDR submission) +[normalization on] +&ႌ<့<း<့း +&ာ<<ါ +&ဲ<ော<<ေါ<ော်<<ေါ် +&ဴ<ံ<ို<က္<<က်<ာက္<<ာက်<<ါက္<<ါက်<ိက္<<ိက်<ုက္<<ုက်<ေက္<<ေက်<ောက္<<ေ +ာက်<<ေါက္<<ေါက်<ိုက္<<ိုက်<ခ္<<ခ်<ာခ္<<ာခ်<<ါခ္<<ါခ်<ိခ္<<ိခ်<ုခ္<<ု +ခ်<ေခ္<<ေခ်<ောခ္<<ောခ်<<ေါခ္<<ေါခ်<ိုခ္<<ိုခ်<ဂ္<<ဂ်<ာဂ္<<ာဂ်<<ါဂ္<< +ါဂ်<ိဂ္<<ိဂ်<ုဂ္<<ုဂ်<ေဂ္<<ေဂ်<ောဂ္<<ောဂ်<<ေါဂ္<<ေါဂ်<ိုဂ္<<ိုဂ်<ဃ္< +<ဃ်<ာဃ္<<ာဃ်<<ါဃ္<<ါဃ်<ိဃ္<<ိဃ်<ုဃ္<<ုဃ်<ေဃ္<<ေဃ်<ောဃ္<<ောဃ်<<ေါဃ္<< +ေါဃ်<ိုဃ္<<ိုဃ်<င်္<<င်<ာင်္<<ာင်<<ါင်္<<ါင်<ိင်္<<ိင်<ုင်္<<ုင်<ေင် +္<<ေင်<ောင်္<<ောင်<<ေါင်္<<ေါင်<ိုင်္<<ိုင်<စ္<<စ်<ာစ္<<ာစ်<<ါစ္<<ါစ +်<ိစ္<<ိစ်<ုစ္<<ုစ်<ေစ္<<ေစ်<ောစ္<<ောစ်<<ေါစ္<<ေါစ်<ိုစ္<<ိုစ်<ဆ္<<ဆ +်<ာဆ္<<ာဆ်<<ါဆ္<<ါဆ်<ိဆ္<<ိဆ်<ုဆ္<<ုဆ်<ေဆ္<<ေဆ်<ောဆ္<<ောဆ်<<ေါဆ္<<ေါ +ဆ်<ိုဆ္<<ိုဆ်<ဇ္<<ဇ်<ာဇ္<<ာဇ်<<ါဇ္<<ါဇ်<ိဇ္<<ိဇ်<ုဇ္<<ုဇ်<ေဇ္<<ေဇ်<ေ +ာဇ္<<ောဇ်<<ေါဇ္<<ေါဇ်<ိုဇ္<<ိုဇ်<ဈ်<ာဈ်<<ါဈ်<ိဈ်<ုဈ်<ေဈ်<ောဈ်<<ေါဈ်< +ိုဈ်<ဉ္<<ဉ်<ာဉ္<<ာဉ်<<ါဉ္<<ါဉ်<ိဉ္<<ိဉ်<ုဉ္<<ုဉ်<ေဉ္<<ေဉ်<ောဉ္<<ောဉ် +<<ေါဉ္<<ေါဉ်<ိုဉ္<<ိုဉ်<ည္<<ည်<ာည္<<ာည်<<ါည္<<ါည်<ိည္<<ိည်<ုည္<<ုည်< +ေည္<<ေည်<ောည္<<ောည်<<ေါည္<<ေါည်<ိုည္<<ိုည်<ဋ္<<ဋ်<ာဋ္<<ာဋ်<<ါဋ္<<ါဋ် +<ိဋ္<<ိဋ်<ုဋ္<<ုဋ်<ေဋ္<<ေဋ်<ောဋ္<<ောဋ်<<ေါဋ္<<ေါဋ်<ိုဋ္<<ိုဋ်<ဌ္<<ဌ် +<ာဌ္<<ာဌ်<<ါဌ္<<ါဌ်<ိဌ္<<ိဌ်<ုဌ္<<ုဌ်<ေဌ္<<ေဌ်<ောဌ္<<ောဌ်<<ေါဌ္<<ေါဌ +်<ိုဌ္<<ိုဌ်<ဍ္<<ဍ်<ာဍ္<<ာဍ်<<ါဍ္<<ါဍ်<ိဍ္<<ိဍ်<ုဍ္<<ုဍ်<ေဍ္<<ေဍ်<ော +ဍ္<<ောဍ်<<ေါဍ္<<ေါဍ်<ိုဍ္<<ိုဍ်<ဎ္<<ဎ်<ာဎ္<<ာဎ်<<ါဎ္<<ါဎ်<ိဎ္<<ိဎ်<ု +ဎ္<<ုဎ်<ေဎ္<<ေဎ်<ောဎ္<<ောဎ်<<ေါဎ္<<ေါဎ်<ိုဎ္<<ိုဎ်<ဏ္<<ဏ်<ာဏ္<<ာဏ်<< +ါဏ္<<ါဏ်<ိဏ္<<ိဏ်<ုဏ္<<ုဏ်<ေဏ္<<ေဏ်<ောဏ္<<ောဏ်<<ေါဏ္<<ေါဏ်<ိုဏ္<<ိုဏ +်<တ္<<တ်<ာတ္<<ာတ်<<ါတ္<<ါတ်<ိတ္<<ိတ်<ုတ္<<ုတ်<ေတ္<<ေတ်<ောတ္<<ောတ်<<ေ +ါတ္<<ေါတ်<ိုတ္<<ိုတ်<ထ္<<ထ်<ာထ္<<ာထ်<<ါထ္<<ါထ်<ိထ္<<ိထ်<ုထ္<<ုထ်<ေထ္ +<<ေထ်<ောထ္<<ောထ်<<ေါထ္<<ေါထ်<ိုထ္<<ိုထ်<ဒ္<<ဒ်<ာဒ္<<ာဒ်<<ါဒ္<<ါဒ်<ိဒ +္<<ိဒ်<ုဒ္<<ုဒ်<ေဒ္<<ေဒ်<ောဒ္<<ောဒ်<<ေါဒ္<<ေါဒ်<ိုဒ္<<ိုဒ်<ဓ္<<ဓ်<ာဓ +္<<ာဓ်<<ါဓ္<<ါဓ်<ိဓ္<<ိဓ်<ုဓ္<<ုဓ်<ေဓ္<<ေဓ်<ောဓ္<<ောဓ်<<ေါဓ္<<ေါဓ်<ိ +ုဓ္<<ိုဓ်<န္<<န်<ာန္<<ာန်<<ါန္<<ါန်<ိန္<<ိန်<ုန္<<ုန်<ေန္<<ေန်<ောန္< +<ောန်<<ေါန္<<ေါန်<ိုန္<<ိုန်<ပ္<<ပ်<ာပ္<<ာပ်<<ါပ္<<ါပ်<ိပ္<<ိပ်<ုပ္< +<ုပ်<ေပ္<<ေပ်<ောပ္<<ောပ်<<ေါပ္<<ေါပ်<ိုပ္<<ိုပ်<ဖ္<<ဖ်<ာဖ္<<ာဖ်<<ါဖ္ +<<ါဖ်<ိဖ္<<ိဖ်<ုဖ္<<ုဖ်<ေဖ္<<ေဖ်<ောဖ္<<ောဖ်<<ေါဖ္<<ေါဖ်<ိုဖ္<<ိုဖ်<ဗ +္<<ဗ်<ာဗ္<<ာဗ်<<ါဗ္<<ါဗ်<ိဗ္<<ိဗ်<ုဗ္<<ုဗ်<ေဗ္<<ေဗ်<ောဗ္<<ောဗ်<<ေါဗ္ +<<ေါဗ်<ိုဗ္<<ိုဗ်<ဘ္<<ဘ်<ာဘ္<<ာဘ်<<ါဘ္<<ါဘ်<ိဘ္<<ိဘ်<ုဘ္<<ုဘ်<ေဘ္<<ေ +ဘ်<ောဘ္<<ောဘ်<<ေါဘ္<<ေါဘ်<ိုဘ္<<ိုဘ်<မ္<<မ်<ာမ္<<ာမ်<<ါမ္<<ါမ်<ိမ္<< +ိမ်<ုမ္<<ုမ်<ေမ္<<ေမ်<ောမ္<<ောမ်<<ေါမ္<<ေါမ်<ိုမ္<<ိုမ်<ယ္<<ယ်<ာယ္<< +ာယ်<<ါယ္<<ါယ်<ိယ္<<ိယ်<ုယ္<<ုယ်<ေယ္<<ေယ်<ောယ္<<ောယ်<<ေါယ္<<ေါယ်<ိုယ္ +<<ိုယ်<ရ္<<ရ်<ာရ္<<ာရ်<<ါရ္<<ါရ်<ိရ္<<ိရ်<ုရ္<<ုရ်<ေရ္<<ေရ်<ောရ္<<ော +ရ်<<ေါရ္<<ေါရ်<ိုရ္<<ိုရ်<လ္<<လ်<ာလ္<<ာလ်<<ါလ္<<ါလ်<ိလ္<<ိလ်<ုလ္<<ုလ +်<ေလ္<<ေလ်<ောလ္<<ောလ်<<ေါလ္<<ေါလ်<ိုလ္<<ိုလ်<ဝ်<ာဝ်<<ါဝ်<ိဝ်<ုဝ်<ေဝ် +<ောဝ်<<ေါဝ်<ိုဝ်<သ္<<သ်<ာသ္<<ာသ်<<ါသ္<<ါသ်<ိသ္<<ိသ်<ုသ္<<ုသ်<ေသ္<<ေသ +်<ောသ္<<ောသ်<<ေါသ္<<ေါသ်<ိုသ္<<ိုသ်<ဟ္<<ဟ်<ာဟ္<<ာဟ်<<ါဟ္<<ါဟ်<ိဟ္<<ိ +ဟ်<ုဟ္<<ုဟ်<ေဟ္<<ေဟ်<ောဟ္<<ောဟ်<<ေါဟ္<<ေါဟ်<ိုဟ္<<ိုဟ်<ဠ်<ာဠ်<<ါဠ်<ိ +ဠ်<ုဠ်<ေဠ်<ောဠ်<<ေါဠ်<ိုဠ်<အ်<ာအ်<<ါအ်<ိအ်<ုအ်<ေအ်<ောအ်<<ေါအ်<ိုအ်<ၞ +<ၟ<ျ<ြ<ၠ<ွ<ႂ<ှ<ျွ<ြွ<ျှ<ြှ<ွှ<ျွှ<ြွှ +&အိ<<<ဣ +&အီ<<<ဤ +&အု<<<ဥ +&အူ<<<ဦ +&အေ<<<ဧ<<<ဨ +&အော<<<ဩ +&အော်<<<ဪ +&ိမ်<ိံ<ိမ့်<ိံ့'\u000A'<ိမ်း<ိံး +&ုမ်<ုံ<ုမ့်<ုံ့'\u000A'<ုမ်း<ုံး +&အုံ<<<ဥုံ +&အိက္<<<ဣက္ +&အိက်<<<ဣက် +&အုက္<<<ဥက္ +&အုက်<<<ဥက် +&အေက္<<<ဧက္ +&အေက်<<<ဧက် +&အောက္<<<ဩက္ +&အောက်<<<ဩက် +&အောက္<<<ဩောက္ +&အောက်<<<ဩောက် +&အိခ္<<<ဣခ္ +&အိခ်<<<ဣခ် +&အုခ္<<<ဥခ္ +&အုခ်<<<ဥခ် +&အေခ္<<<ဧခ္ +&အေခ်<<<ဧခ် +&အောခ္<<<ဩခ္ +&အောခ်<<<ဩခ် +&အောခ္<<<ဩောခ္ +&အောခ်<<<ဩောခ် +&အိဂ္<<<ဣဂ္ +&အိဂ်<<<ဣဂ် +&အုဂ္<<<ဥဂ္ +&အုဂ်<<<ဥဂ် +&အေဂ္<<<ဧဂ္ +&အေဂ်<<<ဧဂ် +&အောဂ္<<<ဩဂ္ +&အောဂ်<<<ဩဂ် +&အောဂ္<<<ဩောဂ္ +&အောဂ်<<<ဩောဂ် +&အိဃ္<<<ဣဃ္ +&အိဃ်<<<ဣဃ် +&အုဃ္<<<ဥဃ္ +&အုဃ်<<<ဥဃ် +&အေဃ္<<<ဧဃ္ +&အေဃ်<<<ဧဃ် +&အောဃ္<<<ဩဃ္ +&အောဃ်<<<ဩဃ် +&အောဃ္<<<ဩောဃ္ +&အောဃ်<<<ဩောဃ် +&အိင္<<<ဣင္ +&အိင်<<<ဣင် +&အုင္<<<ဥင္ +&အုင်<<<ဥင် +&အေင္<<<ဧင္ +&အေင်<<<ဧင် +&အောင္<<<ဩင္ +&အောင်<<<ဩင် +&အောင္<<<ဩောင္ +&အောင်<<<ဩောင် +&အိစ္<<<ဣစ္ +&အိစ်<<<ဣစ် +&အုစ္<<<ဥစ္ +&အုစ်<<<ဥစ် +&အေစ္<<<ဧစ္ +&အေစ်<<<ဧစ် +&အောစ္<<<ဩစ္ +&အောစ်<<<ဩစ် +&အောစ္<<<ဩောစ္ +&အောစ်<<<ဩောစ် +&အိဆ္<<<ဣဆ္ +&အိဆ်<<<ဣဆ် +&အုဆ္<<<ဥဆ္ +&အုဆ်<<<ဥဆ် +&အေဆ္<<<ဧဆ္ +&အေဆ်<<<ဧဆ် +&အောဆ္<<<ဩဆ္ +&အောဆ်<<<ဩဆ် +&အောဆ္<<<ဩောဆ္ +&အောဆ်<<<ဩောဆ် +&အိဇ္<<<ဣဇ္ +&အိဇ်<<<ဣဇ် +&အုဇ္<<<ဥဇ္ +&အုဇ်<<<ဥဇ် +&အေဇ္<<<ဧဇ္ +&အေဇ်<<<ဧဇ် +&အောဇ္<<<ဩဇ္ +&အောဇ်<<<ဩဇ် +&အောဇ္<<<ဩောဇ္ +&အောဇ်<<<ဩောဇ် +&အိဉ္<<<ဣဉ္ +&အိဉ်<<<ဣဉ် +&အုဉ္<<<ဥဉ္ +&အုဉ်<<<ဥဉ် +&အေဉ္<<<ဧဉ္ +&အေဉ်<<<ဧဉ် +&အောဉ္<<<ဩဉ္ +&အောဉ်<<<ဩဉ် +&အောဉ္<<<ဩောဉ္ +&အောဉ်<<<ဩောဉ် +&အိည္<<<ဣည္ +&အိည်<<<ဣည် +&အုည္<<<ဥည္ +&အုည်<<<ဥည် +&အေည္<<<ဧည္ +&အေည်<<<ဧည် +&အောည္<<<ဩည္ +&အောည်<<<ဩည် +&အောည္<<<ဩောည္ +&အောည်<<<ဩောည် +&အိဋ္<<<ဣဋ္ +&အိဋ်<<<ဣဋ် +&အုဋ္<<<ဥဋ္ +&အုဋ်<<<ဥဋ် +&အေဋ္<<<ဧဋ္ +&အေဋ်<<<ဧဋ် +&အောဋ္<<<ဩဋ္ +&အောဋ်<<<ဩဋ် +&အောဋ္<<<ဩောဋ္ +&အောဋ်<<<ဩောဋ် +&အိဌ္<<<ဣဌ္ +&အိဌ်<<<ဣဌ် +&အုဌ္<<<ဥဌ္ +&အုဌ်<<<ဥဌ် +&အေဌ္<<<ဧဌ္ +&အေဌ်<<<ဧဌ် +&အောဌ္<<<ဩဌ္ +&အောဌ်<<<ဩဌ် +&အောဌ္<<<ဩောဌ္ +&အောဌ်<<<ဩောဌ် +&အိဍ္<<<ဣဍ္ +&အိဍ်<<<ဣဍ် +&အုဍ္<<<ဥဍ္ +&အုဍ်<<<ဥဍ် +&အေဍ္<<<ဧဍ္ +&အေဍ်<<<ဧဍ် +&အောဍ္<<<ဩဍ္ +&အောဍ်<<<ဩဍ် +&အောဍ္<<<ဩောဍ္ +&အောဍ်<<<ဩောဍ် +&အိဎ္<<<ဣဎ္ +&အိဎ်<<<ဣဎ် +&အုဎ္<<<ဥဎ္ +&အုဎ်<<<ဥဎ် +&အေဎ္<<<ဧဎ္ +&အေဎ်<<<ဧဎ် +&အောဎ္<<<ဩဎ္ +&အောဎ်<<<ဩဎ် +&အောဎ္<<<ဩောဎ္ +&အောဎ်<<<ဩောဎ် +&အိဏ္<<<ဣဏ္ +&အိဏ်<<<ဣဏ် +&အုဏ္<<<ဥဏ္ +&အုဏ်<<<ဥဏ် +&အေဏ္<<<ဧဏ္ +&အေဏ်<<<ဧဏ် +&အောဏ္<<<ဩဏ္ +&အောဏ်<<<ဩဏ် +&အောဏ္<<<ဩောဏ္ +&အောဏ်<<<ဩောဏ် +&အိတ္<<<ဣတ္ +&အိတ်<<<ဣတ် +&အုတ္<<<ဥတ္ +&အုတ်<<<ဥတ် +&အေတ္<<<ဧတ္ +&အေတ်<<<ဧတ် +&အောတ္<<<ဩတ္ +&အောတ်<<<ဩတ် +&အောတ္<<<ဩောတ္ +&အောတ်<<<ဩောတ် +&အိထ္<<<ဣထ္ +&အိထ်<<<ဣထ် +&အုထ္<<<ဥထ္ +&အုထ်<<<ဥထ် +&အေထ္<<<ဧထ္ +&အေထ်<<<ဧထ် +&အောထ္<<<ဩထ္ +&အောထ်<<<ဩထ် +&အောထ္<<<ဩောထ္ +&အောထ်<<<ဩောထ် +&အိဒ္<<<ဣဒ္ +&အိဒ်<<<ဣဒ် +&အုဒ္<<<ဥဒ္ +&အုဒ်<<<ဥဒ် +&အေဒ္<<<ဧဒ္ +&အေဒ်<<<ဧဒ် +&အောဒ္<<<ဩဒ္ +&အောဒ်<<<ဩဒ် +&အောဒ္<<<ဩောဒ္ +&အောဒ်<<<ဩောဒ် +&အိဓ္<<<ဣဓ္ +&အိဓ်<<<ဣဓ် +&အုဓ္<<<ဥဓ္ +&အုဓ်<<<ဥဓ် +&အေဓ္<<<ဧဓ္ +&အေဓ်<<<ဧဓ် +&အောဓ္<<<ဩဓ္ +&အောဓ်<<<ဩဓ် +&အောဓ္<<<ဩောဓ္ +&အောဓ်<<<ဩောဓ် +&အိန္<<<ဣန္ +&အိန်<<<ဣန် +&အုန္<<<ဥန္ +&အုန်<<<ဥန် +&အေန္<<<ဧန္ +&အေန်<<<ဧန် +&အောန္<<<ဩန္ +&အောန်<<<ဩန် +&အောန္<<<ဩောန္ +&အောန်<<<ဩောန် +&အိပ္<<<ဣပ္ +&အိပ်<<<ဣပ် +&အုပ္<<<ဥပ္ +&အုပ်<<<ဥပ် +&အေပ္<<<ဧပ္ +&အေပ်<<<ဧပ် +&အောပ္<<<ဩပ္ +&အောပ်<<<ဩပ် +&အောပ္<<<ဩောပ္ +&အောပ်<<<ဩောပ် +&အိဖ္<<<ဣဖ္ +&အိဖ်<<<ဣဖ် +&အုဖ္<<<ဥဖ္ +&အုဖ်<<<ဥဖ် +&အေဖ္<<<ဧဖ္ +&အေဖ်<<<ဧဖ် +&အောဖ္<<<ဩဖ္ +&အောဖ်<<<ဩဖ် +&အောဖ္<<<ဩောဖ္ +&အောဖ်<<<ဩောဖ် +&အိဗ္<<<ဣဗ္ +&အိဗ်<<<ဣဗ် +&အုဗ္<<<ဥဗ္ +&အုဗ်<<<ဥဗ် +&အေဗ္<<<ဧဗ္ +&အေဗ်<<<ဧဗ် +&အောဗ္<<<ဩဗ္ +&အောဗ်<<<ဩဗ် +&အောဗ္<<<ဩောဗ္ +&အောဗ်<<<ဩောဗ် +&အိဘ္<<<ဣဘ္ +&အိဘ်<<<ဣဘ် +&အုဘ္<<<ဥဘ္ +&အုဘ်<<<ဥဘ် +&အေဘ္<<<ဧဘ္ +&အေဘ်<<<ဧဘ် +&အောဘ္<<<ဩဘ္ +&အောဘ်<<<ဩဘ် +&အောဘ္<<<ဩောဘ္ +&အောဘ်<<<ဩောဘ် +&အိမ္<<<ဣမ္ +&အိမ်<<<ဣမ် +&အုမ္<<<ဥမ္ +&အုမ်<<<ဥမ် +&အေမ္<<<ဧမ္ +&အေမ်<<<ဧမ် +&အောမ္<<<ဩမ္ +&အောမ်<<<ဩမ် +&အောမ္<<<ဩောမ္ +&အောမ်<<<ဩောမ် +&အိယ္<<<ဣယ္ +&အိယ်<<<ဣယ် +&အုယ္<<<ဥယ္ +&အုယ်<<<ဥယ် +&အေယ္<<<ဧယ္ +&အေယ်<<<ဧယ် +&အောယ္<<<ဩယ္ +&အောယ်<<<ဩယ် +&အောယ္<<<ဩောယ္ +&အောယ်<<<ဩောယ် +&အိရ္<<<ဣရ္ +&အိရ်<<<ဣရ် +&အုရ္<<<ဥရ္ +&အုရ်<<<ဥရ် +&အေရ္<<<ဧရ္ +&အေရ်<<<ဧရ် +&အောရ္<<<ဩရ္ +&အောရ်<<<ဩရ် +&အောရ္<<<ဩောရ္ +&အောရ်<<<ဩောရ် +&အိလ္<<<ဣလ္ +&အိလ်<<<ဣလ် +&အုလ္<<<ဥလ္ +&အုလ်<<<ဥလ် +&အေလ္<<<ဧလ္ +&အေလ်<<<ဧလ် +&အောလ္<<<ဩလ္ +&အောလ်<<<ဩလ် +&အောလ္<<<ဩောလ္ +&အောလ်<<<ဩောလ် +&အိသ္<<<ဣသ္ +&အိသ်<<<ဣသ် +&အုသ္<<<ဥသ္ +&အုသ်<<<ဥသ် +&အေသ္<<<ဧသ္ +&အေသ်<<<ဧသ် +&အောသ္<<<ဩသ္ +&အောသ်<<<ဩသ် +&အောသ္<<<ဩောသ္ +&အောသ်<<<ဩောသ် +&အိဟ္<<<ဣဟ္ +&အိဟ်<<<ဣဟ် +&အုဟ္<<<ဥဟ္ +&အုဟ်<<<ဥဟ် +&အေဟ္<<<ဧဟ္ +&အေဟ်<<<ဧဟ် +&အောဟ္<<<ဩဟ္ +&အောဟ်<<<ဩဟ် +&အောဟ္<<<ဩောဟ္ +&အောဟ်<<<ဩောဟ် +&ောက်ကျ=ောက်ျ +&န်နုပ်=န်ုပ် +&ေသ္သ=ေဿ +&ိသ္သ=ိဿ +&ုသ္သ=ုဿ +&အိသ္သ<<<ဣဿ +&အုသ္သ<<<ဥဿ +&သ္သ=ဿ +&နှိုက်<<၌ +&ရွေ့<<၍ +&လည်းကောင်း<<၎င်း +&အိ<<၏ +&လက်ယာ=လက်ျာ +&သမီ=သ္မီ +&ထမင်း=ထ္မင်း +&လက်ဘက်=လ္ဘက် diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 704562821c92..baf9ac38786b 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: defaultnumberingprovider.cxx,v $ - * $Revision: 1.30 $ + * $Revision: 1.30.24.2 $ * * This file is part of OpenOffice.org. * @@ -120,6 +120,13 @@ static sal_Unicode table_Alphabet_dz[] = { 0x0F62, 0x0F63, 0x0F64, 0x0F66, 0x0F67, 0x0F68 }; +static sal_Unicode table_Alphabet_my[] = { + 0x1000, 0x1001, 0x1002, 0x1003, 0x1004, 0x1005, 0x1006, 0x1007, + 0x1008,/*0x1009,*/0x100A, 0x100B, 0x100C, 0x100D, 0x100E, 0x100F, + 0x1010, 0x1011, 0x1012, 0x1013, 0x1014, 0x1015, 0x1016, 0x1017, + 0x1018, 0x1019, 0x101A, 0x101B, 0x101C, 0x101D, 0x101E, 0x101F, + 0x1020, 0x1021 +}; // Bulgarian Cyrillic upper case letters static sal_Unicode table_CyrillicUpperLetter_bg[] = { @@ -153,6 +160,22 @@ static sal_Unicode table_CyrillicLowerLetter_ru[] = { 0x0449, 0x044B, 0x044D, 0x044E, 0x044F }; +// Serbian Cyrillic upper letters +static sal_Unicode table_CyrillicUpperLetter_sr[] = { + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0402, 0x0415, 0x0416, + 0x0417, 0x0418, 0x0408, 0x041A, 0x041B, 0x0409, 0x041C, 0x041D, + 0x040A, 0x041E, 0x041F, 0x0420, 0x0421, 0x0422, 0x040B, 0x0423, + 0x0424, 0x0425, 0x0426, 0x0427, 0x040F, 0x0428 +}; + +// Serbian cyrillic lower letters +static sal_Unicode table_CyrillicLowerLetter_sr[] = { + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0452, 0x0435, 0x0436, + 0x0437, 0x0438, 0x0458, 0x043A, 0x043B, 0x0459, 0x043C, 0x043D, + 0x045A, 0x043E, 0x043F, 0x0440, 0x0441, 0x0442, 0x045B, 0x0443, + 0x0444, 0x0445, 0x0446, 0x0447, 0x045F, 0x0448 +}; + static sal_Unicode table_Alphabet_fa[] = { 0x0622, 0x0628, 0x067E, 0x062A, 0x062B, 0x062C, 0x0686, 0x062D, 0x062E, 0x062F, 0x0630, 0x0631, 0x0632, 0x0698, 0x0633, 0x0634, @@ -555,6 +578,9 @@ DefaultNumberingProvider::makeNumberingString( const Sequencea, 2=>b, ..., 27=>z, 28=>aa, 29=>bb, ... break; + case CHARS_CYRILLIC_UPPER_LETTER_SR: + lcl_formatChars2( table_CyrillicUpperLetter_sr, + table_CyrillicLowerLetter_sr, + sizeof(table_CyrillicLowerLetter_sr) / + sizeof(table_CyrillicLowerLetter_sr[0]), number-1, + result); // 1=>a, 2=>b, ..., 27=>z, 28=>Aa, 29=>Ab, ... + break; + case CHARS_CYRILLIC_LOWER_LETTER_SR: + lcl_formatChars( table_CyrillicLowerLetter_sr, + sizeof(table_CyrillicLowerLetter_sr) / + sizeof(table_CyrillicLowerLetter_sr[0]), number-1, + result); // 1=>a, 2=>b, ..., 27=>z, 28=>aa, 29=>ab, ... + break; + case CHARS_CYRILLIC_UPPER_LETTER_N_SR: + lcl_formatChars3( table_CyrillicUpperLetter_sr, + table_CyrillicLowerLetter_sr, + sizeof(table_CyrillicLowerLetter_sr) / + sizeof(table_CyrillicLowerLetter_sr[0]), number-1, + result); // 1=>a, 2=>b, ..., 27=>z, 28=>Aa, 29=>Bb, ... + break; + case CHARS_CYRILLIC_LOWER_LETTER_N_SR: + lcl_formatChars1( table_CyrillicLowerLetter_sr, + sizeof(table_CyrillicLowerLetter_sr) / + sizeof(table_CyrillicLowerLetter_sr[0]), number-1, + result); // 1=>a, 2=>b, ..., 27=>z, 28=>aa, 29=>bb, ... + break; case CHARS_PERSIAN: lcl_formatChars(table_Alphabet_fa, sizeof(table_Alphabet_fa) / sizeof(sal_Unicode), number - 1, result); break; @@ -686,6 +738,7 @@ static const Supported_NumberingType aSupportedTypes[] = {style::NumberingType::CHARS_NEPALI, NULL, LANG_CTL}, {style::NumberingType::CHARS_KHMER, NULL, LANG_CTL}, {style::NumberingType::CHARS_LAO, NULL, LANG_CTL}, + {style::NumberingType::CHARS_MYANMAR, NULL, LANG_CTL}, {style::NumberingType::CHARS_TIBETAN, NULL, LANG_CTL}, {style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_BG, C_CYR_A ", " C_CYR_B ", .., " C_CYR_A S_CYR_A ", " C_CYR_A S_CYR_B ", ... (bg)", LANG_ALL}, {style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_BG, S_CYR_A ", " S_CYR_B ", .., " S_CYR_A S_CYR_A ", " S_CYR_A S_CYR_B ", ... (bg)", LANG_ALL}, @@ -695,6 +748,10 @@ static const Supported_NumberingType aSupportedTypes[] = {style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_RU, S_CYR_A ", " S_CYR_B ", .., " S_CYR_A S_CYR_A ", " S_CYR_A S_CYR_B ", ... (ru)", LANG_ALL}, {style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_N_RU, C_CYR_A ", " C_CYR_B ", .., " C_CYR_A S_CYR_A ", " C_CYR_B S_CYR_B ", ... (ru)", LANG_ALL}, {style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_N_RU, S_CYR_A ", " S_CYR_B ", .., " S_CYR_A S_CYR_A ", " S_CYR_B S_CYR_B ", ... (ru)", LANG_ALL}, + {style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_SR, C_CYR_A ", " C_CYR_B ", .., " C_CYR_A S_CYR_A ", " C_CYR_A S_CYR_B ", ... (sr)", LANG_ALL}, + {style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_SR, S_CYR_A ", " S_CYR_B ", .., " S_CYR_A S_CYR_A ", " S_CYR_A S_CYR_B ", ... (sr)", LANG_ALL}, + {style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_N_SR, C_CYR_A ", " C_CYR_B ", .., " C_CYR_A S_CYR_A ", " C_CYR_B S_CYR_B ", ... (sr)", LANG_ALL}, + {style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_N_SR, S_CYR_A ", " S_CYR_B ", .., " S_CYR_A S_CYR_A ", " S_CYR_B S_CYR_B ", ... (sr)", LANG_ALL}, {style::NumberingType::CHARS_PERSIAN, NULL, LANG_CTL}, }; static const sal_Int32 nSupported_NumberingTypes = sizeof(aSupportedTypes) / sizeof(Supported_NumberingType); diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index 686478fb7651..74416df665a0 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: isolang.cxx,v $ - * $Revision: 1.16 $ + * $Revision: 1.16.24.7 $ * * This file is part of OpenOffice.org. * @@ -97,8 +97,8 @@ struct IsoLangOtherEntry * only" usage and locale fall back should be cleaned up and made consistent. I * strongly doubt that most callers exactly expect the behavior described. * Currently these primary LangIDs are used literally in OOo code: - * LANGUAGE_ENGLISH LANGUAGE_CHINESE LANGUAGE_ARABIC LANGUAGE_MALAY - * LANGUAGE_AZERI LANGUAGE_UZBEK LANGUAGE_URDU LANGUAGE_KASHMIRI + * LANGUAGE_ENGLISH LANGUAGE_CHINESE LANGUAGE_MALAY + * LANGUAGE_AZERI LANGUAGE_URDU LANGUAGE_KASHMIRI */ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = @@ -114,9 +114,8 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_GERMAN, "de", "DE" }, { LANGUAGE_ITALIAN, "it", "IT" }, { LANGUAGE_DUTCH, "nl", "NL" }, - { LANGUAGE_SPANISH, "es", "ES" }, - { LANGUAGE_SPANISH, "es", "" }, { LANGUAGE_SPANISH_MODERN, "es", "ES" }, + { LANGUAGE_SPANISH_DATED, "es", "ES" }, { LANGUAGE_PORTUGUESE, "pt", "PT" }, { LANGUAGE_PORTUGUESE_BRAZILIAN, "pt", "BR" }, { LANGUAGE_DANISH, "da", "DK" }, @@ -147,19 +146,8 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_GERMAN_AUSTRIAN, "de", "AT" }, { LANGUAGE_ITALIAN_SWISS, "it", "CH" }, { LANGUAGE_ALBANIAN, "sq", "AL" }, - // #i93555# moved entry below { LANGUAGE_ARABIC, "ar", "" }, - { LANGUAGE_ARABIC_EGYPT, "ar", "EG" }, - // #i93555# HACK: language-only entry moved here to have a match on locale - // present in language list box to not display "Unknown" for an Arabic 'ar' - // language pack. This may have some side effect on code dealing with - // LANGUAGE_ARABIC if it converts to/from strings. On the other hand, usage - // of language-only usually is done wrong anyway.. - /* FIXME: fix all "primary language only" usage, see also comment above - * this table, and then add a few language-only entries to the language - * list box if really necessary, but do not make them available for - * language attribution and so on, only for UI language selection! */ - { LANGUAGE_ARABIC, "ar", "" }, { LANGUAGE_ARABIC_SAUDI_ARABIA, "ar", "SA" }, + { LANGUAGE_ARABIC_EGYPT, "ar", "EG" }, { LANGUAGE_ARABIC_UAE, "ar", "AE" }, { LANGUAGE_ARABIC_IRAQ, "ar", "IQ" }, { LANGUAGE_ARABIC_LIBYA, "ar", "LY" }, @@ -174,6 +162,16 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_ARABIC_KUWAIT, "ar", "KW" }, { LANGUAGE_ARABIC_BAHRAIN, "ar", "BH" }, { LANGUAGE_ARABIC_QATAR, "ar", "QA" }, + { LANGUAGE_USER_ARABIC_CHAD, "ar", "TD" }, + { LANGUAGE_USER_ARABIC_COMOROS, "ar", "KM" }, + { LANGUAGE_USER_ARABIC_DJIBOUTI, "ar", "DJ" }, + { LANGUAGE_USER_ARABIC_ERITREA, "ar", "ER" }, + { LANGUAGE_USER_ARABIC_ISRAEL, "ar", "IL" }, + { LANGUAGE_USER_ARABIC_MAURITANIA, "ar", "MR" }, + { LANGUAGE_USER_ARABIC_PALESTINE, "ar", "PS" }, + { LANGUAGE_USER_ARABIC_SOMALIA, "ar", "SO" }, + { LANGUAGE_USER_ARABIC_SUDAN, "ar", "SD" }, + { LANGUAGE_ARABIC_PRIMARY_ONLY, "ar", "" }, { LANGUAGE_BASQUE, "eu", "" }, { LANGUAGE_BULGARIAN, "bg", "BG" }, { LANGUAGE_CZECH, "cs", "CZ" }, @@ -201,7 +199,7 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_NORWEGIAN_BOKMAL, "nb", "NO" }, { LANGUAGE_NORWEGIAN_NYNORSK, "nn", "NO" }, { LANGUAGE_POLISH, "pl", "PL" }, - { LANGUAGE_RHAETO_ROMAN, "rm", "" }, + { LANGUAGE_RHAETO_ROMAN, "rm", "CH" }, { LANGUAGE_ROMANIAN, "ro", "RO" }, { LANGUAGE_ROMANIAN_MOLDOVA, "ro", "MD" }, { LANGUAGE_SLOVAK, "sk", "SK" }, @@ -258,7 +256,6 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_AZERI, "az", "" }, { LANGUAGE_AZERI_LATIN, "az", "AZ" }, // { LANGUAGE_AZERI_CYRILLIC, "az", "AZ" }, // script codes not supported yet - { LANGUAGE_UZBEK, "uz", "" }, { LANGUAGE_UZBEK_LATIN, "uz", "UZ" }, // { LANGUAGE_UZBEK_CYRILLIC, "uz", "UZ" }, // script codes not supported yet { LANGUAGE_BENGALI_BANGLADESH, "bn", "BD" }, @@ -363,7 +360,6 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_CHEROKEE_UNITED_STATES, "chr", "US" }, { LANGUAGE_INUKTITUT_LATIN_CANADA, "iu", "CA" }, // { LANGUAGE_INUKTITUT_SYLLABICS_CANADA, "iu", "CA" }, // script codes not supported yet -// { LANGUAGE_ARABIC_SUDAN, "ar", "SD" }, // unknown MS-LCID { LANGUAGE_SAMI_NORTHERN_NORWAY, "se", "NO" }, { LANGUAGE_SAMI_INARI, "smn", "FI" }, { LANGUAGE_SAMI_LULE_NORWAY, "smj", "NO" }, @@ -448,6 +444,8 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_SANTALI_INDIA, "sat", "IN" }, { LANGUAGE_USER_TETUN, "tet", "ID" }, { LANGUAGE_USER_TETUN_TIMOR_LESTE, "tet", "TL" }, + { LANGUAGE_USER_TOK_PISIN, "tpi", "PG" }, + { LANGUAGE_USER_SHUSWAP, "shs", "CA" }, { LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information { LANGUAGE_DONTKNOW, "", "" } // marks end of table }; @@ -670,7 +668,6 @@ static const MsLangId::IsoLangEntry & lcl_lookupFallbackEntry( LanguageType nLan { // These are known to have no country assigned. case LANGUAGE_BASQUE: - case LANGUAGE_RHAETO_ROMAN: case LANGUAGE_USER_ESPERANTO: case LANGUAGE_USER_INTERLINGUA: return *pEntry; @@ -751,7 +748,6 @@ static const MsLangId::IsoLangEntry & lcl_lookupFallbackEntry( { // These are known to have no country assigned. case LANGUAGE_BASQUE: - case LANGUAGE_RHAETO_ROMAN: case LANGUAGE_USER_ESPERANTO: case LANGUAGE_USER_INTERLINGUA: return *pEntry; diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx index 7ea7e39f57fb..070ddb9dc562 100644 --- a/i18npool/source/isolang/mslangid.cxx +++ b/i18npool/source/isolang/mslangid.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: mslangid.cxx,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.24.4 $ * * This file is part of OpenOffice.org. * @@ -209,10 +209,12 @@ bool MsLangId::isRightToLeft( LanguageType nLang ) { switch( nLang & LANGUAGE_MASK_PRIMARY ) { - case LANGUAGE_ARABIC & LANGUAGE_MASK_PRIMARY : - case LANGUAGE_HEBREW & LANGUAGE_MASK_PRIMARY : - case LANGUAGE_URDU & LANGUAGE_MASK_PRIMARY : - case LANGUAGE_FARSI & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_ARABIC_SAUDI_ARABIA & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_HEBREW & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_URDU & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_FARSI & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_KASHMIRI & LANGUAGE_MASK_PRIMARY : + case LANGUAGE_SINDHI & LANGUAGE_MASK_PRIMARY : return true; default: @@ -238,6 +240,23 @@ bool MsLangId::hasForbiddenCharacters( LanguageType nLang ) } +// static +bool MsLangId::needsSequenceChecking( LanguageType nLang ) +{ + switch (nLang & LANGUAGE_MASK_PRIMARY) + { + case LANGUAGE_BURMESE & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_KHMER & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_LAO & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_THAI & LANGUAGE_MASK_PRIMARY: + return true; + default: + break; + } + return false; +} + + // static sal_Int16 MsLangId::getScriptType( LanguageType nLang ) { @@ -259,6 +278,7 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang ) case LANGUAGE_ASSAMESE: case LANGUAGE_BENGALI: case LANGUAGE_BENGALI_BANGLADESH: + case LANGUAGE_BURMESE: case LANGUAGE_FARSI: case LANGUAGE_HEBREW: case LANGUAGE_MARATHI: @@ -291,6 +311,10 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang ) case LANGUAGE_URDU_INDIA: case LANGUAGE_USER_KURDISH_IRAQ: case LANGUAGE_USER_KURDISH_IRAN: + case LANGUAGE_DHIVEHI: + case LANGUAGE_USER_BODO_INDIA: + case LANGUAGE_USER_DOGRI_INDIA: + case LANGUAGE_USER_MAITHILI_INDIA: nScript = ::com::sun::star::i18n::ScriptType::COMPLEX; break; @@ -312,7 +336,7 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang ) nScript = ::com::sun::star::i18n::ScriptType::ASIAN; break; // CTL catcher - case LANGUAGE_ARABIC & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_ARABIC_SAUDI_ARABIA & LANGUAGE_MASK_PRIMARY: nScript = ::com::sun::star::i18n::ScriptType::COMPLEX; break; // Western (actually not necessarily Latin but also Cyrillic, for example) @@ -330,26 +354,49 @@ LanguageType MsLangId::getReplacementForObsoleteLanguage( LanguageType nLang ) { switch (nLang) { + default: + break; // nothing case LANGUAGE_OBSOLETE_USER_LATIN: nLang = LANGUAGE_LATIN; + break; case LANGUAGE_OBSOLETE_USER_MAORI: nLang = LANGUAGE_MAORI_NEW_ZEALAND; + break; case LANGUAGE_OBSOLETE_USER_KINYARWANDA: nLang = LANGUAGE_KINYARWANDA_RWANDA; + break; case LANGUAGE_OBSOLETE_USER_UPPER_SORBIAN: nLang = LANGUAGE_UPPER_SORBIAN_GERMANY; + break; case LANGUAGE_OBSOLETE_USER_LOWER_SORBIAN: nLang = LANGUAGE_LOWER_SORBIAN_GERMANY; + break; case LANGUAGE_OBSOLETE_USER_OCCITAN: nLang = LANGUAGE_OCCITAN_FRANCE; + break; case LANGUAGE_OBSOLETE_USER_BRETON: nLang = LANGUAGE_BRETON_FRANCE; + break; case LANGUAGE_OBSOLETE_USER_KALAALLISUT: nLang = LANGUAGE_KALAALLISUT_GREENLAND; + break; case LANGUAGE_OBSOLETE_USER_LUXEMBOURGISH: nLang = LANGUAGE_LUXEMBOURGISH_LUXEMBOURG; - default: - ; // nothing + break; + + // The following are not strictly obsolete but should be mapped to a + // replacement locale when encountered. + + // no_NO is an alias for nb_NO + case LANGUAGE_NORWEGIAN: + nLang = LANGUAGE_NORWEGIAN_BOKMAL; + break; + + // #i94435# A Spanish variant that differs only in collation details we + // do not support. + case LANGUAGE_SPANISH_DATED: + nLang = LANGUAGE_SPANISH_MODERN; + break; } return nLang; } diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 0835746ba55c..7596efc1087c 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: LocaleNode.cxx,v $ - * $Revision: 1.29.16.1 $ + * $Revision: 1.29.24.3 $ * * This file is part of OpenOffice.org. * @@ -307,6 +307,11 @@ void LocaleNode::incError( const char* pStr ) const fprintf( stderr, "Error: %s\n", pStr); } +void LocaleNode::incError( const ::rtl::OUString& rStr ) const +{ + incError( OUStringToOString( rStr, RTL_TEXTENCODING_UTF8).getStr()); +} + char* LocaleNode::prepareErrorFormat( const char* pFormat, const char* pDefaultConversion ) const { static char buf[2048]; @@ -521,10 +526,15 @@ sal_Int16 LCFormatNode::mnFormats = 0; void LCFormatNode::generateCode (const OFileWriter &of) const { + OUString str; if (mnSection >= 2) incError("more than 2 LC_FORMAT sections"); of.writeParameter("replaceFrom", getAttr() -> getValueByName("replaceFrom"), mnSection); - of.writeParameter("replaceTo", getAttr() -> getValueByName("replaceTo"), mnSection); + str = getAttr() -> getValueByName("replaceTo"); + // Locale data generator inserts FFFF for LangID, we need to adapt that. + if (str.endsWithIgnoreAsciiCaseAsciiL( "-FFFF]", 6)) + incErrorStr("replaceTo=\"%s\" needs FFFF to be adapted to the real LangID value.", str); + of.writeParameter("replaceTo", str, mnSection); ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); if (useLocale.getLength() > 0) { switch (mnSection) @@ -539,32 +549,58 @@ void LCFormatNode::generateCode (const OFileWriter &of) const return; } sal_Int16 formatCount = mnFormats; - NameSet aMsgId; - ValueSet aFormatIndex; + NameSet aMsgIdSet; + ValueSet aFormatIndexSet; + NameSet aDefaultsSet; bool bCtypeIsRef = false; for (sal_Int16 i = 0; i< getNumberOfChildren() ; i++,formatCount++) { LocaleNode * currNode = getChildAt (i); - ::rtl::OUString str; + OUString aUsage; + OUString aType; + OUString aFormatIndex; // currNode -> print(); const Attr * currNodeAttr = currNode->getAttr(); //printf ("getLen() = %d\n", currNode->getAttr()->getLength()); + str = currNodeAttr -> getValueByName("msgid"); - if (!aMsgId.insert( str).second) + if (!aMsgIdSet.insert( str).second) incErrorStr( "Duplicated msgid=\"%s\" in FormatElement.", str); of.writeParameter("FormatKey", str, formatCount); + str = currNodeAttr -> getValueByName("default"); + bool bDefault = str.equalsAscii( "true"); of.writeDefaultParameter("FormatElement", str, formatCount); - str = currNodeAttr -> getValueByName("type"); - of.writeParameter("FormatType", str, formatCount); - str = currNodeAttr -> getValueByName("usage"); - of.writeParameter("FormatUsage", str, formatCount); - str = currNodeAttr -> getValueByName("formatindex"); - sal_Int16 formatindex = (sal_Int16)str.toInt32(); - if (!aFormatIndex.insert( formatindex).second) + + aType = currNodeAttr -> getValueByName("type"); + of.writeParameter("FormatType", aType, formatCount); + + aUsage = currNodeAttr -> getValueByName("usage"); + of.writeParameter("FormatUsage", aUsage, formatCount); + + aFormatIndex = currNodeAttr -> getValueByName("formatindex"); + sal_Int16 formatindex = (sal_Int16)aFormatIndex.toInt32(); + if (!aFormatIndexSet.insert( formatindex).second) incErrorInt( "Duplicated formatindex=\"%d\" in FormatElement.", formatindex); of.writeIntParameter("Formatindex", formatCount, formatindex); + // Ensure only one default per usage and type. + if (bDefault) + { + OUString aKey( aUsage + OUString( sal_Unicode(',')) + aType); + if (!aDefaultsSet.insert( aKey).second) + { + OUString aStr( RTL_CONSTASCII_USTRINGPARAM( "Duplicated default for usage=\"")); + aStr += aUsage; + aStr += OUString( RTL_CONSTASCII_USTRINGPARAM( "\" type=\"")); + aStr += aType; + aStr += OUString( RTL_CONSTASCII_USTRINGPARAM( "\": formatindex=\"")); + aStr += aFormatIndex; + aStr += OUString( RTL_CONSTASCII_USTRINGPARAM( "\".")); + incError( aStr); + } + } + const LocaleNode * n = currNode -> findNode("FormatCode"); if (n) { @@ -712,14 +748,14 @@ void LCFormatNode::generateCode (const OFileWriter &of) const if (mnSection == 0) { // 0..47 MUST be present, 48,49 MUST NOT be present - ValueSet::const_iterator aIter( aFormatIndex.begin()); + ValueSet::const_iterator aIter( aFormatIndexSet.begin()); for (sal_Int16 nNext = cssi::NumberFormatIndex::NUMBER_START; nNext < cssi::NumberFormatIndex::INDEX_TABLE_ENTRIES; ++nNext) { - sal_Int16 nHere = ::std::min( ((aIter != aFormatIndex.end() ? *aIter : + sal_Int16 nHere = ::std::min( ((aIter != aFormatIndexSet.end() ? *aIter : cssi::NumberFormatIndex::INDEX_TABLE_ENTRIES)), cssi::NumberFormatIndex::INDEX_TABLE_ENTRIES); - if (aIter != aFormatIndex.end()) ++aIter; + if (aIter != aFormatIndexSet.end()) ++aIter; for ( ; nNext < nHere; ++nNext) { switch (nNext) @@ -1415,6 +1451,8 @@ void LCMiscNode::generateCode (const OFileWriter &of) const const LocaleNode * forbidNode = findNode("ForbiddenCharacters"); const LocaleNode * breakNode = findNode("BreakIteratorRules"); + bool bEnglishLocale = (strncmp( of.getLocale(), "en_", 3) == 0); + sal_Int16 nbOfWords = 0; ::rtl::OUString str; sal_Int16 i; @@ -1433,6 +1471,14 @@ void LCMiscNode::generateCode (const OFileWriter &of) const fprintf( stderr, "Error: No content for ReservedWords %s.\n", ReserveWord[i].name); } of.writeParameter("ReservedWord", str, nbOfWords); + // "true", ..., "below" trigger untranslated warning. + if (!bEnglishLocale && curNode && (0 <= i && i <= 7) && + str.equalsIgnoreAsciiCaseAscii( ReserveWord[i].value)) + { + fprintf( stderr, + "Warning: ReservedWord %s seems to be untranslated \"%s\".\n", + ReserveWord[i].name, ReserveWord[i].value); + } } of.writeAsciiString("static const sal_Int16 nbOfReservedWords = "); of.writeInt(nbOfWords); diff --git a/i18npool/source/localedata/LocaleNode.hxx b/i18npool/source/localedata/LocaleNode.hxx index fd1806610236..30935bf7097d 100644 --- a/i18npool/source/localedata/LocaleNode.hxx +++ b/i18npool/source/localedata/LocaleNode.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: LocaleNode.hxx,v $ - * $Revision: 1.14.22.1 $ + * $Revision: 1.14.24.1 $ * * This file is part of OpenOffice.org. * @@ -148,6 +148,8 @@ public: OUString writeParameterCheckLen( const OFileWriter &of, const char* pNodeName, const char* pParameterName, sal_Int32 nMinLen, sal_Int32 nMaxLen ) const; // ++nError with output to stderr void incError( const char* pStr ) const; + // ++nError with output to stderr + void incError( const ::rtl::OUString& rStr ) const; // ++nError with output to stderr, pStr should contain "%d", otherwise appended void incErrorInt( const char* pStr, int nVal ) const; // ++nError with output to stderr, pStr should contain "%s", otherwise appended diff --git a/i18npool/source/localedata/data/it_IT.xml b/i18npool/source/localedata/data/it_IT.xml index de03f51ac423..1f5c7d6fd89d 100644 --- a/i18npool/source/localedata/data/it_IT.xml +++ b/i18npool/source/localedata/data/it_IT.xml @@ -332,16 +332,16 @@ vero falso - 1. quarto - 2. quarto - 3. quarto - 4. quarto + 1o trimestre + 2o trimestre + 3o trimestre + 4o trimestre sopra sotto - Q1 - Q2 - Q3 - Q4 + T1 + T2 + T3 + T4 diff --git a/i18npool/source/localedata/data/locale.dtd b/i18npool/source/localedata/data/locale.dtd index 5e9f82dc36d2..7d58023a064a 100644 --- a/i18npool/source/localedata/data/locale.dtd +++ b/i18npool/source/localedata/data/locale.dtd @@ -179,9 +179,18 @@ we received got that right, especially not in date formats! For easier comparison between locales in future please sort the - FormatElements by their formatindex="..." value. This isn't necessary - to be technically correct and isn't done in many locales yet, but will - certainly help. + FormatElements by their formatindex="..." value within a usage group. + This isn't necessary to be technically correct and isn't done in many + locales yet, but will certainly help. + + Of usage="FIXED_NUMBER": + formatindex="0" MUST be the format containing the 'General' keyword. + The keyword itself may be localized, it is good practice though to + stick with a wording known from another spreadsheet application for + better user experience. Like other format codes it may be prepended + with a [NatNum1] modifier if values are to be displayed using native + numbering if no specific format was applied. The format must have the + default="true" and type="medium" attributes. Of usage="DATE": formatindex="21" is used to edit already existing date data. In order diff --git a/i18npool/source/localedata/data/localedata_euro.map b/i18npool/source/localedata/data/localedata_euro.map index 5f8e8ac35569..9b46fd2adfa5 100644 --- a/i18npool/source/localedata/data/localedata_euro.map +++ b/i18npool/source/localedata/data/localedata_euro.map @@ -41,6 +41,7 @@ getAllCalendars_lb_LU; getAllCalendars_lt_LT; getAllCalendars_lv_LV; getAllCalendars_mk_MK; +getAllCalendars_mt_MT; getAllCalendars_nb_NO; getAllCalendars_nl_BE; getAllCalendars_nl_NL; @@ -105,6 +106,7 @@ getAllCurrencies_lb_LU; getAllCurrencies_lt_LT; getAllCurrencies_lv_LV; getAllCurrencies_mk_MK; +getAllCurrencies_mt_MT; getAllCurrencies_nb_NO; getAllCurrencies_nl_BE; getAllCurrencies_nl_NL; @@ -169,6 +171,7 @@ getAllFormats0_lb_LU; getAllFormats0_lt_LT; getAllFormats0_lv_LV; getAllFormats0_mk_MK; +getAllFormats0_mt_MT; getAllFormats0_nb_NO; getAllFormats0_nl_BE; getAllFormats0_nl_NL; @@ -233,6 +236,7 @@ getBreakIteratorRules_lb_LU; getBreakIteratorRules_lt_LT; getBreakIteratorRules_lv_LV; getBreakIteratorRules_mk_MK; +getBreakIteratorRules_mt_MT; getBreakIteratorRules_nb_NO; getBreakIteratorRules_nl_BE; getBreakIteratorRules_nl_NL; @@ -297,6 +301,7 @@ getCollationOptions_lb_LU; getCollationOptions_lt_LT; getCollationOptions_lv_LV; getCollationOptions_mk_MK; +getCollationOptions_mt_MT; getCollationOptions_nb_NO; getCollationOptions_nl_BE; getCollationOptions_nl_NL; @@ -361,6 +366,7 @@ getCollatorImplementation_lb_LU; getCollatorImplementation_lt_LT; getCollatorImplementation_lv_LV; getCollatorImplementation_mk_MK; +getCollatorImplementation_mt_MT; getCollatorImplementation_nb_NO; getCollatorImplementation_nl_BE; getCollatorImplementation_nl_NL; @@ -425,6 +431,7 @@ getContinuousNumberingLevels_lb_LU; getContinuousNumberingLevels_lt_LT; getContinuousNumberingLevels_lv_LV; getContinuousNumberingLevels_mk_MK; +getContinuousNumberingLevels_mt_MT; getContinuousNumberingLevels_nb_NO; getContinuousNumberingLevels_nl_BE; getContinuousNumberingLevels_nl_NL; @@ -489,6 +496,7 @@ getFollowPageWords_lb_LU; getFollowPageWords_lt_LT; getFollowPageWords_lv_LV; getFollowPageWords_mk_MK; +getFollowPageWords_mt_MT; getFollowPageWords_nb_NO; getFollowPageWords_nl_BE; getFollowPageWords_nl_NL; @@ -553,6 +561,7 @@ getForbiddenCharacters_lb_LU; getForbiddenCharacters_lt_LT; getForbiddenCharacters_lv_LV; getForbiddenCharacters_mk_MK; +getForbiddenCharacters_mt_MT; getForbiddenCharacters_nb_NO; getForbiddenCharacters_nl_BE; getForbiddenCharacters_nl_NL; @@ -617,6 +626,7 @@ getIndexAlgorithm_lb_LU; getIndexAlgorithm_lt_LT; getIndexAlgorithm_lv_LV; getIndexAlgorithm_mk_MK; +getIndexAlgorithm_mt_MT; getIndexAlgorithm_nb_NO; getIndexAlgorithm_nl_BE; getIndexAlgorithm_nl_NL; @@ -681,6 +691,7 @@ getLCInfo_lb_LU; getLCInfo_lt_LT; getLCInfo_lv_LV; getLCInfo_mk_MK; +getLCInfo_mt_MT; getLCInfo_nb_NO; getLCInfo_nl_BE; getLCInfo_nl_NL; @@ -745,6 +756,7 @@ getLocaleItem_lb_LU; getLocaleItem_lt_LT; getLocaleItem_lv_LV; getLocaleItem_mk_MK; +getLocaleItem_mt_MT; getLocaleItem_nb_NO; getLocaleItem_nl_BE; getLocaleItem_nl_NL; @@ -809,6 +821,7 @@ getOutlineNumberingLevels_lb_LU; getOutlineNumberingLevels_lt_LT; getOutlineNumberingLevels_lv_LV; getOutlineNumberingLevels_mk_MK; +getOutlineNumberingLevels_mt_MT; getOutlineNumberingLevels_nb_NO; getOutlineNumberingLevels_nl_BE; getOutlineNumberingLevels_nl_NL; @@ -873,6 +886,7 @@ getReservedWords_lb_LU; getReservedWords_lt_LT; getReservedWords_lv_LV; getReservedWords_mk_MK; +getReservedWords_mt_MT; getReservedWords_nb_NO; getReservedWords_nl_BE; getReservedWords_nl_NL; @@ -937,6 +951,7 @@ getSearchOptions_lb_LU; getSearchOptions_lt_LT; getSearchOptions_lv_LV; getSearchOptions_mk_MK; +getSearchOptions_mt_MT; getSearchOptions_nb_NO; getSearchOptions_nl_BE; getSearchOptions_nl_NL; @@ -1001,6 +1016,7 @@ getTransliterations_lb_LU; getTransliterations_lt_LT; getTransliterations_lv_LV; getTransliterations_mk_MK; +getTransliterations_mt_MT; getTransliterations_nb_NO; getTransliterations_nl_BE; getTransliterations_nl_NL; @@ -1065,6 +1081,7 @@ getUnicodeScripts_lb_LU; getUnicodeScripts_lt_LT; getUnicodeScripts_lv_LV; getUnicodeScripts_mk_MK; +getUnicodeScripts_mt_MT; getUnicodeScripts_nb_NO; getUnicodeScripts_nl_BE; getUnicodeScripts_nl_NL; diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map index 5d1105bb3563..5e32d8bb4a1b 100644 --- a/i18npool/source/localedata/data/localedata_others.map +++ b/i18npool/source/localedata/data/localedata_others.map @@ -40,6 +40,7 @@ getAllCalendars_ml_IN; getAllCalendars_mn_MN; getAllCalendars_mr_IN; getAllCalendars_ms_MY; +getAllCalendars_my_MM; getAllCalendars_ne_NP; getAllCalendars_nr_ZA; getAllCalendars_nso_ZA; @@ -47,6 +48,7 @@ getAllCalendars_or_IN; getAllCalendars_pa_IN; getAllCalendars_rw_RW; getAllCalendars_sg_CF; +getAllCalendars_shs_CA; getAllCalendars_so_SO; getAllCalendars_ss_ZA; getAllCalendars_st_ZA; @@ -58,6 +60,7 @@ getAllCalendars_th_TH; getAllCalendars_ti_ER; getAllCalendars_tk_TM; getAllCalendars_tn_ZA; +getAllCalendars_tpi_PG; getAllCalendars_ts_ZA; getAllCalendars_uz_UZ; getAllCalendars_ve_ZA; @@ -109,6 +112,7 @@ getAllCurrencies_ml_IN; getAllCurrencies_mn_MN; getAllCurrencies_mr_IN; getAllCurrencies_ms_MY; +getAllCurrencies_my_MM; getAllCurrencies_ne_NP; getAllCurrencies_nr_ZA; getAllCurrencies_nso_ZA; @@ -116,6 +120,7 @@ getAllCurrencies_or_IN; getAllCurrencies_pa_IN; getAllCurrencies_rw_RW; getAllCurrencies_sg_CF; +getAllCurrencies_shs_CA; getAllCurrencies_so_SO; getAllCurrencies_ss_ZA; getAllCurrencies_st_ZA; @@ -127,6 +132,7 @@ getAllCurrencies_th_TH; getAllCurrencies_ti_ER; getAllCurrencies_tk_TM; getAllCurrencies_tn_ZA; +getAllCurrencies_tpi_PG; getAllCurrencies_ts_ZA; getAllCurrencies_uz_UZ; getAllCurrencies_ve_ZA; @@ -178,6 +184,7 @@ getAllFormats0_ml_IN; getAllFormats0_mn_MN; getAllFormats0_mr_IN; getAllFormats0_ms_MY; +getAllFormats0_my_MM; getAllFormats0_ne_NP; getAllFormats0_nr_ZA; getAllFormats0_nso_ZA; @@ -185,6 +192,7 @@ getAllFormats0_or_IN; getAllFormats0_pa_IN; getAllFormats0_rw_RW; getAllFormats0_sg_CF; +getAllFormats0_shs_CA; getAllFormats0_so_SO; getAllFormats0_ss_ZA; getAllFormats0_st_ZA; @@ -196,6 +204,7 @@ getAllFormats0_th_TH; getAllFormats0_ti_ER; getAllFormats0_tk_TM; getAllFormats0_tn_ZA; +getAllFormats0_tpi_PG; getAllFormats0_ts_ZA; getAllFormats0_uz_UZ; getAllFormats0_ve_ZA; @@ -247,6 +256,7 @@ getBreakIteratorRules_ml_IN; getBreakIteratorRules_mn_MN; getBreakIteratorRules_mr_IN; getBreakIteratorRules_ms_MY; +getBreakIteratorRules_my_MM; getBreakIteratorRules_ne_NP; getBreakIteratorRules_nr_ZA; getBreakIteratorRules_nso_ZA; @@ -254,6 +264,7 @@ getBreakIteratorRules_or_IN; getBreakIteratorRules_pa_IN; getBreakIteratorRules_rw_RW; getBreakIteratorRules_sg_CF; +getBreakIteratorRules_shs_CA; getBreakIteratorRules_so_SO; getBreakIteratorRules_ss_ZA; getBreakIteratorRules_st_ZA; @@ -265,6 +276,7 @@ getBreakIteratorRules_th_TH; getBreakIteratorRules_ti_ER; getBreakIteratorRules_tk_TM; getBreakIteratorRules_tn_ZA; +getBreakIteratorRules_tpi_PG; getBreakIteratorRules_ts_ZA; getBreakIteratorRules_uz_UZ; getBreakIteratorRules_ve_ZA; @@ -316,6 +328,7 @@ getCollationOptions_ml_IN; getCollationOptions_mn_MN; getCollationOptions_mr_IN; getCollationOptions_ms_MY; +getCollationOptions_my_MM; getCollationOptions_ne_NP; getCollationOptions_nr_ZA; getCollationOptions_nso_ZA; @@ -323,6 +336,7 @@ getCollationOptions_or_IN; getCollationOptions_pa_IN; getCollationOptions_rw_RW; getCollationOptions_sg_CF; +getCollationOptions_shs_CA; getCollationOptions_so_SO; getCollationOptions_ss_ZA; getCollationOptions_st_ZA; @@ -334,6 +348,7 @@ getCollationOptions_th_TH; getCollationOptions_ti_ER; getCollationOptions_tk_TM; getCollationOptions_tn_ZA; +getCollationOptions_tpi_PG; getCollationOptions_ts_ZA; getCollationOptions_uz_UZ; getCollationOptions_ve_ZA; @@ -385,6 +400,7 @@ getCollatorImplementation_ml_IN; getCollatorImplementation_mn_MN; getCollatorImplementation_mr_IN; getCollatorImplementation_ms_MY; +getCollatorImplementation_my_MM; getCollatorImplementation_ne_NP; getCollatorImplementation_nr_ZA; getCollatorImplementation_nso_ZA; @@ -392,6 +408,7 @@ getCollatorImplementation_or_IN; getCollatorImplementation_pa_IN; getCollatorImplementation_rw_RW; getCollatorImplementation_sg_CF; +getCollatorImplementation_shs_CA; getCollatorImplementation_so_SO; getCollatorImplementation_ss_ZA; getCollatorImplementation_st_ZA; @@ -403,6 +420,7 @@ getCollatorImplementation_th_TH; getCollatorImplementation_ti_ER; getCollatorImplementation_tk_TM; getCollatorImplementation_tn_ZA; +getCollatorImplementation_tpi_PG; getCollatorImplementation_ts_ZA; getCollatorImplementation_uz_UZ; getCollatorImplementation_ve_ZA; @@ -454,6 +472,7 @@ getContinuousNumberingLevels_ml_IN; getContinuousNumberingLevels_mn_MN; getContinuousNumberingLevels_mr_IN; getContinuousNumberingLevels_ms_MY; +getContinuousNumberingLevels_my_MM; getContinuousNumberingLevels_ne_NP; getContinuousNumberingLevels_nr_ZA; getContinuousNumberingLevels_nso_ZA; @@ -461,6 +480,7 @@ getContinuousNumberingLevels_or_IN; getContinuousNumberingLevels_pa_IN; getContinuousNumberingLevels_rw_RW; getContinuousNumberingLevels_sg_CF; +getContinuousNumberingLevels_shs_CA; getContinuousNumberingLevels_so_SO; getContinuousNumberingLevels_ss_ZA; getContinuousNumberingLevels_st_ZA; @@ -472,6 +492,7 @@ getContinuousNumberingLevels_th_TH; getContinuousNumberingLevels_ti_ER; getContinuousNumberingLevels_tk_TM; getContinuousNumberingLevels_tn_ZA; +getContinuousNumberingLevels_tpi_PG; getContinuousNumberingLevels_ts_ZA; getContinuousNumberingLevels_uz_UZ; getContinuousNumberingLevels_ve_ZA; @@ -523,6 +544,7 @@ getFollowPageWords_ml_IN; getFollowPageWords_mn_MN; getFollowPageWords_mr_IN; getFollowPageWords_ms_MY; +getFollowPageWords_my_MM; getFollowPageWords_ne_NP; getFollowPageWords_nr_ZA; getFollowPageWords_nso_ZA; @@ -530,6 +552,7 @@ getFollowPageWords_or_IN; getFollowPageWords_pa_IN; getFollowPageWords_rw_RW; getFollowPageWords_sg_CF; +getFollowPageWords_shs_CA; getFollowPageWords_so_SO; getFollowPageWords_ss_ZA; getFollowPageWords_st_ZA; @@ -541,6 +564,7 @@ getFollowPageWords_th_TH; getFollowPageWords_ti_ER; getFollowPageWords_tk_TM; getFollowPageWords_tn_ZA; +getFollowPageWords_tpi_PG; getFollowPageWords_ts_ZA; getFollowPageWords_uz_UZ; getFollowPageWords_ve_ZA; @@ -592,6 +616,7 @@ getForbiddenCharacters_ml_IN; getForbiddenCharacters_mn_MN; getForbiddenCharacters_mr_IN; getForbiddenCharacters_ms_MY; +getForbiddenCharacters_my_MM; getForbiddenCharacters_ne_NP; getForbiddenCharacters_nr_ZA; getForbiddenCharacters_nso_ZA; @@ -599,6 +624,7 @@ getForbiddenCharacters_or_IN; getForbiddenCharacters_pa_IN; getForbiddenCharacters_rw_RW; getForbiddenCharacters_sg_CF; +getForbiddenCharacters_shs_CA; getForbiddenCharacters_so_SO; getForbiddenCharacters_ss_ZA; getForbiddenCharacters_st_ZA; @@ -610,6 +636,7 @@ getForbiddenCharacters_th_TH; getForbiddenCharacters_ti_ER; getForbiddenCharacters_tk_TM; getForbiddenCharacters_tn_ZA; +getForbiddenCharacters_tpi_PG; getForbiddenCharacters_ts_ZA; getForbiddenCharacters_uz_UZ; getForbiddenCharacters_ve_ZA; @@ -661,6 +688,7 @@ getIndexAlgorithm_ml_IN; getIndexAlgorithm_mn_MN; getIndexAlgorithm_mr_IN; getIndexAlgorithm_ms_MY; +getIndexAlgorithm_my_MM; getIndexAlgorithm_ne_NP; getIndexAlgorithm_nr_ZA; getIndexAlgorithm_nso_ZA; @@ -668,6 +696,7 @@ getIndexAlgorithm_or_IN; getIndexAlgorithm_pa_IN; getIndexAlgorithm_rw_RW; getIndexAlgorithm_sg_CF; +getIndexAlgorithm_shs_CA; getIndexAlgorithm_so_SO; getIndexAlgorithm_ss_ZA; getIndexAlgorithm_st_ZA; @@ -679,6 +708,7 @@ getIndexAlgorithm_th_TH; getIndexAlgorithm_ti_ER; getIndexAlgorithm_tk_TM; getIndexAlgorithm_tn_ZA; +getIndexAlgorithm_tpi_PG; getIndexAlgorithm_ts_ZA; getIndexAlgorithm_uz_UZ; getIndexAlgorithm_ve_ZA; @@ -730,6 +760,7 @@ getLCInfo_ml_IN; getLCInfo_mn_MN; getLCInfo_mr_IN; getLCInfo_ms_MY; +getLCInfo_my_MM; getLCInfo_ne_NP; getLCInfo_nr_ZA; getLCInfo_nso_ZA; @@ -737,6 +768,7 @@ getLCInfo_or_IN; getLCInfo_pa_IN; getLCInfo_rw_RW; getLCInfo_sg_CF; +getLCInfo_shs_CA; getLCInfo_so_SO; getLCInfo_ss_ZA; getLCInfo_st_ZA; @@ -748,6 +780,7 @@ getLCInfo_th_TH; getLCInfo_ti_ER; getLCInfo_tk_TM; getLCInfo_tn_ZA; +getLCInfo_tpi_PG; getLCInfo_ts_ZA; getLCInfo_uz_UZ; getLCInfo_ve_ZA; @@ -799,6 +832,7 @@ getLocaleItem_ml_IN; getLocaleItem_mn_MN; getLocaleItem_mr_IN; getLocaleItem_ms_MY; +getLocaleItem_my_MM; getLocaleItem_ne_NP; getLocaleItem_nr_ZA; getLocaleItem_nso_ZA; @@ -806,6 +840,7 @@ getLocaleItem_or_IN; getLocaleItem_pa_IN; getLocaleItem_rw_RW; getLocaleItem_sg_CF; +getLocaleItem_shs_CA; getLocaleItem_so_SO; getLocaleItem_ss_ZA; getLocaleItem_st_ZA; @@ -817,6 +852,7 @@ getLocaleItem_th_TH; getLocaleItem_ti_ER; getLocaleItem_tk_TM; getLocaleItem_tn_ZA; +getLocaleItem_tpi_PG; getLocaleItem_ts_ZA; getLocaleItem_uz_UZ; getLocaleItem_ve_ZA; @@ -868,6 +904,7 @@ getOutlineNumberingLevels_ml_IN; getOutlineNumberingLevels_mn_MN; getOutlineNumberingLevels_mr_IN; getOutlineNumberingLevels_ms_MY; +getOutlineNumberingLevels_my_MM; getOutlineNumberingLevels_ne_NP; getOutlineNumberingLevels_nr_ZA; getOutlineNumberingLevels_nso_ZA; @@ -875,6 +912,7 @@ getOutlineNumberingLevels_or_IN; getOutlineNumberingLevels_pa_IN; getOutlineNumberingLevels_rw_RW; getOutlineNumberingLevels_sg_CF; +getOutlineNumberingLevels_shs_CA; getOutlineNumberingLevels_so_SO; getOutlineNumberingLevels_ss_ZA; getOutlineNumberingLevels_st_ZA; @@ -886,6 +924,7 @@ getOutlineNumberingLevels_th_TH; getOutlineNumberingLevels_ti_ER; getOutlineNumberingLevels_tk_TM; getOutlineNumberingLevels_tn_ZA; +getOutlineNumberingLevels_tpi_PG; getOutlineNumberingLevels_ts_ZA; getOutlineNumberingLevels_uz_UZ; getOutlineNumberingLevels_ve_ZA; @@ -937,6 +976,7 @@ getReservedWords_ml_IN; getReservedWords_mn_MN; getReservedWords_mr_IN; getReservedWords_ms_MY; +getReservedWords_my_MM; getReservedWords_ne_NP; getReservedWords_nr_ZA; getReservedWords_nso_ZA; @@ -944,6 +984,7 @@ getReservedWords_or_IN; getReservedWords_pa_IN; getReservedWords_rw_RW; getReservedWords_sg_CF; +getReservedWords_shs_CA; getReservedWords_so_SO; getReservedWords_ss_ZA; getReservedWords_st_ZA; @@ -955,6 +996,7 @@ getReservedWords_th_TH; getReservedWords_ti_ER; getReservedWords_tk_TM; getReservedWords_tn_ZA; +getReservedWords_tpi_PG; getReservedWords_ts_ZA; getReservedWords_uz_UZ; getReservedWords_ve_ZA; @@ -1006,6 +1048,7 @@ getSearchOptions_ml_IN; getSearchOptions_mn_MN; getSearchOptions_mr_IN; getSearchOptions_ms_MY; +getSearchOptions_my_MM; getSearchOptions_ne_NP; getSearchOptions_nr_ZA; getSearchOptions_nso_ZA; @@ -1013,6 +1056,7 @@ getSearchOptions_or_IN; getSearchOptions_pa_IN; getSearchOptions_rw_RW; getSearchOptions_sg_CF; +getSearchOptions_shs_CA; getSearchOptions_so_SO; getSearchOptions_ss_ZA; getSearchOptions_st_ZA; @@ -1024,6 +1068,7 @@ getSearchOptions_th_TH; getSearchOptions_ti_ER; getSearchOptions_tk_TM; getSearchOptions_tn_ZA; +getSearchOptions_tpi_PG; getSearchOptions_ts_ZA; getSearchOptions_uz_UZ; getSearchOptions_ve_ZA; @@ -1075,6 +1120,7 @@ getTransliterations_ml_IN; getTransliterations_mn_MN; getTransliterations_mr_IN; getTransliterations_ms_MY; +getTransliterations_my_MM; getTransliterations_ne_NP; getTransliterations_nr_ZA; getTransliterations_nso_ZA; @@ -1082,6 +1128,7 @@ getTransliterations_or_IN; getTransliterations_pa_IN; getTransliterations_rw_RW; getTransliterations_sg_CF; +getTransliterations_shs_CA; getTransliterations_so_SO; getTransliterations_ss_ZA; getTransliterations_st_ZA; @@ -1093,6 +1140,7 @@ getTransliterations_th_TH; getTransliterations_ti_ER; getTransliterations_tk_TM; getTransliterations_tn_ZA; +getTransliterations_tpi_PG; getTransliterations_ts_ZA; getTransliterations_uz_UZ; getTransliterations_ve_ZA; @@ -1144,6 +1192,7 @@ getUnicodeScripts_ml_IN; getUnicodeScripts_mn_MN; getUnicodeScripts_mr_IN; getUnicodeScripts_ms_MY; +getUnicodeScripts_my_MM; getUnicodeScripts_ne_NP; getUnicodeScripts_nr_ZA; getUnicodeScripts_nso_ZA; @@ -1151,6 +1200,7 @@ getUnicodeScripts_or_IN; getUnicodeScripts_pa_IN; getUnicodeScripts_rw_RW; getUnicodeScripts_sg_CF; +getUnicodeScripts_shs_CA; getUnicodeScripts_so_SO; getUnicodeScripts_ss_ZA; getUnicodeScripts_st_ZA; @@ -1162,6 +1212,7 @@ getUnicodeScripts_th_TH; getUnicodeScripts_ti_ER; getUnicodeScripts_tk_TM; getUnicodeScripts_tn_ZA; +getUnicodeScripts_tpi_PG; getUnicodeScripts_ts_ZA; getUnicodeScripts_uz_UZ; getUnicodeScripts_ve_ZA; diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk index f59a16617d8f..b288275a386e 100644 --- a/i18npool/source/localedata/data/makefile.mk +++ b/i18npool/source/localedata/data/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.47 $ +# $Revision: 1.47.24.4 $ # # This file is part of OpenOffice.org. # @@ -182,6 +182,8 @@ MY_MISC_CXXFILES = \ $(MISC)$/localedata_mn_MN.cxx \ $(MISC)$/localedata_mr_IN.cxx \ $(MISC)$/localedata_ms_MY.cxx \ + $(MISC)$/localedata_mt_MT.cxx \ + $(MISC)$/localedata_my_MM.cxx \ $(MISC)$/localedata_nb_NO.cxx \ $(MISC)$/localedata_ne_NP.cxx \ $(MISC)$/localedata_nl_BE.cxx \ @@ -203,6 +205,7 @@ MY_MISC_CXXFILES = \ $(MISC)$/localedata_sh_ME.cxx \ $(MISC)$/localedata_sh_RS.cxx \ $(MISC)$/localedata_sh_YU.cxx \ + $(MISC)$/localedata_shs_CA.cxx \ $(MISC)$/localedata_sk_SK.cxx \ $(MISC)$/localedata_sl_SI.cxx \ $(MISC)$/localedata_so_SO.cxx \ @@ -221,6 +224,7 @@ MY_MISC_CXXFILES = \ $(MISC)$/localedata_ti_ER.cxx \ $(MISC)$/localedata_tk_TM.cxx \ $(MISC)$/localedata_tn_ZA.cxx \ + $(MISC)$/localedata_tpi_PG.cxx \ $(MISC)$/localedata_tr_TR.cxx \ $(MISC)$/localedata_ts_ZA.cxx \ $(MISC)$/localedata_uk_UA.cxx \ @@ -359,6 +363,7 @@ SHL3OBJS= \ $(SLO)$/localedata_lt_LT.obj \ $(SLO)$/localedata_lv_LV.obj \ $(SLO)$/localedata_mk_MK.obj \ + $(SLO)$/localedata_mt_MT.obj \ $(SLO)$/localedata_nb_NO.obj \ $(SLO)$/localedata_nl_BE.obj \ $(SLO)$/localedata_nl_NL.obj \ @@ -441,6 +446,7 @@ SHL4OBJS= \ $(SLO)$/localedata_mn_MN.obj \ $(SLO)$/localedata_mr_IN.obj \ $(SLO)$/localedata_ms_MY.obj \ + $(SLO)$/localedata_my_MM.obj \ $(SLO)$/localedata_ne_NP.obj \ $(SLO)$/localedata_nr_ZA.obj \ $(SLO)$/localedata_nso_ZA.obj \ @@ -448,6 +454,7 @@ SHL4OBJS= \ $(SLO)$/localedata_pa_IN.obj \ $(SLO)$/localedata_rw_RW.obj \ $(SLO)$/localedata_sg_CF.obj \ + $(SLO)$/localedata_shs_CA.obj \ $(SLO)$/localedata_so_SO.obj \ $(SLO)$/localedata_ss_ZA.obj \ $(SLO)$/localedata_st_ZA.obj \ @@ -459,6 +466,7 @@ SHL4OBJS= \ $(SLO)$/localedata_ti_ER.obj \ $(SLO)$/localedata_tk_TM.obj \ $(SLO)$/localedata_tn_ZA.obj \ + $(SLO)$/localedata_tpi_PG.obj \ $(SLO)$/localedata_ts_ZA.obj \ $(SLO)$/localedata_uz_UZ.obj \ $(SLO)$/localedata_ve_ZA.obj \ diff --git a/i18npool/source/localedata/data/mt_MT.xml b/i18npool/source/localedata/data/mt_MT.xml new file mode 100644 index 000000000000..790bd97303e0 --- /dev/null +++ b/i18npool/source/localedata/data/mt_MT.xml @@ -0,0 +1,359 @@ + + + + + + mt + Maltese + + + MT + Malta + + + + + / + , + . + : + . + ; + , + , + + + + + + + + + + QN + WN + metric + + + + General + + + 0 + + + 0.00 + + + #,##0 + + + #,##0.00 + + + #,###.00 + + + 0.00E+00 + + + 0.00E+000 + + + 0% + + + 0.00% + + + [CURRENCY]#,##0;-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;-[CURRENCY]#,##0.00 + + + [CURRENCY]#,##0;[RED]-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00 + + + CCC#,##0.00 + + + [CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.-- + + + D/MM/YY + + + NNNNDD, MMMM YYYY + + + DD/MM/YY + + + DD/MM/YYYY + + + D, MMM YY + + + D, MMM YYYY + + + D, MMM YYYY + + + D, MMMM YYYY + + + D, MMMM YY + + + NN, DD/MMM/YY + + + NN, D, MMM YY + + + NN, D, MMMM YYYY + + + NNNND, MMMM YYYY + + + MM/DD + + + YY-MM-DD + ISO 8601 + + + YYYY-MM-DD + ISO 8601 + + + MM/YY + + + MMM/DD + + + MMMM + + + QQ YY + + + WW + + + HH:MM + + + HH:MM:SS + + + HH:MM AM/PM + + + HH:MM:SS AM/PM + + + [HH]:MM:SS + + + MM:SS.00 + + + [HH]:MM:SS.00 + + + DD/MM/YY HH:MM + + + DD/MM/YYYY HH:MM:SS AM/PM + + + + + + IGNORE_CASE + + + + + IGNORE_CASE + + + + A-Z À È Ì Ò Ù Ċ Ġ Ħ Ż + 0 + 1 + 2 + sing. + pl. + + + + + + sun + Ħad + Il-Ħadd + + + mon + Tne + It-Tnejn + + + tue + Tli + It-Tlieta + + + wed + Erb + L-Erbgħa + + + thu + Ħam + Il-Ħamis + + + fri + Ġim + Il-Ġimgħa + + + sat + Sib + Is-Sibt + + + + + jan + Jan + Jannar + + + feb + Fra + Frar + + + mar + Mar + Marzu + + + apr + Apr + April + + + may + Mej + Mejju + + + jun + Ġun + Ġunju + + + jul + Lul + Lulju + + + aug + Aww + Awwissu + + + sep + Set + Settembru + + + oct + Ott + Ottubru + + + nov + Nov + Novembru + + + dec + Diċ + Diċembru + + + + + bc + qK + Qabel Kristu + + + ad + wK + Wara Kristu + + + + mon + + 4 + + + + + EUR + + EUR + Ewro + 2 + + + + + + + + + + Veru + Falz + L-ewwel kwart + It-tieni kwart + It-tielet kwart + Ir-raba' kwart + fuq + taħt + K1 + K2 + K3 + K4 + + + + + + + + + + + + + + + diff --git a/i18npool/source/localedata/data/my_MM.xml b/i18npool/source/localedata/data/my_MM.xml new file mode 100644 index 000000000000..dada8a5402d9 --- /dev/null +++ b/i18npool/source/localedata/data/my_MM.xml @@ -0,0 +1,486 @@ + + + + + + my + Burmese + + + MM + Myanmar + + + + + / + , + . + : + . + ; + + + + + + + + + + + + နံနက် + ညနေ + US + + + + [NatNum1]General + + + [NatNum1]0 + + + [NatNum1]0.00 + + + [NatNum1]#,##0 + + + [NatNum1]#,##0.00 + + + [NatNum1]#,###.00 + + + General + + + 0 + + + 0.00 + + + #,##0 + + + #,##0.00 + + + #,###.00 + + + 0.00E+000 + + + 0.00E+00 + + + [NatNum1]0% + + + [NatNum1]0.00% + + + 0% + + + 0.00% + + + [CURRENCY]#,##0;-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;-[CURRENCY]#,##0.00 + + + [CURRENCY]#,##0;[RED]-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00 + + + #,##0.00 CCC + + + [CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.-- + + + [NatNum1]#,##0[CURRENCY];[NatNum1]-#,##0[CURRENCY] + + + [NatNum1]#,##0 [CURRENCY];[NatNum1]-#,##0 [CURRENCY] + + + [NatNum1]#,##0 [CURRENCY];[RED][NatNum1]-#,##0 [CURRENCY] + + + D/M/YY + + + NNNNMMMM DD, YYYY + + + MM/DD/YY + + + DD/MM/YYYY + + + MMM D, YY + + + MMM D, YYYY + + + D. MMM. YYYY + + + MMMM D, YYYY + + + D. MMMM YYYY + + + NN, MMM D, YY + + + NN DD/MMM YY + + + NN, MMMM D, YYYY + + + NNNNMMMM D, YYYY + + + MM-DD + + + YY-MM-DD + ISO 8601 + + + YYYY-MM-DD + ISO 8601 + + + MM/YY + + + MMM DD + + + MMMM + + + QQ YY + + + WW + + + [NatNum1]DD/MM/YY + + + [NatNum1]D/M/YY + + + [NatNum1]DD/MM/YYYY + + + [NatNum1]DD-MM-YYYY + + + [NatNum1]D. MMM. YYYY + + + [NatNum1]D. MMMM YYYY + + + [NatNum1]NNN၊ MMMM D၊ YYYY + + + [NatNum1]MMMM D + + + [NatNum1]YYYYခုနှစ်၊ MMMMလ Dရက် NNNနေ့ + + + HH:MM + + + HH:MM:SS + + + HH:MM AM/PM + + + HH:MM:SS AM/PM + + + [HH]:MM:SS + + + MM:SS.00 + + + [HH]:MM:SS.00 + + + [NatNum1]HH:MM + + + [NatNum1]HH:MM:SS + + + [NatNum1]HHနာရီ MMမိနစ် + + + MM/DD/YY HH:MM AM/PM + + + DD/MM/YYYY HH:MM:SS + + + [NatNum1]DD/MM/YYYY HH:MM:SS + + + + + + IGNORE_CASE + + + + + IGNORE_CASE + + + + က-အ ဣ-ဧ ဩ-ဪ + 27 + p. + pp. + + + + + + sun + နွေ + တနင်္ဂနွေ + + + mon + လာ + တနင်္လာ + + + tue + ဂါ + အင်္ဂါ + + + wed + ဟူး + ဗုဒ္ဓဟူး + + + thu + တေး + ကြာသပတေး + + + fri + ကြာ + သောကြာ + + + sat + နေ + စနေ + + + + + jan + ဇန် + ဇန်နဝါရီ + + + feb + ဖေ + ဖေဖော်ဝါရီ + + + mar + မတ် + မတ် + + + apr + ဧပြီ + ဧပြီ + + + may + မေ + မေ + + + jun + ဇွန် + ဇွန် + + + jul + ဇူ + ဇူလိုင် + + + aug + + ဩဂုတ် + + + sep + စက် + စက်တင်ဘာ + + + oct + အောက် + အောက်တိုဘာ + + + nov + နို + နိုဝင်ဘာ + + + dec + ဒီ + ဒီဇင်ဘာ + + + + + bc + ဘီစီ + ခရစ်တော် မပေါ်မီကာလ + + + ad + အေဒီ + ခရစ်တော် ပေါ်ထွန်းပြီးကာလ + + + + mon + + 1 + + + + + MMK + K + MMK + Kyat + 2 + + + + + + + + + + + မှန် + မှား + ပထမ သုံးလပတ် + ဒုတိယ သုံးလပတ် + တတိယ သုံးလပတ် + စတုတ္ထ သုံးလပတ် + အပေါ် + အောက် + ပ-စိတ် + ဒု-စိတ် + တ-စိတ် + စ-စိတ် + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/i18npool/source/localedata/data/sh_RS.xml b/i18npool/source/localedata/data/sh_RS.xml index 4d97a9b950e0..4b744bdd5913 100644 --- a/i18npool/source/localedata/data/sh_RS.xml +++ b/i18npool/source/localedata/data/sh_RS.xml @@ -231,72 +231,6 @@ K4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/i18npool/source/localedata/data/shs_CA.xml b/i18npool/source/localedata/data/shs_CA.xml new file mode 100644 index 000000000000..4060d002bbe2 --- /dev/null +++ b/i18npool/source/localedata/data/shs_CA.xml @@ -0,0 +1,414 @@ + + + + + + shs + Shuswap + + + CA + Canada + + + + + / + , + . + : + . + ; + , + , + + + + + + + + + + AM + PM + metric + + + + General + + + 0 + + + 0.00 + + + #,##0 + + + #,##0.00 + + + #,###.00 + + + 0.00E+000 + + + 0.00E+00 + + + 0% + + + 0.00% + + + [CURRENCY]#,##0;-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;-[CURRENCY]#,##0.00 + + + [CURRENCY]#,##0;[RED]-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00 + + + #,##0.00 CCC + + + [CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.-- + + + M/D/YY + + + NNNNMMMM DD, YYYY + + + MM/DD/YY + + + MM/DD/YYYY + + + MMM D, YY + + + MMM D, YYYY + + + D. MMM. YYYY + + + MMMM D, YYYY + + + D. MMMM YYYY + + + NN, MMM D, YY + + + NN DD/MMM YY + + + NN, MMMM D, YYYY + + + NNNNMMMM D, YYYY + + + MM-DD + + + YY-MM-DD + ISO 8601 + + + YYYY-MM-DD + ISO 8601 + + + MM/YY + + + MMM DD + + + MMMM + + + QQ YY + + + WW + + + HH:MM + + + HH:MM:SS + + + HH:MM AM/PM + + + HH:MM:SS AM/PM + + + [HH]:MM:SS + + + MM:SS.00 + + + [HH]:MM:SS.00 + + + MM/DD/YY HH:MM AM/PM + + + MM/DD/YYYY HH:MM:SS + + + + + + IGNORE_CASE + + + + + IGNORE_CASE + + + + A-Z + 0 + 1 + p. + pp. + + + + + + sun + Sxe + Sxetspesq't + + + mon + Spe + Spetkesq't + + + tue + Sel + Selesq't + + + wed + Ske + Skellesq't + + + thu + Sme + Smesesq't + + + fri + Sts + Stselkstesq't + + + sat + Stq + Stqmekstesq't + + + + + jan + Kwe + Pellkwet'min + + + feb + Tsi + Pelctsipwen'ten + + + mar + Sqe + Pellsqe'pts + + + apr + E'w + Peslle'wten + + + may + Ell + Pell7ell7e'7llqten + + + jun + Tsp + Pelltspe'ntsk + + + jul + Tqw + Pelltqwelq'we'l't + + + aug + Ct' + Pellct'e'xel'cten + + + sep + Qel + Pesqelqle'lten + + + oct + Wel + Pesllwe'lsten + + + nov + U7l + Pellc7ell7u'7llcwten' + + + dec + Tet + Pelltete'tq'em + + + + + bc + BC + BC + + + ad + AD + AD + + + + sun + + 1 + + + + + CAD + $ + CAD + CA Dollar + 2 + + + + + + + + + + true + false + 1st quarter + 2nd quarter + 3rd quarter + 4th quarter + above + below + Q1 + Q2 + Q3 + Q4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/i18npool/source/localedata/data/sr_RS.xml b/i18npool/source/localedata/data/sr_RS.xml index 0040d588fecb..4023c2d4afeb 100644 --- a/i18npool/source/localedata/data/sr_RS.xml +++ b/i18npool/source/localedata/data/sr_RS.xml @@ -371,35 +371,35 @@ - - - + + + + + - - - + - + - + - + @@ -411,13 +411,13 @@ - + - + - + diff --git a/i18npool/source/localedata/data/tpi_PG.xml b/i18npool/source/localedata/data/tpi_PG.xml new file mode 100644 index 000000000000..0017a1081233 --- /dev/null +++ b/i18npool/source/localedata/data/tpi_PG.xml @@ -0,0 +1,358 @@ + + + + + + tpi + Tok Pisin + + + PG + Papua New Guinea + + + + + / + , + . + : + . + ; + , + , + + + + + + + + + + AM + PM + metric + + + + General + + + 0 + + + 0.00 + + + #,##0 + + + #,##0.00 + + + #,###.00 + + + 0.00E+00 + + + 0.00E+000 + + + 0% + + + 0.00% + + + [CURRENCY]#,##0;-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;-[CURRENCY]#,##0.00 + + + [CURRENCY]#,##0;[RED]-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00 + + + CCC#,##0.00 + + + [CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.-- + + + D/MM/YY + + + NNNNDD, MMMM YYYY + + + DD/MM/YY + + + DD/MM/YYYY + + + D, MMM YY + + + D, MMM YYYY + + + D, MMM YYYY + + + D, MMMM YYYY + + + D, MMMM YY + + + NN, DD/MMM/YY + + + NN, D, MMM YY + + + NN, D, MMMM YYYY + + + NNNND, MMMM YYYY + + + MM/DD + + + YY-MM-DD + ISO 8601 + + + YYYY-MM-DD + ISO 8601 + + + MM/YY + + + MMM/DD + + + MMMM + + + QQ YY + + + WW + + + HH:MM + + + HH:MM:SS + + + HH:MM AM/PM + + + HH:MM:SS AM/PM + + + [HH]:MM:SS + + + MM:SS.00 + + + [HH]:MM:SS.00 + + + DD/MM/YY HH:MM + + + DD/MM/YYYY HH:MM:SS AM/PM + + + + + + IGNORE_CASE + + + + + IGNORE_CASE + + + + A-Z + 0 + 1 + p + pp + + + + + + sun + San + Sande + + + mon + Man + Mande + + + tue + Tun + Tunde + + + wed + Tri + Trinde + + + thu + Fon + Fonde + + + fri + Frai + Fraide + + + sat + Sar + Sarere + + + + + jan + Jan + Janueri + + + feb + Feb + Februeri + + + mar + Mas + Mas + + + apr + Epr + Epril + + + may + Me + Me + + + jun + Jun + Jun + + + jul + Jul + Julai + + + aug + Og + Ogas + + + sep + Sep + Septemba + + + oct + Okt + Oktoba + + + nov + Nov + Novemba + + + dec + Des + Desemba + + + + + bc + BK + bipo, taim Krais i no kam daun long graun yet + + + ad + AD + taim Krais i kirap bek i kam inap nau + + + + sun + + 1 + + + + + PGK + K + PGK + Kina + 2 + + + + + + + + + + Tru + Giaman + Namba Wan Kota + Namba Tu Kota + Namba Tri Kota + Namba Foa Kota + Antap + Daunbilo + K1 + K2 + K3 + K4 + + + + + + + + + + + + + + + diff --git a/i18npool/source/localedata/data/zh_CN.xml b/i18npool/source/localedata/data/zh_CN.xml index 3409144ae95a..0fadbf5d9075 100644 --- a/i18npool/source/localedata/data/zh_CN.xml +++ b/i18npool/source/localedata/data/zh_CN.xml @@ -125,11 +125,11 @@ -YYYY"年"MMMD"月" +YYYY"年"MMMD"日" -YYYY "年" MMM D "月" +YYYY "年" MMM D "日" @@ -428,8 +428,8 @@ -:!),.:;?]}¢'"、。〉》」』】〕〗〞︰︱︳﹐、﹒﹔﹕﹖﹗﹚﹜﹞!),.:;?|}︴︶︸︺︼︾﹀﹂﹄﹏、~¢々‖•·ˇˉ―--′ -([{£¥'"‵〈《「『【〔〖([{£¥〝︵︷︹︻︽︿﹁﹃﹙﹛﹝({ +:!),.:;?]}¢'"、。〉》」』】〕〗〞︰︱︳﹐、﹒﹔﹕﹖﹗﹚﹜﹞!),.:;?|}︴︶︸︺︼︾﹀﹂﹄﹏、~¢々‖•·ˇˉ―--′’” +([{£¥'"‵〈《「『【〔〖([{£¥〝︵︷︹︻︽︿﹁﹃﹙﹛﹝({“‘ !,.:;?、。!,.:;? diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index c0ec98f646aa..456bb1761b41 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: localedata.cxx,v $ - * $Revision: 1.59.16.1 $ + * $Revision: 1.59.24.4 $ * * This file is part of OpenOffice.org. * @@ -174,6 +174,7 @@ static const struct { { "gsc_FR", lcl_DATA_EURO }, { "fy_NL", lcl_DATA_EURO }, { "oc_FR", lcl_DATA_EURO }, + { "mt_MT", lcl_DATA_EURO }, { "ja_JP", lcl_DATA_OTHERS }, { "ko_KR", lcl_DATA_OTHERS }, @@ -246,6 +247,9 @@ static const struct { { "so_SO", lcl_DATA_OTHERS }, { "gug_PY", lcl_DATA_OTHERS }, { "tk_TM", lcl_DATA_OTHERS }, + { "my_MM", lcl_DATA_OTHERS }, + { "shs_CA", lcl_DATA_OTHERS }, + { "tpi_PG", lcl_DATA_OTHERS }, }; static const sal_Unicode under = sal_Unicode('_'); diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx index 9e4b0b091b3c..187693269041 100644 --- a/i18npool/source/search/levdis.cxx +++ b/i18npool/source/search/levdis.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: levdis.cxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.24.1 $ * * This file is part of OpenOffice.org. * @@ -121,7 +121,7 @@ } \ } -sal_Int32 Impl_WLD_StringLen( const sal_Unicode* pStr ) +static sal_Int32 Impl_WLD_StringLen( const sal_Unicode* pStr ) { const sal_Unicode* pTempStr = pStr; while( *pTempStr ) @@ -131,7 +131,7 @@ sal_Int32 Impl_WLD_StringLen( const sal_Unicode* pStr ) #ifdef erTESTMAT #define erTESTMATMAX 180 -static int far npMatrix[erTESTMATMAX][erTESTMATMAX]; // nearly 64K +static int npMatrix[erTESTMATMAX][erTESTMATMAX]; // nearly 64K #endif // Distanz von String zu Pattern @@ -366,19 +366,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) } -int WLevDistance::WLD( const ::rtl::OUString& rString ) -{ - return( WLD( rString.getStr(), rString.getLength() )); -} - - - -int WLevDistance::WLD( const sal_Unicode* cString ) -{ - return( WLD( cString, Impl_WLD_StringLen(cString) )); -} - - // Berechnung von nLimit, nReplP0, nInsQ0, nDelR0, bSplitCount // aus Userwerten nOtherX, nShorterY, nLongerZ, bRelaxed @@ -511,34 +498,7 @@ void WLevDistance::InitData( const sal_Unicode* cPattern ) // CTor -WLevDistance::WLevDistance( const sal_Unicode* cPattern ) : - nPatternLen( Impl_WLD_StringLen(cPattern) ), - aPatMem( nPatternLen + 1 ), - nArrayLen( nPatternLen + 1 ), - aDisMem( nArrayLen ), - nLimit( LEVDISDEFAULTLIMIT ), - nRepP0( LEVDISDEFAULT_P0 ), - nInsQ0( LEVDISDEFAULT_Q0 ), - nDelR0( LEVDISDEFAULT_R0 ), - bSplitCount( false ) -{ - InitData( cPattern ); -} - - - -WLevDistance::WLevDistance( const sal_Unicode* cPattern, - int nOtherX, int nShorterY, int nLongerZ, - bool bRelaxed ) : - nPatternLen( Impl_WLD_StringLen(cPattern) ), - aPatMem( nPatternLen + 1 ), - nArrayLen( nPatternLen + 1 ), - aDisMem( nArrayLen ) -{ - InitData( cPattern ); - CalcLPQR( nOtherX, nShorterY, nLongerZ, bRelaxed ); -} - +#ifdef erTEST WLevDistance::WLevDistance( const ::rtl::OUString& rPattern ) : nPatternLen( rPattern.getLength() ), @@ -554,6 +514,21 @@ WLevDistance::WLevDistance( const ::rtl::OUString& rPattern ) : InitData( rPattern.getStr() ); } +#endif // erTEST + + +WLevDistance::WLevDistance( const sal_Unicode* cPattern, + int nOtherX, int nShorterY, int nLongerZ, + bool bRelaxed ) : + nPatternLen( Impl_WLD_StringLen(cPattern) ), + aPatMem( nPatternLen + 1 ), + nArrayLen( nPatternLen + 1 ), + aDisMem( nArrayLen ) +{ + InitData( cPattern ); + CalcLPQR( nOtherX, nShorterY, nLongerZ, bRelaxed ); +} + // CopyCTor WLevDistance::WLevDistance( const WLevDistance& rWLD ) : @@ -597,17 +572,19 @@ typedef char MAXSTRING [LINESIZE+1]; #ifdef erTESTMAT -void WLevDistance::ShowMatrix( const char* cString ) +void WLevDistance::ShowMatrix( const sal_Unicode* cString ) { - sal_Int32 r, c, l = strlen(cString); + sal_Int32 r, c, l = Impl_WLD_StringLen(cString); printf(" | "); for ( c=0; cShowTest(); @@ -742,6 +722,7 @@ main( int argc, char **argv ) } else { +#error Error: conversion from char to sal_Unicode needed! pTest = new WLevDistance( argv[args+1], nX, nY, nZ, !bStrict ); #ifdef erTESTCCTOR WLevDistance aTmp( *pTest ); @@ -753,7 +734,7 @@ main( int argc, char **argv ) do { char* cp1, *cp2; - static ULONG nLine = 0; + static long unsigned int nLine = 0; cp1 = cLine; cin.getline( cLine, LINESIZE ) ; nLine++; @@ -772,21 +753,24 @@ main( int argc, char **argv ) int ret; if ( IgnoreCase ) { - char* cp1 = cString; - char* cp2 = cIgString; - while ( *cp1 ) - *cp2++ = tolower( *cp1++ ); - *cp2 = '\0'; + char* cpi1 = cString; + char* cpi2 = cIgString; + while ( *cpi1 ) + *cpi2++ = tolower( *cpi1++ ); + *cpi2 = '\0'; +#error Error: conversion from char to OUString / sal_Unicode,length needed! ret = pTest->WLD( cIgString ); } else +#error Error: conversion from char to OUString / sal_Unicode,length needed! ret = pTest->WLD( cString ); #ifdef erTESTMAT printf("\n# %3d : %s\n", ret, cString); +#error Error: conversion from char to sal_Unicode needed! pTest->ShowMatrix( cString ); #else if ( ret <= nLim ) - printf("# %3d : %s\t(line %ld)\t%s\n", ret, cString, nLine, cLine); + printf("# %3d : %s\t(line %lu)\t%s\n", ret, cString, nLine, cLine); #endif } } diff --git a/i18npool/source/search/levdis.hxx b/i18npool/source/search/levdis.hxx index 64663b52bd55..92240444175b 100644 --- a/i18npool/source/search/levdis.hxx +++ b/i18npool/source/search/levdis.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: levdis.hxx,v $ - * $Revision: 1.4 $ + * $Revision: 1.4.24.1 $ * * This file is part of OpenOffice.org. * @@ -147,10 +147,12 @@ class WLevDistance int KGV( int a, int b ); // Kleinstes Gemeinsames Vielfaches public: + +#ifdef erTEST // CToren fuer direktes Setzen der Gewichtung mit Set...() // im CTor werden die Defaultwerte fuer Limit/Rep/Ins/Del gesetzt - WLevDistance( const sal_Unicode* cPattern ); - WLevDistance( const ::rtl::OUString& rPattern ); + explicit WLevDistance( const ::rtl::OUString& rPattern ); +#endif // CToren mit Userangaben, danach mit GetLimit() Limit holen // interner Aufruf von CalcLPQR() @@ -162,9 +164,7 @@ public: ~WLevDistance(); // Berechnung der Levenshtein-Distanz von String zu Pattern - int WLD( const sal_Unicode* cString, sal_Int32 nStringLen ); // prefered - int WLD( const sal_Unicode* cString ); - int WLD( const ::rtl::OUString& rString ); + int WLD( const sal_Unicode* cString, sal_Int32 nStringLen ); // Berechnung der Gewichtung aus Userangaben, return nLimit int CalcLPQR( int nOtherX, int nShorterY, int nLongerZ, @@ -187,7 +187,7 @@ public: #ifdef erTEST void ShowTest(); #ifdef erTESTMAT - void ShowMatrix( const char* cString ); + void ShowMatrix( const sal_Unicode* cString ); #endif #endif diff --git a/i18npool/source/transliteration/transliteration_caseignore.cxx b/i18npool/source/transliteration/transliteration_caseignore.cxx index ec6e0249cc46..bec324e94a4a 100644 --- a/i18npool/source/transliteration/transliteration_caseignore.cxx +++ b/i18npool/source/transliteration/transliteration_caseignore.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: transliteration_caseignore.cxx,v $ - * $Revision: 1.11 $ + * $Revision: 1.11.24.1 $ * * This file is part of OpenOffice.org. * @@ -52,6 +52,11 @@ Transliteration_caseignore::Transliteration_caseignore() implementationName = "com.sun.star.i18n.Transliteration.Transliteration_caseignore"; } +#if 0 +/* NOTE: We had this, derived from Transliteration_caseignore, but it was + * unused code. Deactivated with #i89580# but left for reference in case + * MappingTypeSimpleFolding would be needed at some time. + */ Transliteration_simplecaseignore::Transliteration_simplecaseignore() { nMappingType = MappingTypeSimpleFolding; @@ -59,6 +64,7 @@ Transliteration_simplecaseignore::Transliteration_simplecaseignore() transliterationName = "simple case ignore (generic)"; implementationName = "com.sun.star.i18n.Transliteration.Transliteration_simplecaseignore"; } +#endif void SAL_CALL Transliteration_caseignore::loadModule( TransliterationModules modName, const Locale& rLocale ) diff --git a/svtools/source/config/ctloptions.cxx b/svtools/source/config/ctloptions.cxx index c636373bfddf..5d2bf131add1 100644 --- a/svtools/source/config/ctloptions.cxx +++ b/svtools/source/config/ctloptions.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ctloptions.cxx,v $ - * $Revision: 1.18 $ + * $Revision: 1.18.140.1 $ * * This file is part of OpenOffice.org. * @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include @@ -317,10 +317,8 @@ void SvtCTLOptions_Impl::Load() sal_uInt16 nLanguage = Application::GetSettings().GetLanguage(); //enable sequence checking for the appropriate languages m_bCTLSequenceChecking = m_bCTLRestricted = m_bCTLTypeAndReplace = - ( LANGUAGE_KHMER == nLanguage || LANGUAGE_KHMER == eSystemLanguage || - LANGUAGE_THAI == nLanguage || LANGUAGE_THAI == eSystemLanguage || - LANGUAGE_VIETNAMESE == nLanguage || LANGUAGE_VIETNAMESE == eSystemLanguage || - LANGUAGE_LAO == nLanguage || LANGUAGE_LAO == eSystemLanguage ); + (MsLangId::needsSequenceChecking( nLanguage) || + MsLangId::needsSequenceChecking( eSystemLanguage)); Commit(); } m_bIsLoaded = sal_True; diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx index 2e14a71d6d07..6226992136c8 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: langtab.cxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.3.140.1 $ * * This file is part of OpenOffice.org. * @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -59,9 +60,7 @@ SvtLanguageTable::~SvtLanguageTable() const String& SvtLanguageTable::GetString( const LanguageType eType ) const { - // no_NO is an alias for nb_NO - LanguageType eLang = (eType == LANGUAGE_NORWEGIAN ? - LANGUAGE_NORWEGIAN_BOKMAL : eType); + LanguageType eLang = MsLangId::getReplacementForObsoleteLanguage( eType); sal_uInt32 nPos = FindIndex( eLang ); if ( RESARRAY_INDEX_NOTFOUND != nPos && nPos < Count() ) diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index c1d0f5d362d7..0e281f7d3d83 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: langtab.src,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.140.6 $ * * This file is part of OpenOffice.org. * @@ -46,22 +46,32 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Default" ; LANGUAGE_SYSTEM ; > ; < "Afrikaans (South Africa)" ; LANGUAGE_AFRIKAANS ; > ; < "Albanian" ; LANGUAGE_ALBANIAN ; > ; - < "Arabic (Iraq)" ; LANGUAGE_ARABIC_IRAQ ; > ; - < "Arabic (Egypt)" ; LANGUAGE_ARABIC_EGYPT ; > ; - < "Arabic (Libya)" ; LANGUAGE_ARABIC_LIBYA ; > ; - < "Arabic (Algerian)" ; LANGUAGE_ARABIC_ALGERIA ; > ; - < "Arabic (Morocco)" ; LANGUAGE_ARABIC_MOROCCO ; > ; - < "Arabic (Tunisia)" ; LANGUAGE_ARABIC_TUNISIA ; > ; - < "Arabic (Oman)" ; LANGUAGE_ARABIC_OMAN ; > ; - < "Arabic (Yemen)" ; LANGUAGE_ARABIC_YEMEN ; > ; - < "Arabic (Syria)" ; LANGUAGE_ARABIC_SYRIA ; > ; - < "Arabic (Jordan)" ; LANGUAGE_ARABIC_JORDAN ; > ; - < "Arabic (Lebanon)" ; LANGUAGE_ARABIC_LEBANON ; > ; - < "Arabic (Kuwait)" ; LANGUAGE_ARABIC_KUWAIT ; > ; - < "Arabic (UAE)" ; LANGUAGE_ARABIC_UAE ; > ; + < "Arabic" ; LANGUAGE_ARABIC_PRIMARY_ONLY ; > ; + < "Arabic (Algeria)" ; LANGUAGE_ARABIC_ALGERIA ; > ; < "Arabic (Bahrain)" ; LANGUAGE_ARABIC_BAHRAIN ; > ; + < "Arabic (Chad)" ; LANGUAGE_USER_ARABIC_CHAD ; > ; + < "Arabic (Comoros)" ; LANGUAGE_USER_ARABIC_COMOROS ; > ; + < "Arabic (Djibouti)" ; LANGUAGE_USER_ARABIC_DJIBOUTI ; > ; + < "Arabic (Egypt)" ; LANGUAGE_ARABIC_EGYPT ; > ; + < "Arabic (Eritrea)" ; LANGUAGE_USER_ARABIC_ERITREA ; > ; + < "Arabic (Iraq)" ; LANGUAGE_ARABIC_IRAQ ; > ; + < "Arabic (Israel)" ; LANGUAGE_USER_ARABIC_ISRAEL ; > ; + < "Arabic (Jordan)" ; LANGUAGE_ARABIC_JORDAN ; > ; + < "Arabic (Kuwait)" ; LANGUAGE_ARABIC_KUWAIT ; > ; + < "Arabic (Lebanon)" ; LANGUAGE_ARABIC_LEBANON ; > ; + < "Arabic (Libya)" ; LANGUAGE_ARABIC_LIBYA ; > ; + < "Arabic (Mauritania)" ; LANGUAGE_USER_ARABIC_MAURITANIA ; > ; + < "Arabic (Morocco)" ; LANGUAGE_ARABIC_MOROCCO ; > ; + < "Arabic (Oman)" ; LANGUAGE_ARABIC_OMAN ; > ; + < "Arabic (Palestine)" ; LANGUAGE_USER_ARABIC_PALESTINE ; > ; < "Arabic (Qatar)" ; LANGUAGE_ARABIC_QATAR ; > ; < "Arabic (Saudi Arabia)" ; LANGUAGE_ARABIC_SAUDI_ARABIA ; > ; + < "Arabic (Somalia)" ; LANGUAGE_USER_ARABIC_SOMALIA ; > ; + < "Arabic (Sudan)" ; LANGUAGE_USER_ARABIC_SUDAN ; > ; + < "Arabic (Syria)" ; LANGUAGE_ARABIC_SYRIA ; > ; + < "Arabic (Tunisia)" ; LANGUAGE_ARABIC_TUNISIA ; > ; + < "Arabic (UAE)" ; LANGUAGE_ARABIC_UAE ; > ; + < "Arabic (Yemen)" ; LANGUAGE_ARABIC_YEMEN ; > ; < "Armenian" ; LANGUAGE_ARMENIAN ; > ; < "Assami" ; LANGUAGE_ASSAMESE ; > ; < "Azerbaijani Latin" ; LANGUAGE_AZERI_LATIN ; > ; @@ -159,7 +169,6 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Slovenian" ; LANGUAGE_SLOVENIAN ; > ; < "Spanish (Spain)" ; LANGUAGE_SPANISH ; > ; < "Spanish (Mexico)" ; LANGUAGE_SPANISH_MEXICAN ; > ; - < "Spanish, Modern (Spain)" ; LANGUAGE_SPANISH_MODERN ; > ; < "Spanish (Guatemala)" ; LANGUAGE_SPANISH_GUATEMALA ; > ; < "Spanish (Costa Rica)" ; LANGUAGE_SPANISH_COSTARICA ; > ; < "Spanish (Panama)" ; LANGUAGE_SPANISH_PANAMA ; > ; @@ -290,6 +299,9 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Santali" ; LANGUAGE_USER_SANTALI_INDIA ; > ; < "Tetun (Timor-Leste)" ; LANGUAGE_USER_TETUN_TIMOR_LESTE ; > ; < "Turkmen" ; LANGUAGE_TURKMEN ; > ; + < "Maltese" ; LANGUAGE_MALTESE ; > ; + < "Tok Pisin" ; LANGUAGE_USER_TOK_PISIN ; > ; + < "Shuswap" ; LANGUAGE_USER_SHUSWAP ; > ; }; }; diff --git a/svtools/source/numbers/zforfind.cxx b/svtools/source/numbers/zforfind.cxx index b143ad4d8f79..7aac440e8b58 100644 --- a/svtools/source/numbers/zforfind.cxx +++ b/svtools/source/numbers/zforfind.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: zforfind.cxx,v $ - * $Revision: 1.51 $ + * $Revision: 1.51.96.1 $ * * This file is part of OpenOffice.org. * @@ -1385,13 +1385,14 @@ input for the following reasons: { "ko", "KR", "hanja_yoil" }, { "th", "TH", "buddhist" }, { "zh", "TW", "ROC" }, - 0 + {0,0,0} }; lang::Locale aLocale; sal_Bool bValid; - sal_Int16 nDay, nMonth, nYear, nHour, nMinute, nSecond; + sal_Int16 nDay, nMyMonth, nYear, nHour, nMinute, nSecond; sal_Int16 nDaySet, nMonthSet, nYearSet, nHourSet, nMinuteSet, nSecondSet; - sal_Int16 nZO, nDST1, nDST2, nDST; + sal_Int16 nZO, nDST1, nDST2, nDST, nZOmillis, nDST1millis, nDST2millis, nDSTmillis; + sal_Int32 nZoneInMillis, nDST1InMillis, nDST2InMillis; uno::Reference< lang::XMultiServiceFactory > xSMgr = ::comphelper::getProcessServiceFactory(); uno::Reference< ::com::sun::star::i18n::XExtendedCalendar > xCal( @@ -1402,18 +1403,27 @@ input for the following reasons: for ( const entry* p = cals; p->lan; ++p ) { aLocale.Language = ::rtl::OUString::createFromAscii( p->lan ); - aLocale.Country = ::rtl::OUString::createFromAscii( p->cou ); + aLocale.Country = ::rtl::OUString::createFromAscii( p->cou ); xCal->loadCalendar( ::rtl::OUString::createFromAscii( p->cal ), aLocale ); double nDateTime = 0.0; // 1-Jan-1970 00:00:00 - nZO = xCal->getValue( i18n::CalendarFieldIndex::ZONE_OFFSET ); - nDST1 = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET ); - nDateTime -= (double)(nZO + nDST1) / 60.0 / 24.0; + nZO = xCal->getValue( i18n::CalendarFieldIndex::ZONE_OFFSET ); + nZOmillis = xCal->getValue( i18n::CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS ); + nZoneInMillis = static_cast(nZO) * 60000 + + (nZO < 0 ? -1 : 1) * static_cast(nZOmillis); + nDST1 = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET ); + nDST1millis = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS ); + nDST1InMillis = static_cast(nDST1) * 60000 + + (nDST1 < 0 ? -1 : 1) * static_cast(nDST1millis); + nDateTime -= (double)(nZoneInMillis + nDST1InMillis) / 1000.0 / 60.0 / 60.0 / 24.0; xCal->setDateTime( nDateTime ); - nDST2 = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET ); - if ( nDST1 != nDST2 ) + nDST2 = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET ); + nDST2millis = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS ); + nDST2InMillis = static_cast(nDST2) * 60000 + + (nDST2 < 0 ? -1 : 1) * static_cast(nDST2millis); + if ( nDST1InMillis != nDST2InMillis ) { - nDateTime = 0.0 - (double)(nZO + nDST2) / 60.0 / 24.0; + nDateTime = 0.0 - (double)(nZoneInMillis + nDST2InMillis) / 1000.0 / 60.0 / 60.0 / 24.0; xCal->setDateTime( nDateTime ); } nDaySet = xCal->getValue( i18n::CalendarFieldIndex::DAY_OF_MONTH ); @@ -1423,7 +1433,9 @@ input for the following reasons: nMinuteSet = xCal->getValue( i18n::CalendarFieldIndex::MINUTE ); nSecondSet = xCal->getValue( i18n::CalendarFieldIndex::SECOND ); nZO = xCal->getValue( i18n::CalendarFieldIndex::ZONE_OFFSET ); + nZOmillis = xCal->getValue( i18n::CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS ); nDST = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET ); + nDSTmillis = xCal->getValue( i18n::CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS ); xCal->setValue( i18n::CalendarFieldIndex::DAY_OF_MONTH, nDaySet ); xCal->setValue( i18n::CalendarFieldIndex::MONTH, nMonthSet ); xCal->setValue( i18n::CalendarFieldIndex::YEAR, nYearSet ); @@ -1432,12 +1444,12 @@ input for the following reasons: xCal->setValue( i18n::CalendarFieldIndex::SECOND, nSecondSet ); bValid = xCal->isValid(); nDay = xCal->getValue( i18n::CalendarFieldIndex::DAY_OF_MONTH ); - nMonth = xCal->getValue( i18n::CalendarFieldIndex::MONTH ); + nMyMonth= xCal->getValue( i18n::CalendarFieldIndex::MONTH ); nYear = xCal->getValue( i18n::CalendarFieldIndex::YEAR ); nHour = xCal->getValue( i18n::CalendarFieldIndex::HOUR ); nMinute = xCal->getValue( i18n::CalendarFieldIndex::MINUTE ); nSecond = xCal->getValue( i18n::CalendarFieldIndex::SECOND ); - bValid = bValid && nDay == nDaySet && nMonth == nMonthSet && nYear == + bValid = bValid && nDay == nDaySet && nMyMonth == nMonthSet && nYear == nYearSet && nHour == nHourSet && nMinute == nMinuteSet && nSecond == nSecondSet; } diff --git a/svtools/source/numbers/zforlist.cxx b/svtools/source/numbers/zforlist.cxx index 96a109836169..b76bf3226b50 100644 --- a/svtools/source/numbers/zforlist.cxx +++ b/svtools/source/numbers/zforlist.cxx @@ -2163,15 +2163,31 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO // must be appended, not inserted! USHORT nNewExtended = ZF_STANDARD_NEWEXTENDED; + // Number + uno::Sequence< i18n::NumberFormatCode > aFormatSeq + = aNumberFormatCode.getAllFormatCode( i18n::KNumberFormatUsage::FIXED_NUMBER ); + ImpAdjustFormatCodeDefault( aFormatSeq.getArray(), aFormatSeq.getLength() ); + // General - aFormatCode = pFormatScanner->GetStandardName(); - SvNumberformat* pStdFormat = new SvNumberformat( aFormatCode, - pFormatScanner, pStringScanner, nCheckPos, ActLnge ); - pStdFormat->SetType( NUMBERFORMAT_NUMBER ); - pStdFormat->SetStandard(); - if ( !aFTable.Insert( - CLOffset + SetIndexTable( NF_NUMBER_STANDARD, ZF_STANDARD ), - pStdFormat ) ) + nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_NUMBER_STANDARD ); + SvNumberformat* pStdFormat = ImpInsertFormat( aFormatSeq[nIdx], + CLOffset + SetIndexTable( NF_NUMBER_STANDARD, ZF_STANDARD )); + if (pStdFormat) + { + // This is _the_ standard format. + if (LocaleDataWrapper::areChecksEnabled() && + pStdFormat->GetType() != NUMBERFORMAT_NUMBER) + { + String aMsg( RTL_CONSTASCII_USTRINGPARAM( + "SvNumberFormatter::ImpGenerateFormats: General format not NUMBER")); + LocaleDataWrapper::outputCheckMessage( + xLocaleData->appendLocaleInfo( aMsg)); + } + pStdFormat->SetType( NUMBERFORMAT_NUMBER ); + pStdFormat->SetStandard(); + pStdFormat->SetLastInsertKey( SV_MAX_ANZ_STANDARD_FORMATE ); + } + else { if (LocaleDataWrapper::areChecksEnabled()) { @@ -2180,11 +2196,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg)); } - delete pStdFormat; - pStdFormat = NULL; } - else - pStdFormat->SetLastInsertKey( SV_MAX_ANZ_STANDARD_FORMATE ); // Boolean aFormatCode = pFormatScanner->GetBooleanString(); @@ -2210,11 +2222,6 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO - // Number - uno::Sequence< i18n::NumberFormatCode > aFormatSeq - = aNumberFormatCode.getAllFormatCode( i18n::KNumberFormatUsage::FIXED_NUMBER ); - ImpAdjustFormatCodeDefault( aFormatSeq.getArray(), aFormatSeq.getLength() ); - // 0 nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_NUMBER_INT ); ImpInsertFormat( aFormatSeq[nIdx], diff --git a/svtools/source/numbers/zformat.cxx b/svtools/source/numbers/zformat.cxx index 1054ea8e83e2..0afbf3b4a3f5 100644 --- a/svtools/source/numbers/zformat.cxx +++ b/svtools/source/numbers/zformat.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: zformat.cxx,v $ - * $Revision: 1.78.168.1 $ + * $Revision: 1.78.138.1 $ * * This file is part of OpenOffice.org. * @@ -1816,6 +1816,7 @@ void SvNumberformat::ImpGetOutputStandard(double& fNumber, String& OutString) OutString.GetTokenCount('0') == OutString.Len()) OutString.EraseLeadingChars('-'); // nicht -0 } + ImpTransliterate( OutString, NumFor[0].GetNatNum() ); return; } diff --git a/svtools/source/numbers/zforscan.cxx b/svtools/source/numbers/zforscan.cxx index d9a65a9b5fc6..d6ce04c4da2a 100644 --- a/svtools/source/numbers/zforscan.cxx +++ b/svtools/source/numbers/zforscan.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: zforscan.cxx,v $ - * $Revision: 1.49 $ + * $Revision: 1.49.140.2 $ * * This file is part of OpenOffice.org. * @@ -188,6 +188,50 @@ void ImpSvNumberformatScan::InitKeywords() const } +/** Extract the name of General, Standard, Whatever, ignoring leading modifiers + such as [NatNum1]. */ +static String lcl_extractStandardGeneralName( const ::rtl::OUString & rCode ) +{ + String aStr; + const sal_Unicode* p = rCode.getStr(); + const sal_Unicode* const pStop = p + rCode.getLength(); + const sal_Unicode* pBeg = p; // name begins here + bool bMod = false; + bool bDone = false; + while (p < pStop && !bDone) + { + switch (*p) + { + case '[': + bMod = true; + break; + case ']': + if (bMod) + { + bMod = false; + pBeg = p+1; + } + // else: would be a locale data error, easily to be spotted in + // UI dialog + break; + case ';': + if (!bMod) + { + bDone = true; + --p; // put back, increment by one follows + } + break; + } + ++p; + if (bMod) + pBeg = p; + } + if (pBeg < p) + aStr = rCode.copy( pBeg - rCode.getStr(), p - pBeg); + return aStr; +} + + void ImpSvNumberformatScan::SetDependentKeywords() { using namespace ::com::sun::star; @@ -202,7 +246,7 @@ void ImpSvNumberformatScan::SetDependentKeywords() NumberFormatCodeWrapper aNumberFormatCode( pFormatter->GetServiceManager(), aLoadedLocale ); i18n::NumberFormatCode aFormat = aNumberFormatCode.getFormatCode( NF_NUMBER_STANDARD ); - sNameStandardFormat = aFormat.Code; + sNameStandardFormat = lcl_extractStandardGeneralName( aFormat.Code); sKeyword[NF_KEY_GENERAL] = pCharClass->upper( sNameStandardFormat ); // preset new calendar keywords @@ -328,9 +372,9 @@ void ImpSvNumberformatScan::SetDependentKeywords() case LANGUAGE_FRENCH_MONACO : case LANGUAGE_PORTUGUESE : case LANGUAGE_PORTUGUESE_BRAZILIAN : - case LANGUAGE_SPANISH : - case LANGUAGE_SPANISH_MEXICAN : case LANGUAGE_SPANISH_MODERN : + case LANGUAGE_SPANISH_DATED : + case LANGUAGE_SPANISH_MEXICAN : case LANGUAGE_SPANISH_GUATEMALA : case LANGUAGE_SPANISH_COSTARICA : case LANGUAGE_SPANISH_PANAMA : @@ -1070,6 +1114,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) USHORT i = 0; short eNewType; BOOL bMatchBracket = FALSE; + bool bHaveGeneral = false; // if General/Standard encountered SkipStrings(i, nPos); while (i < nAnzStrings) @@ -1139,6 +1184,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) break; case NF_KEY_GENERAL: // Standard eNewType = NUMBERFORMAT_NUMBER; + bHaveGeneral = true; break; default: eNewType = NUMBERFORMAT_UNDEFINED; @@ -1361,7 +1407,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&) } if ((eScannedType == NUMBERFORMAT_NUMBER || eScannedType == NUMBERFORMAT_UNDEFINED) - && nCurrPos != STRING_NOTFOUND) + && nCurrPos != STRING_NOTFOUND && !bHaveGeneral) eScannedType = NUMBERFORMAT_CURRENCY; // old "automatic" currency if (eScannedType == NUMBERFORMAT_UNDEFINED) eScannedType = NUMBERFORMAT_DEFINED; diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 450b4ccd8074..8c9293e334c1 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -1571,7 +1571,7 @@ const char* ResMgr::GetLang( LanguageType& nType, USHORT nPrio ) case LANGUAGE_PORTUGUESE_BRAZILIAN: return "55"; - case LANGUAGE_SPANISH: + case LANGUAGE_SPANISH_DATED: case LANGUAGE_SPANISH_MEXICAN: case LANGUAGE_SPANISH_MODERN: case LANGUAGE_SPANISH_GUATEMALA: @@ -1623,7 +1623,7 @@ const char* ResMgr::GetLang( LanguageType& nType, USHORT nPrio ) case LANGUAGE_HINDI: return "91"; - case LANGUAGE_ARABIC: + case LANGUAGE_ARABIC_PRIMARY_ONLY: case LANGUAGE_ARABIC_IRAQ: case LANGUAGE_ARABIC_EGYPT: case LANGUAGE_ARABIC_LIBYA: diff --git a/unotools/inc/unotools/calendarwrapper.hxx b/unotools/inc/unotools/calendarwrapper.hxx index ad5a898143e4..c98e0867e8fa 100644 --- a/unotools/inc/unotools/calendarwrapper.hxx +++ b/unotools/inc/unotools/calendarwrapper.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: calendarwrapper.hxx,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.24.1 $ * * This file is part of OpenOffice.org. * @@ -81,6 +81,9 @@ public: void setLocalDateTime( double nTimeInDays ); /// convenience method to get local date/time double getLocalDateTime() const; + + // wrapper implementations of XCalendar + void setValue( sal_Int16 nFieldIndex, sal_Int16 nValue ); sal_Bool isValid() const; sal_Int16 getValue( sal_Int16 nFieldIndex ) const; @@ -95,6 +98,13 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::i18n::CalendarItem > getDays() const; String getDisplayName( sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType ) const; + /** Convenience method to get timezone offset in milliseconds, taking both + fields ZONE_OFFSET and ZONE_OFFSET_SECOND_MILLIS into account. */ + sal_Int32 getZoneOffsetInMillis() const; + /** Convenience method to get DST offset in milliseconds, taking both + fields DST_OFFSET and DST_OFFSET_SECOND_MILLIS into account. */ + sal_Int32 getDSTOffsetInMillis() const; + // wrapper implementations of XExtendedCalendar String getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) const; @@ -114,6 +124,13 @@ public: inline DateTime getGregorianDateTime() const { return aEpochStart + getLocalDateTime(); } +private: + + /** get timezone or DST offset in milliseconds, fields are + CalendarFieldIndex ZONE_OFFSET and ZONE_OFFSET_SECOND_MILLIS + respectively DST_OFFSET and DST_OFFSET_SECOND_MILLIS. + */ + sal_Int32 getCombinedOffsetInMillis( sal_Int16 nParentFieldIndex, sal_Int16 nChildFieldIndex ) const; }; #endif diff --git a/unotools/source/i18n/calendarwrapper.cxx b/unotools/source/i18n/calendarwrapper.cxx index 2c003dc0d620..1d83761b5cea 100644 --- a/unotools/source/i18n/calendarwrapper.cxx +++ b/unotools/source/i18n/calendarwrapper.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: calendarwrapper.cxx,v $ - * $Revision: 1.15 $ + * $Revision: 1.15.24.1 $ * * This file is part of OpenOffice.org. * @@ -51,6 +51,9 @@ using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::uno; +const double MILLISECONDS_PER_DAY = 1000.0 * 60.0 * 60.0 * 24.0; + + CalendarWrapper::CalendarWrapper( const Reference< lang::XMultiServiceFactory > & xSF ) @@ -259,6 +262,50 @@ double CalendarWrapper::getDateTime() const } +sal_Int32 CalendarWrapper::getCombinedOffsetInMillis( + sal_Int16 nParentFieldIndex, sal_Int16 nChildFieldIndex ) const +{ + sal_Int32 nOffset = 0; + try + { + if ( xC.is() ) + { + nOffset = static_cast( xC->getValue( nParentFieldIndex )) * 60000; + sal_Int16 nSecondMillis = xC->getValue( nChildFieldIndex ); + if (nOffset < 0) + nOffset -= static_cast( nSecondMillis); + else + nOffset += static_cast( nSecondMillis); + } + } + catch ( Exception& e ) + { +#ifndef PRODUCT + ByteString aMsg( "setLocalDateTime: Exception caught\n" ); + aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 ); + DBG_ERRORFILE( aMsg.GetBuffer() ); +#else + (void)e; +#endif + } + return nOffset; +} + + +sal_Int32 CalendarWrapper::getZoneOffsetInMillis() const +{ + return getCombinedOffsetInMillis( CalendarFieldIndex::ZONE_OFFSET, + CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS); +} + + +sal_Int32 CalendarWrapper::getDSTOffsetInMillis() const +{ + return getCombinedOffsetInMillis( CalendarFieldIndex::DST_OFFSET, + CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS); +} + + void CalendarWrapper::setLocalDateTime( double nTimeInDays ) { try @@ -270,22 +317,23 @@ void CalendarWrapper::setLocalDateTime( double nTimeInDays ) // OlsonTimeZone transitions. Since ICU incorporates also // historical data even the timezone may differ for different // dates! (Which was the cause for #i76623# when the timezone of a - // previously set date was used.) + // previously set date was used.) Timezone may also include + // seconds, so use milliseconds field as well. xC->setDateTime( nTimeInDays ); - sal_Int16 nZone1 = xC->getValue( CalendarFieldIndex::ZONE_OFFSET ); - sal_Int16 nDST1 = xC->getValue( CalendarFieldIndex::DST_OFFSET ); - double nLoc = nTimeInDays - (double)(nZone1 + nDST1) / 60.0 / 24.0; + sal_Int32 nZone1 = getZoneOffsetInMillis(); + sal_Int32 nDST1 = getDSTOffsetInMillis(); + double nLoc = nTimeInDays - (double)(nZone1 + nDST1) / MILLISECONDS_PER_DAY; xC->setDateTime( nLoc ); - sal_Int16 nZone2 = xC->getValue( CalendarFieldIndex::ZONE_OFFSET ); - sal_Int16 nDST2 = xC->getValue( CalendarFieldIndex::DST_OFFSET ); + sal_Int32 nZone2 = getZoneOffsetInMillis(); + sal_Int32 nDST2 = getDSTOffsetInMillis(); // If DSTs differ after calculation, we crossed boundaries. Do it // again, this time using the DST corrected initial value for the // real local time. // See also localtime/gmtime conversion pitfalls at // http://www.erack.de/download/timetest.c - if ( nZone1 != nZone2 || nDST1 != nDST2 ) + if ( nDST1 != nDST2 ) { - nLoc = nTimeInDays - (double)(nZone2 + nDST2) / 60.0 / 24.0; + nLoc = nTimeInDays - (double)(nZone2 + nDST2) / MILLISECONDS_PER_DAY; xC->setDateTime( nLoc ); // #i17222# If the DST onset rule says to switch from 00:00 to // 01:00 and we tried to set onsetDay 00:00 with DST, the @@ -293,10 +341,10 @@ void CalendarWrapper::setLocalDateTime( double nTimeInDays ) // want. So once again without DST, resulting in onsetDay // 01:00 and DST. Yes, this seems to be weird, but logically // correct. - sal_Int16 nDST3 = xC->getValue( CalendarFieldIndex::DST_OFFSET ); + sal_Int32 nDST3 = getDSTOffsetInMillis(); if ( nDST2 != nDST3 && !nDST3 ) { - nLoc = nTimeInDays - (double)(nZone2 + nDST3) / 60.0 / 24.0; + nLoc = nTimeInDays - (double)(nZone2 + nDST3) / MILLISECONDS_PER_DAY; xC->setDateTime( nLoc ); } } @@ -322,11 +370,9 @@ double CalendarWrapper::getLocalDateTime() const if ( xC.is() ) { double nTimeInDays = xC->getDateTime(); - sal_Int16 nZone = xC->getValue( - com::sun::star::i18n::CalendarFieldIndex::ZONE_OFFSET ); - sal_Int16 nDST = xC->getValue( - com::sun::star::i18n::CalendarFieldIndex::DST_OFFSET ); - nTimeInDays += (double)(nZone + nDST) / 60.0 / 24.0; + sal_Int32 nZone = getZoneOffsetInMillis(); + sal_Int32 nDST = getDSTOffsetInMillis(); + nTimeInDays += (double)(nZone + nDST) / MILLISECONDS_PER_DAY; return nTimeInDays; } } diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 8fd0acfc3644..bfe0751545c7 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -1883,6 +1883,7 @@ void ImplDevFontList::InitGenericGlyphFallback( void ) const "khmerossystem", "", "muktinarrow", "", "phetsarathot", "", + "padauk", "pinlonmyanmar", "", 0 }; diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 9dd0bfdc0197..11c0c94435bb 100755 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: sallayout.cxx,v $ - * $Revision: 1.94 $ + * $Revision: 1.94.90.2 $ * * This file is part of OpenOffice.org. * @@ -243,97 +243,86 @@ sal_UCS4 GetLocalizedChar( sal_UCS4 nChar, LanguageType eLang ) return nChar; int nOffset; - switch( eLang ) + // eLang & LANGUAGE_MASK_PRIMARY catches language independent of region. + // CAVEAT! To some like Mongolian MS assigned the same primary language + // although the script type is different! + switch( eLang & LANGUAGE_MASK_PRIMARY ) { default: nOffset = 0; break; - case LANGUAGE_ARABIC: - case LANGUAGE_ARABIC_SAUDI_ARABIA: - case LANGUAGE_ARABIC_IRAQ: - case LANGUAGE_ARABIC_EGYPT: - case LANGUAGE_ARABIC_LIBYA: - case LANGUAGE_ARABIC_ALGERIA: - case LANGUAGE_ARABIC_MOROCCO: - case LANGUAGE_ARABIC_TUNISIA: - case LANGUAGE_ARABIC_OMAN: - case LANGUAGE_ARABIC_YEMEN: - case LANGUAGE_ARABIC_SYRIA: - case LANGUAGE_ARABIC_JORDAN: - case LANGUAGE_ARABIC_LEBANON: - case LANGUAGE_ARABIC_KUWAIT: - case LANGUAGE_ARABIC_UAE: - case LANGUAGE_ARABIC_BAHRAIN: - case LANGUAGE_ARABIC_QATAR: - case LANGUAGE_URDU: - case LANGUAGE_URDU_PAKISTAN: - case LANGUAGE_URDU_INDIA: - case LANGUAGE_PUNJABI: //??? - nOffset = 0x0660 - '0'; // arabic/persian/urdu + case LANGUAGE_ARABIC_SAUDI_ARABIA & LANGUAGE_MASK_PRIMARY: + nOffset = 0x0660 - '0'; // arabic-indic digits break; - case LANGUAGE_BENGALI: + case LANGUAGE_URDU & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_PUNJABI & LANGUAGE_MASK_PRIMARY: //??? + case LANGUAGE_SINDHI & LANGUAGE_MASK_PRIMARY: + nOffset = 0x06F0 - '0'; // eastern arabic-indic digits + break; + case LANGUAGE_BENGALI & LANGUAGE_MASK_PRIMARY: nOffset = 0x09E6 - '0'; // bengali break; - case LANGUAGE_HINDI: + case LANGUAGE_HINDI & LANGUAGE_MASK_PRIMARY: nOffset = 0x0966 - '0'; // devanagari break; - #if 0 + case LANGUAGE_AMHARIC_ETHIOPIA & LANGUAGE_MASK_PRIMARY: + case LANGUAGE_TIGRIGNA_ETHIOPIA & LANGUAGE_MASK_PRIMARY: // TODO case: nOffset = 0x1369 - '0'; // ethiopic break; - #endif - case LANGUAGE_GUJARATI: + case LANGUAGE_GUJARATI & LANGUAGE_MASK_PRIMARY: nOffset = 0x0AE6 - '0'; // gujarati break; - #if 0 - // TODO case: +#ifdef LANGUAGE_GURMUKHI // TODO case: + case LANGUAGE_GURMUKHI & LANGUAGE_MASK_PRIMARY: nOffset = 0x0A66 - '0'; // gurmukhi break; - #endif - case LANGUAGE_KANNADA: +#endif + case LANGUAGE_KANNADA & LANGUAGE_MASK_PRIMARY: nOffset = 0x0CE6 - '0'; // kannada break; - case LANGUAGE_KHMER: + case LANGUAGE_KHMER & LANGUAGE_MASK_PRIMARY: nOffset = 0x17E0 - '0'; // khmer break; - case LANGUAGE_LAO: + case LANGUAGE_LAO & LANGUAGE_MASK_PRIMARY: nOffset = 0x0ED0 - '0'; // lao break; - case LANGUAGE_MALAYALAM: - nOffset = 0x0D66 - '0'; // malayalam + case LANGUAGE_MALAYALAM & LANGUAGE_MASK_PRIMARY: + nOffset = 0x0D66 - '0'; // malayalam break; - case LANGUAGE_MONGOLIAN: - nOffset = 0x1810 - '0'; // mongolian + case LANGUAGE_MONGOLIAN & LANGUAGE_MASK_PRIMARY: + if (eLang == LANGUAGE_MONGOLIAN_MONGOLIAN) + nOffset = 0x1810 - '0'; // mongolian + else + nOffset = 0; // mongolian cyrillic break; - #if 0 - // TODO case: - nOffset = 0x1040 - '0'; // myanmar + case LANGUAGE_BURMESE & LANGUAGE_MASK_PRIMARY: + nOffset = 0x1040 - '0'; // myanmar break; - #endif - case LANGUAGE_ORIYA: - nOffset = 0x0B66 - '0'; // oriya + case LANGUAGE_ORIYA & LANGUAGE_MASK_PRIMARY: + nOffset = 0x0B66 - '0'; // oriya break; - case LANGUAGE_TAMIL: - nOffset = 0x0BE7 - '0'; // tamil + case LANGUAGE_TAMIL & LANGUAGE_MASK_PRIMARY: + nOffset = 0x0BE7 - '0'; // tamil break; - case LANGUAGE_TELUGU: - nOffset = 0x0C66 - '0'; // telugu + case LANGUAGE_TELUGU & LANGUAGE_MASK_PRIMARY: + nOffset = 0x0C66 - '0'; // telugu break; - case LANGUAGE_THAI: - nOffset = 0x0E50 - '0'; // thai + case LANGUAGE_THAI & LANGUAGE_MASK_PRIMARY: + nOffset = 0x0E50 - '0'; // thai break; - case LANGUAGE_TIBETAN: - nOffset = 0x0F20 - '0'; // tibetan + case LANGUAGE_TIBETAN & LANGUAGE_MASK_PRIMARY: + nOffset = 0x0F20 - '0'; // tibetan break; #if 0 // TODO: use language type for these digit substitutions? // TODO case: - nOffset = 0x2776 - '0'; // dingbat circled + nOffset = 0x2776 - '0'; // dingbat circled break; // TODO case: - nOffset = 0x2070 - '0'; // superscript + nOffset = 0x2070 - '0'; // superscript break; // TODO case: - nOffset = 0x2080 - '0'; // subscript + nOffset = 0x2080 - '0'; // subscript break; #endif }