1*ca5ec200SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*ca5ec200SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*ca5ec200SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*ca5ec200SAndrew Rist * distributed with this work for additional information 6*ca5ec200SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*ca5ec200SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*ca5ec200SAndrew Rist * "License"); you may not use this file except in compliance 9*ca5ec200SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*ca5ec200SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*ca5ec200SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*ca5ec200SAndrew Rist * software distributed under the License is distributed on an 15*ca5ec200SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*ca5ec200SAndrew Rist * KIND, either express or implied. See the License for the 17*ca5ec200SAndrew Rist * specific language governing permissions and limitations 18*ca5ec200SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*ca5ec200SAndrew Rist *************************************************************/ 21*ca5ec200SAndrew Rist 22*ca5ec200SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include "oox/xls/numberformatsbuffer.hxx" 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp> 27cdf0e10cSrcweir #include <com/sun/star/i18n/NumberFormatIndex.hpp> 28cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp> 29cdf0e10cSrcweir #include <com/sun/star/util/XNumberFormatTypes.hpp> 30cdf0e10cSrcweir #include <com/sun/star/util/XNumberFormats.hpp> 31cdf0e10cSrcweir #include <com/sun/star/util/XNumberFormatsSupplier.hpp> 32cdf0e10cSrcweir #include <rtl/strbuf.hxx> 33cdf0e10cSrcweir #include <rtl/string.hxx> 34cdf0e10cSrcweir #include <osl/thread.h> 35cdf0e10cSrcweir #include <rtl/ustrbuf.hxx> 36cdf0e10cSrcweir #include "oox/core/filterbase.hxx" 37cdf0e10cSrcweir #include "oox/helper/attributelist.hxx" 38cdf0e10cSrcweir #include "oox/helper/propertymap.hxx" 39cdf0e10cSrcweir #include "oox/xls/biffinputstream.hxx" 40cdf0e10cSrcweir 41cdf0e10cSrcweir namespace oox { 42cdf0e10cSrcweir namespace xls { 43cdf0e10cSrcweir 44cdf0e10cSrcweir // ============================================================================ 45cdf0e10cSrcweir 46cdf0e10cSrcweir using namespace ::com::sun::star::container; 47cdf0e10cSrcweir using namespace ::com::sun::star::lang; 48cdf0e10cSrcweir using namespace ::com::sun::star::uno; 49cdf0e10cSrcweir using namespace ::com::sun::star::util; 50cdf0e10cSrcweir 51cdf0e10cSrcweir using ::rtl::OString; 52cdf0e10cSrcweir using ::rtl::OStringBuffer; 53cdf0e10cSrcweir using ::rtl::OStringToOUString; 54cdf0e10cSrcweir using ::rtl::OUString; 55cdf0e10cSrcweir using ::rtl::OUStringBuffer; 56cdf0e10cSrcweir 57cdf0e10cSrcweir // ============================================================================ 58cdf0e10cSrcweir 59cdf0e10cSrcweir namespace { 60cdf0e10cSrcweir 61cdf0e10cSrcweir /** Stores the number format used in Calc for an Excel built-in number format. */ 62cdf0e10cSrcweir struct BuiltinFormat 63cdf0e10cSrcweir { 64cdf0e10cSrcweir sal_Int32 mnNumFmtId; /// Built-in number format index. 65cdf0e10cSrcweir const sal_Char* mpcFmtCode; /// Format string, UTF-8, may be 0 (mnPredefId is used then). 66cdf0e10cSrcweir sal_Int16 mnPredefId; /// Predefined format index, if mpcFmtCode is 0. 67cdf0e10cSrcweir sal_Int32 mnReuseId; /// Use this format, if mpcFmtCode is 0 and mnPredefId is -1. 68cdf0e10cSrcweir }; 69cdf0e10cSrcweir 70cdf0e10cSrcweir /** Defines a literal built-in number format. */ 71cdf0e10cSrcweir #define NUMFMT_STRING( INDEX, FORMATCODE ) \ 72cdf0e10cSrcweir { INDEX, FORMATCODE, -1, -1 } 73cdf0e10cSrcweir 74cdf0e10cSrcweir /** Defines a built-in number format that maps to an own predefined format. */ 75cdf0e10cSrcweir #define NUMFMT_PREDEF( INDEX, PREDEFINED ) \ 76cdf0e10cSrcweir { INDEX, 0, ::com::sun::star::i18n::NumberFormatIndex::PREDEFINED, -1 } 77cdf0e10cSrcweir 78cdf0e10cSrcweir /** Defines a built-in number format that is the same as the specified in nReuseId. */ 79cdf0e10cSrcweir #define NUMFMT_REUSE( INDEX, REUSED_INDEX ) \ 80cdf0e10cSrcweir { INDEX, 0, -1, REUSED_INDEX } 81cdf0e10cSrcweir 82cdf0e10cSrcweir /** Terminates a built-in number format table. */ 83cdf0e10cSrcweir #define NUMFMT_ENDTABLE() \ 84cdf0e10cSrcweir { -1, 0, -1, -1 } 85cdf0e10cSrcweir 86cdf0e10cSrcweir /** Defines builtin date and time formats 14...22. 87cdf0e10cSrcweir @param SYSTEMDATE Complete short system date (for formats 14 and 22). 88cdf0e10cSrcweir @param DAY Day format (for formats 15 and 16). 89cdf0e10cSrcweir @param DAYSEP Separator between day and month (for formats 15 and 16). 90cdf0e10cSrcweir @param MONTH Month format (for formats 15...17). 91cdf0e10cSrcweir @param MONTHSEP Separator between month and year (for formats 15 and 17). 92cdf0e10cSrcweir @param YEAR Year format (for formats 15 and 17). 93cdf0e10cSrcweir @param HOUR12 Hour format for 12-hour AM/PM formats (formats 18 and 19). 94cdf0e10cSrcweir @param HOUR24 Hour format for 24-hour formats (formats 20...22). */ 95cdf0e10cSrcweir #define NUMFMT_ALLDATETIMES( SYSTEMDATE, DAY, DAYSEP, MONTH, MONTHSEP, YEAR, HOUR12, HOUR24 ) \ 96cdf0e10cSrcweir NUMFMT_STRING( 14, SYSTEMDATE ), \ 97cdf0e10cSrcweir NUMFMT_STRING( 15, DAY DAYSEP MONTH MONTHSEP YEAR ), \ 98cdf0e10cSrcweir NUMFMT_STRING( 16, DAY DAYSEP MONTH ), \ 99cdf0e10cSrcweir NUMFMT_STRING( 17, MONTH MONTHSEP YEAR ), \ 100cdf0e10cSrcweir NUMFMT_STRING( 18, HOUR12 ":mm AM/PM" ), \ 101cdf0e10cSrcweir NUMFMT_STRING( 19, HOUR12 ":mm:ss AM/PM" ), \ 102cdf0e10cSrcweir NUMFMT_STRING( 20, HOUR24 ":mm" ), \ 103cdf0e10cSrcweir NUMFMT_STRING( 21, HOUR24 ":mm:ss" ), \ 104cdf0e10cSrcweir NUMFMT_STRING( 22, SYSTEMDATE " " HOUR24 ":mm" ) 105cdf0e10cSrcweir 106cdf0e10cSrcweir /** Defines builtin time formats INDEX and INDEX+1 for CJK locales. 107cdf0e10cSrcweir @param INDEX First number format index. 108cdf0e10cSrcweir @param HOURFORMAT Hour format. 109cdf0e10cSrcweir @param HOUR Hour symbol. 110cdf0e10cSrcweir @param MINUTE Minute symbol. 111cdf0e10cSrcweir @param SECOND Second symbol. */ 112cdf0e10cSrcweir #define NUMFMT_TIME_CJK( INDEX, HOURFORMAT, HOUR, MINUTE, SECOND ) \ 113cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, HOURFORMAT "\"" HOUR "\"mm\"" MINUTE "\"" ), \ 114cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, HOURFORMAT "\"" HOUR "\"mm\"" MINUTE "\"ss\"" SECOND "\"" ) 115cdf0e10cSrcweir 116cdf0e10cSrcweir /** Defines builtin time formats 32...35 for CJK locales. 117cdf0e10cSrcweir @param HOUR12 Hour format for 12-hour AM/PM formats (formats 34 and 35). 118cdf0e10cSrcweir @param HOUR24 Hour format for 24-hour formats (formats 32 and 33). 119cdf0e10cSrcweir @param HOUR Hour symbol. 120cdf0e10cSrcweir @param MINUTE Minute symbol. 121cdf0e10cSrcweir @param SECOND Second symbol. */ 122cdf0e10cSrcweir #define NUMFMT_ALLTIMES_CJK( HOUR12, HOUR24, HOUR, MINUTE, SECOND ) \ 123cdf0e10cSrcweir NUMFMT_TIME_CJK( 32, HOUR24, HOUR, MINUTE, SECOND ), \ 124cdf0e10cSrcweir NUMFMT_TIME_CJK( 34, "AM/PM" HOUR12, HOUR, MINUTE, SECOND ) 125cdf0e10cSrcweir 126cdf0e10cSrcweir /** Defines builtin currency formats INDEX...INDEX+3 in the following format: 127cdf0e10cSrcweir "symbol, [minus], number". 128cdf0e10cSrcweir @param INDEX First number format index. 129cdf0e10cSrcweir @param SYMBOL Currency symbol. 130cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. 131cdf0e10cSrcweir @param MODIF Leading modifier for each portion (e.g. "t" for Thai formats). */ 132cdf0e10cSrcweir #define NUMFMT_CURRENCY_SYMBOL_MINUS_NUMBER( INDEX, SYMBOL, SPACE, MODIF ) \ 133cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, MODIF SYMBOL SPACE "#,##0;" MODIF SYMBOL SPACE "-#,##0" ), \ 134cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, MODIF SYMBOL SPACE "#,##0;" "[RED]" MODIF SYMBOL SPACE "-#,##0" ), \ 135cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, MODIF SYMBOL SPACE "#,##0.00;" MODIF SYMBOL SPACE "-#,##0.00" ), \ 136cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, MODIF SYMBOL SPACE "#,##0.00;" "[RED]" MODIF SYMBOL SPACE "-#,##0.00" ) 137cdf0e10cSrcweir 138cdf0e10cSrcweir /** Defines builtin accounting formats INDEX...INDEX+3 in the following format: 139cdf0e10cSrcweir "symbol, [minus], number". 140cdf0e10cSrcweir @param INDEX First number format index. 141cdf0e10cSrcweir @param SYMBOL Currency symbol. 142cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. */ 143cdf0e10cSrcweir #define NUMFMT_ACCOUNTING_SYMBOL_MINUS_NUMBER( INDEX, SYMBOL, SPACE ) \ 144cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, "_ " "* #,##0_ ;" "_ " "* -#,##0_ ;" "_ " "* \"-\"_ ;" "_ @_ " ), \ 145cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, "_ " SYMBOL SPACE "* #,##0_ ;" "_ " SYMBOL SPACE "* -#,##0_ ;" "_ " SYMBOL SPACE "* \"-\"_ ;" "_ @_ " ), \ 146cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, "_ " "* #,##0.00_ ;" "_ " "* -#,##0.00_ ;" "_ " "* \"-\"?\?_ ;" "_ @_ " ), \ 147cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, "_ " SYMBOL SPACE "* #,##0.00_ ;" "_ " SYMBOL SPACE "* -#,##0.00_ ;" "_ " SYMBOL SPACE "* \"-\"?\?_ ;" "_ @_ " ) 148cdf0e10cSrcweir 149cdf0e10cSrcweir /** Defines builtin currency formats 5...8 (with currency symbol), 37...40 150cdf0e10cSrcweir (blind currency symbol), and 41...44 (accounting), in the following format: 151cdf0e10cSrcweir "symbol, [minus], number". 152cdf0e10cSrcweir @param SYMBOL Currency symbol. 153cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. */ 154cdf0e10cSrcweir #define NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( SYMBOL, SPACE ) \ 155cdf0e10cSrcweir NUMFMT_CURRENCY_SYMBOL_MINUS_NUMBER( 5, SYMBOL, SPACE, "" ), \ 156cdf0e10cSrcweir NUMFMT_CURRENCY_SYMBOL_MINUS_NUMBER( 37, "", "", "" ), \ 157cdf0e10cSrcweir NUMFMT_ACCOUNTING_SYMBOL_MINUS_NUMBER( 41, SYMBOL, SPACE ) 158cdf0e10cSrcweir 159cdf0e10cSrcweir /** Defines builtin currency formats INDEX...INDEX+3 in the following format: 160cdf0e10cSrcweir "symbol, number, [minus]". 161cdf0e10cSrcweir @param INDEX First number format index. 162cdf0e10cSrcweir @param SYMBOL Currency symbol. 163cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. 164cdf0e10cSrcweir @param MODIF Leading modifier for each portion (e.g. "t" for Thai formats). */ 165cdf0e10cSrcweir #define NUMFMT_CURRENCY_SYMBOL_NUMBER_MINUS( INDEX, SYMBOL, SPACE, MODIF ) \ 166cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, MODIF SYMBOL SPACE "#,##0_-;" MODIF SYMBOL SPACE "#,##0-" ), \ 167cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, MODIF SYMBOL SPACE "#,##0_-;" "[RED]" MODIF SYMBOL SPACE "#,##0-" ), \ 168cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, MODIF SYMBOL SPACE "#,##0.00_-;" MODIF SYMBOL SPACE "#,##0.00-" ), \ 169cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, MODIF SYMBOL SPACE "#,##0.00_-;" "[RED]" MODIF SYMBOL SPACE "#,##0.00-" ) 170cdf0e10cSrcweir 171cdf0e10cSrcweir /** Defines builtin accounting formats INDEX...INDEX+3 in the following format: 172cdf0e10cSrcweir "symbol, number, [minus]". 173cdf0e10cSrcweir @param INDEX First number format index. 174cdf0e10cSrcweir @param SYMBOL Currency symbol. 175cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. */ 176cdf0e10cSrcweir #define NUMFMT_ACCOUNTING_SYMBOL_NUMBER_MINUS( INDEX, SYMBOL, SPACE ) \ 177cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, "_-" "* #,##0_-;" "_-" "* #,##0-;" "_-" "* \"-\"_-;" "_-@_-" ), \ 178cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, "_-" SYMBOL SPACE "* #,##0_-;" "_-" SYMBOL SPACE "* #,##0-;" "_-" SYMBOL SPACE "* \"-\"_-;" "_-@_-" ), \ 179cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, "_-" "* #,##0.00_-;" "_-" "* #,##0.00-;" "_-" "* \"-\"?\?_-;" "_-@_-" ), \ 180cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, "_-" SYMBOL SPACE "* #,##0.00_-;" "_-" SYMBOL SPACE "* #,##0.00-;" "_-" SYMBOL SPACE "* \"-\"?\?_-;" "_-@_-" ) 181cdf0e10cSrcweir 182cdf0e10cSrcweir /** Defines builtin currency formats 5...8 (with currency symbol), 37...40 183cdf0e10cSrcweir (blind currency symbol), and 41...44 (accounting), in the following format: 184cdf0e10cSrcweir "symbol, number, [minus]". 185cdf0e10cSrcweir @param SYMBOL Currency symbol. 186cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. */ 187cdf0e10cSrcweir #define NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( SYMBOL, SPACE ) \ 188cdf0e10cSrcweir NUMFMT_CURRENCY_SYMBOL_NUMBER_MINUS( 5, SYMBOL, SPACE, "" ), \ 189cdf0e10cSrcweir NUMFMT_CURRENCY_SYMBOL_NUMBER_MINUS( 37, "", "", "" ), \ 190cdf0e10cSrcweir NUMFMT_ACCOUNTING_SYMBOL_NUMBER_MINUS( 41, SYMBOL, SPACE ) 191cdf0e10cSrcweir 192cdf0e10cSrcweir /** Defines builtin currency formats INDEX...INDEX+3 in the following format: 193cdf0e10cSrcweir "number, symbol, [minus]". 194cdf0e10cSrcweir @param INDEX First number format index. 195cdf0e10cSrcweir @param SYMBOL Currency symbol. 196cdf0e10cSrcweir @param SPACE Space character(s) between number and currency symbol. 197cdf0e10cSrcweir @param MODIF Leading modifier for each portion (e.g. "t" for Thai formats). */ 198cdf0e10cSrcweir #define NUMFMT_CURRENCY_NUMBER_SYMBOL_MINUS( INDEX, SYMBOL, SPACE, MODIF ) \ 199cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, MODIF "#,##0" SPACE SYMBOL "_-;" MODIF "#,##0" SPACE SYMBOL "-" ), \ 200cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, MODIF "#,##0" SPACE SYMBOL "_-;" "[RED]" MODIF "#,##0" SPACE SYMBOL "-" ), \ 201cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, MODIF "#,##0.00" SPACE SYMBOL "_-;" MODIF "#,##0.00" SPACE SYMBOL "-" ), \ 202cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, MODIF "#,##0.00" SPACE SYMBOL "_-;" "[RED]" MODIF "#,##0.00" SPACE SYMBOL "-" ) 203cdf0e10cSrcweir 204cdf0e10cSrcweir /** Defines builtin accounting formats INDEX...INDEX+3 in the following format: 205cdf0e10cSrcweir "number, symbol, [minus]". 206cdf0e10cSrcweir @param INDEX First number format index. 207cdf0e10cSrcweir @param SYMBOL Currency symbol. 208cdf0e10cSrcweir @param BLINDS Blind currency symbol. 209cdf0e10cSrcweir @param SPACE Space character(s) between number and currency symbol. */ 210cdf0e10cSrcweir #define NUMFMT_ACCOUNTING_NUMBER_SYMBOL_MINUS( INDEX, SYMBOL, BLINDS, SPACE ) \ 211cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, "_-* #,##0" SPACE BLINDS "_-;_-* #,##0" SPACE BLINDS "-;_-* \"-\"" SPACE BLINDS "_-;_-@_-" ), \ 212cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, "_-* #,##0" SPACE SYMBOL "_-;_-* #,##0" SPACE SYMBOL "-;_-* \"-\"" SPACE SYMBOL "_-;_-@_-" ), \ 213cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, "_-* #,##0.00" SPACE BLINDS "_-;_-* #,##0.00" SPACE BLINDS "-;_-* \"-\"?\?" SPACE BLINDS "_-;_-@_-" ), \ 214cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, "_-* #,##0.00" SPACE SYMBOL "_-;_-* #,##0.00" SPACE SYMBOL "-;_-* \"-\"?\?" SPACE SYMBOL "_-;_-@_-" ) 215cdf0e10cSrcweir 216cdf0e10cSrcweir /** Defines builtin currency formats 5...8 (with currency symbol), 37...40 217cdf0e10cSrcweir (blind currency symbol), and 41...44 (accounting), in the following format: 218cdf0e10cSrcweir "number, symbol, [minus]". 219cdf0e10cSrcweir @param SYMBOL Currency symbol. 220cdf0e10cSrcweir @param BLINDS Blind currency symbol. 221cdf0e10cSrcweir @param SPACE Space character(s) between number and currency symbol. */ 222cdf0e10cSrcweir #define NUMFMT_ALLCURRENCIES_NUMBER_SYMBOL_MINUS( SYMBOL, BLINDS, SPACE ) \ 223cdf0e10cSrcweir NUMFMT_CURRENCY_NUMBER_SYMBOL_MINUS( 5, SYMBOL, SPACE, "" ), \ 224cdf0e10cSrcweir NUMFMT_CURRENCY_NUMBER_SYMBOL_MINUS( 37, BLINDS, SPACE, "" ), \ 225cdf0e10cSrcweir NUMFMT_ACCOUNTING_NUMBER_SYMBOL_MINUS( 41, SYMBOL, BLINDS, SPACE ) 226cdf0e10cSrcweir 227cdf0e10cSrcweir /** Defines builtin currency formats INDEX...INDEX+3 in the following format: 228cdf0e10cSrcweir "[minus], symbol, number". 229cdf0e10cSrcweir @param INDEX First number format index. 230cdf0e10cSrcweir @param SYMBOL Currency symbol. 231cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. 232cdf0e10cSrcweir @param MODIF Leading modifier for each portion (e.g. "t" for Thai formats). */ 233cdf0e10cSrcweir #define NUMFMT_CURRENCY_MINUS_SYMBOL_NUMBER( INDEX, SYMBOL, SPACE, MODIF ) \ 234cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, MODIF SYMBOL SPACE "#,##0;" MODIF "-" SYMBOL SPACE "#,##0" ), \ 235cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, MODIF SYMBOL SPACE "#,##0;" "[RED]" MODIF "-" SYMBOL SPACE "#,##0" ), \ 236cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, MODIF SYMBOL SPACE "#,##0.00;" MODIF "-" SYMBOL SPACE "#,##0.00" ), \ 237cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, MODIF SYMBOL SPACE "#,##0.00;" "[RED]" MODIF "-" SYMBOL SPACE "#,##0.00" ) 238cdf0e10cSrcweir 239cdf0e10cSrcweir /** Defines builtin accounting formats INDEX...INDEX+3 in the following order: 240cdf0e10cSrcweir "[minus], symbol, number". 241cdf0e10cSrcweir @param INDEX First number format index. 242cdf0e10cSrcweir @param SYMBOL Currency symbol. 243cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. */ 244cdf0e10cSrcweir #define NUMFMT_ACCOUNTING_MINUS_SYMBOL_NUMBER( INDEX, SYMBOL, SPACE ) \ 245cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, "_-" "* #,##0_-;" "-" "* #,##0_-;" "_-" "* \"-\"_-;" "_-@_-" ), \ 246cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, "_-" SYMBOL SPACE "* #,##0_-;" "-" SYMBOL SPACE "* #,##0_-;" "_-" SYMBOL SPACE "* \"-\"_-;" "_-@_-" ), \ 247cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, "_-" "* #,##0.00_-;" "-" "* #,##0.00_-;" "_-" "* \"-\"?\?_-;" "_-@_-" ), \ 248cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, "_-" SYMBOL SPACE "* #,##0.00_-;" "-" SYMBOL SPACE "* #,##0.00_-;" "_-" SYMBOL SPACE "* \"-\"?\?_-;" "_-@_-" ) 249cdf0e10cSrcweir 250cdf0e10cSrcweir /** Defines builtin currency formats 5...8 (with currency symbol), 37...40 251cdf0e10cSrcweir (blind currency symbol), and 41...44 (accounting), in the following order: 252cdf0e10cSrcweir "[minus], symbol, number". 253cdf0e10cSrcweir @param SYMBOL Currency symbol. 254cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. */ 255cdf0e10cSrcweir #define NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( SYMBOL, SPACE ) \ 256cdf0e10cSrcweir NUMFMT_CURRENCY_MINUS_SYMBOL_NUMBER( 5, SYMBOL, SPACE, "" ), \ 257cdf0e10cSrcweir NUMFMT_CURRENCY_MINUS_SYMBOL_NUMBER( 37, "", "", "" ), \ 258cdf0e10cSrcweir NUMFMT_ACCOUNTING_MINUS_SYMBOL_NUMBER( 41, SYMBOL, SPACE ) 259cdf0e10cSrcweir 260cdf0e10cSrcweir /** Defines builtin currency formats INDEX...INDEX+3 in the following format: 261cdf0e10cSrcweir "[minus], number, symbol". 262cdf0e10cSrcweir @param INDEX First number format index. 263cdf0e10cSrcweir @param SYMBOL Currency symbol. 264cdf0e10cSrcweir @param SPACE Space character(s) between number and currency symbol. 265cdf0e10cSrcweir @param MODIF Leading modifier for each portion (e.g. "t" for Thai formats). */ 266cdf0e10cSrcweir #define NUMFMT_CURRENCY_MINUS_NUMBER_SYMBOL( INDEX, SYMBOL, SPACE, MODIF ) \ 267cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, MODIF "#,##0" SPACE SYMBOL ";" MODIF "-#,##0" SPACE SYMBOL ), \ 268cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, MODIF "#,##0" SPACE SYMBOL ";" "[RED]" MODIF "-#,##0" SPACE SYMBOL ), \ 269cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, MODIF "#,##0.00" SPACE SYMBOL ";" MODIF "-#,##0.00" SPACE SYMBOL ), \ 270cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, MODIF "#,##0.00" SPACE SYMBOL ";" "[RED]" MODIF "-#,##0.00" SPACE SYMBOL ) 271cdf0e10cSrcweir 272cdf0e10cSrcweir /** Defines builtin accounting formats INDEX...INDEX+3 in the following format: 273cdf0e10cSrcweir "[minus], number, symbol". 274cdf0e10cSrcweir @param INDEX First number format index. 275cdf0e10cSrcweir @param SYMBOL Currency symbol. 276cdf0e10cSrcweir @param BLINDS Blind currency symbol. 277cdf0e10cSrcweir @param SPACE Space character(s) between number and currency symbol. */ 278cdf0e10cSrcweir #define NUMFMT_ACCOUNTING_MINUS_NUMBER_SYMBOL( INDEX, SYMBOL, BLINDS, SPACE ) \ 279cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, "_-* #,##0" SPACE BLINDS "_-;-* #,##0" SPACE BLINDS "_-;_-* \"-\"" SPACE BLINDS "_-;_-@_-" ), \ 280cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, "_-* #,##0" SPACE SYMBOL "_-;-* #,##0" SPACE SYMBOL "_-;_-* \"-\"" SPACE SYMBOL "_-;_-@_-" ), \ 281cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, "_-* #,##0.00" SPACE BLINDS "_-;-* #,##0.00" SPACE BLINDS "_-;_-* \"-\"?\?" SPACE BLINDS "_-;_-@_-" ), \ 282cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, "_-* #,##0.00" SPACE SYMBOL "_-;-* #,##0.00" SPACE SYMBOL "_-;_-* \"-\"?\?" SPACE SYMBOL "_-;_-@_-" ) 283cdf0e10cSrcweir 284cdf0e10cSrcweir /** Defines builtin currency formats 5...8 (with currency symbol), 37...40 285cdf0e10cSrcweir (blind currency symbol), and 41...44 (accounting), in the following format: 286cdf0e10cSrcweir "[minus], number, symbol". 287cdf0e10cSrcweir @param SYMBOL Currency symbol. 288cdf0e10cSrcweir @param BLINDS Blind currency symbol. 289cdf0e10cSrcweir @param SPACE Space character(s) between number and currency symbol. */ 290cdf0e10cSrcweir #define NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( SYMBOL, BLINDS, SPACE ) \ 291cdf0e10cSrcweir NUMFMT_CURRENCY_MINUS_NUMBER_SYMBOL( 5, SYMBOL, SPACE, "" ), \ 292cdf0e10cSrcweir NUMFMT_CURRENCY_MINUS_NUMBER_SYMBOL( 37, BLINDS, SPACE, "" ), \ 293cdf0e10cSrcweir NUMFMT_ACCOUNTING_MINUS_NUMBER_SYMBOL( 41, SYMBOL, BLINDS, SPACE ) 294cdf0e10cSrcweir 295cdf0e10cSrcweir /** Defines builtin currency formats INDEX...INDEX+3 in the following format: 296cdf0e10cSrcweir "[opening parenthesis], symbol, number, [closing parenthesis].". 297cdf0e10cSrcweir @param INDEX First number format index. 298cdf0e10cSrcweir @param SYMBOL Currency symbol. 299cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. 300cdf0e10cSrcweir @param MODIF Leading modifier for each portion (e.g. "t" for Thai formats). */ 301cdf0e10cSrcweir #define NUMFMT_CURRENCY_OPEN_SYMBOL_NUMBER_CLOSE( INDEX, SYMBOL, SPACE, MODIF ) \ 302cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, MODIF SYMBOL SPACE "#,##0_);" MODIF "(" SYMBOL SPACE "#,##0)" ), \ 303cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, MODIF SYMBOL SPACE "#,##0_);" "[RED]" MODIF "(" SYMBOL SPACE "#,##0)" ), \ 304cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, MODIF SYMBOL SPACE "#,##0.00_);" MODIF "(" SYMBOL SPACE "#,##0.00)" ), \ 305cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, MODIF SYMBOL SPACE "#,##0.00_);" "[RED]" MODIF "(" SYMBOL SPACE "#,##0.00)" ) 306cdf0e10cSrcweir 307cdf0e10cSrcweir /** Defines builtin accounting formats INDEX...INDEX+3 in the following format: 308cdf0e10cSrcweir "[opening parenthesis], symbol, number, [closing parenthesis].". 309cdf0e10cSrcweir @param INDEX First number format index. 310cdf0e10cSrcweir @param SYMBOL Currency symbol. 311cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. */ 312cdf0e10cSrcweir #define NUMFMT_ACCOUNTING_OPEN_SYMBOL_NUMBER_CLOSE( INDEX, SYMBOL, SPACE ) \ 313cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, "_(" "* #,##0_);" "_(" "* (#,##0);" "_(" "* \"-\"_);" "_(@_)" ), \ 314cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, "_(" SYMBOL SPACE "* #,##0_);" "_(" SYMBOL SPACE "* (#,##0);" "_(" SYMBOL SPACE "* \"-\"_);" "_(@_)" ), \ 315cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, "_(" "* #,##0.00_);" "_(" "* (#,##0.00);" "_(" "* \"-\"?\?_);" "_(@_)" ), \ 316cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, "_(" SYMBOL SPACE "* #,##0.00_);" "_(" SYMBOL SPACE "* (#,##0.00);" "_(" SYMBOL SPACE "* \"-\"?\?_);" "_(@_)" ) 317cdf0e10cSrcweir 318cdf0e10cSrcweir /** Defines builtin currency formats 5...8 (with currency symbol), 37...40 319cdf0e10cSrcweir (blind currency symbol), and 41...44 (accounting), in the following format: 320cdf0e10cSrcweir "[opening parenthesis], symbol, number, [closing parenthesis].". 321cdf0e10cSrcweir @param SYMBOL Currency symbol. 322cdf0e10cSrcweir @param SPACE Space character(s) between currency symbol and number. */ 323cdf0e10cSrcweir #define NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( SYMBOL, SPACE ) \ 324cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_SYMBOL_NUMBER_CLOSE( 5, SYMBOL, SPACE, "" ), \ 325cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_SYMBOL_NUMBER_CLOSE( 37, "", "", "" ), \ 326cdf0e10cSrcweir NUMFMT_ACCOUNTING_OPEN_SYMBOL_NUMBER_CLOSE( 41, SYMBOL, SPACE ) 327cdf0e10cSrcweir 328cdf0e10cSrcweir /** Defines builtin currency formats INDEX...INDEX+3 in the following format: 329cdf0e10cSrcweir "[opening parenthesis], number, symbol, [closing parenthesis].". 330cdf0e10cSrcweir @param INDEX First number format index. 331cdf0e10cSrcweir @param SYMBOL Currency symbol. 332cdf0e10cSrcweir @param SPACE Space character(s) between number and currency symbol. 333cdf0e10cSrcweir @param MODIF Leading modifier for each portion (e.g. "t" for Thai formats). */ 334cdf0e10cSrcweir #define NUMFMT_CURRENCY_OPEN_NUMBER_SYMBOL_CLOSE( INDEX, SYMBOL, SPACE, MODIF ) \ 335cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, MODIF "#,##0" SPACE SYMBOL "_);" MODIF "(#,##0" SPACE SYMBOL ")" ), \ 336cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, MODIF "#,##0" SPACE SYMBOL "_);" "[RED]" MODIF "(#,##0" SPACE SYMBOL ")" ), \ 337cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, MODIF "#,##0.00" SPACE SYMBOL "_);" MODIF "(#,##0.00" SPACE SYMBOL ")" ), \ 338cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, MODIF "#,##0.00" SPACE SYMBOL "_);" "[RED]" MODIF "(#,##0.00" SPACE SYMBOL ")" ) 339cdf0e10cSrcweir 340cdf0e10cSrcweir /** Defines builtin accounting formats INDEX...INDEX+3 in the following format: 341cdf0e10cSrcweir "[opening parenthesis], number, symbol, [closing parenthesis].". 342cdf0e10cSrcweir @param INDEX First number format index. 343cdf0e10cSrcweir @param SYMBOL Currency symbol. 344cdf0e10cSrcweir @param BLINDS Blind currency symbol. 345cdf0e10cSrcweir @param SPACE Space character(s) between number and currency symbol. */ 346cdf0e10cSrcweir #define NUMFMT_ACCOUNTING_OPEN_NUMBER_SYMBOL_CLOSE( INDEX, SYMBOL, BLINDS, SPACE ) \ 347cdf0e10cSrcweir NUMFMT_STRING( INDEX + 0, "_ * #,##0_)" SPACE BLINDS "_ ;_ * (#,##0)" SPACE BLINDS "_ ;_ * \"-\"_)" SPACE BLINDS "_ ;_ @_ " ), \ 348cdf0e10cSrcweir NUMFMT_STRING( INDEX + 1, "_ * #,##0_)" SPACE SYMBOL "_ ;_ * (#,##0)" SPACE SYMBOL "_ ;_ * \"-\"_)" SPACE SYMBOL "_ ;_ @_ " ), \ 349cdf0e10cSrcweir NUMFMT_STRING( INDEX + 2, "_ * #,##0.00_)" SPACE BLINDS "_ ;_ * (#,##0.00)" SPACE BLINDS "_ ;_ * \"-\"?\?_)" SPACE BLINDS "_ ;_ @_ " ), \ 350cdf0e10cSrcweir NUMFMT_STRING( INDEX + 3, "_ * #,##0.00_)" SPACE SYMBOL "_ ;_ * (#,##0.00)" SPACE SYMBOL "_ ;_ * \"-\"?\?_)" SPACE SYMBOL "_ ;_ @_ " ) 351cdf0e10cSrcweir 352cdf0e10cSrcweir /** Defines builtin currency formats 5...8 (with currency symbol), 37...40 353cdf0e10cSrcweir (blind currency symbol), and 41...44 (accounting), in the following format: 354cdf0e10cSrcweir "[opening parenthesis], number, symbol, [closing parenthesis].". 355cdf0e10cSrcweir @param SYMBOL Currency symbol. 356cdf0e10cSrcweir @param BLINDS Blind currency symbol. 357cdf0e10cSrcweir @param SPACE Space character(s) between number and currency symbol. */ 358cdf0e10cSrcweir #define NUMFMT_ALLCURRENCIES_OPEN_NUMBER_SYMBOL_CLOSE( SYMBOL, BLINDS, SPACE ) \ 359cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_NUMBER_SYMBOL_CLOSE( 5, SYMBOL, SPACE, "" ), \ 360cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_NUMBER_SYMBOL_CLOSE( 37, BLINDS, SPACE, "" ), \ 361cdf0e10cSrcweir NUMFMT_ACCOUNTING_OPEN_NUMBER_SYMBOL_CLOSE( 41, SYMBOL, BLINDS, SPACE ) 362cdf0e10cSrcweir 363cdf0e10cSrcweir // currency unit characters 364cdf0e10cSrcweir #define UTF8_BAHT "\340\270\277" 365cdf0e10cSrcweir #define UTF8_COLON "\342\202\241" 366cdf0e10cSrcweir #define UTF8_CURR_AR_AE "\330\257.\330\245." 367cdf0e10cSrcweir #define UTF8_CURR_AR_BH "\330\257.\330\250." 368cdf0e10cSrcweir #define UTF8_CURR_AR_DZ "\330\257.\330\254." 369cdf0e10cSrcweir #define UTF8_CURR_AR_EG "\330\254.\331\205." 370cdf0e10cSrcweir #define UTF8_CURR_AR_IQ "\330\257.\330\271." 371cdf0e10cSrcweir #define UTF8_CURR_AR_JO "\330\257.\330\247." 372cdf0e10cSrcweir #define UTF8_CURR_AR_KW "\330\257.\331\203." 373cdf0e10cSrcweir #define UTF8_CURR_AR_LB "\331\204.\331\204." 374cdf0e10cSrcweir #define UTF8_CURR_AR_LY "\330\257.\331\204." 375cdf0e10cSrcweir #define UTF8_CURR_AR_MA "\330\257.\331\205." 376cdf0e10cSrcweir #define UTF8_CURR_AR_OM "\330\261.\330\271." 377cdf0e10cSrcweir #define UTF8_CURR_AR_QA "\330\261.\331\202." 378cdf0e10cSrcweir #define UTF8_CURR_AR_SA "\330\261.\330\263." 379cdf0e10cSrcweir #define UTF8_CURR_AR_SY "\331\204.\330\263." 380cdf0e10cSrcweir #define UTF8_CURR_AR_TN "\330\257.\330\252." 381cdf0e10cSrcweir #define UTF8_CURR_AR_YE "\330\261.\331\212." 382cdf0e10cSrcweir #define UTF8_CURR_BN_IN "\340\246\237\340\246\276" 383cdf0e10cSrcweir #define UTF8_CURR_FA_IR "\330\261\331\212\330\247\331\204" 384cdf0e10cSrcweir #define UTF8_CURR_GU_IN "\340\252\260\340\253\202" 385cdf0e10cSrcweir #define UTF8_CURR_HI_IN "\340\244\260\340\245\201" 386cdf0e10cSrcweir #define UTF8_CURR_KN_IN "\340\262\260\340\263\202" 387cdf0e10cSrcweir #define UTF8_CURR_ML_IN "\340\264\225" 388cdf0e10cSrcweir #define UTF8_CURR_PA_IN "\340\250\260\340\251\201" 389cdf0e10cSrcweir #define UTF8_CURR_TA_IN "\340\256\260\340\257\202" 390cdf0e10cSrcweir #define UTF8_CURR_TE_IN "\340\260\260\340\261\202" 391cdf0e10cSrcweir #define UTF8_DONG "\342\202\253" 392cdf0e10cSrcweir #define UTF8_EURO "\342\202\254" 393cdf0e10cSrcweir #define UTF8_POUND_GB "\302\243" 394cdf0e10cSrcweir #define UTF8_RUFIYAA "\336\203" 395cdf0e10cSrcweir #define UTF8_SHEQEL "\342\202\252" 396cdf0e10cSrcweir #define UTF8_TUGRUG "\342\202\256" 397cdf0e10cSrcweir #define UTF8_WON "\342\202\251" 398cdf0e10cSrcweir #define UTF8_YEN_CN "\357\277\245" 399cdf0e10cSrcweir #define UTF8_YEN_JP "\302\245" 400cdf0e10cSrcweir 401cdf0e10cSrcweir // Unicode characters for currency units 402cdf0e10cSrcweir #define UTF8_CCARON_LC "\304\215" 403cdf0e10cSrcweir #define UTF8_LSTROKE_LC "\305\202" 404cdf0e10cSrcweir // Armenian 405cdf0e10cSrcweir #define UTF8_HY_DA_LC "\325\244" 406cdf0e10cSrcweir #define UTF8_HY_REH_LC "\326\200" 407cdf0e10cSrcweir // Cyrillic 408cdf0e10cSrcweir #define UTF8_CYR_G_LC "\320\263" 409cdf0e10cSrcweir #define UTF8_CYR_L_LC "\320\273" 410cdf0e10cSrcweir #define UTF8_CYR_M_LC "\320\274" 411cdf0e10cSrcweir #define UTF8_CYR_N_LC "\320\275" 412cdf0e10cSrcweir #define UTF8_CYR_O_LC "\320\276" 413cdf0e10cSrcweir #define UTF8_CYR_R_LC "\321\200" 414cdf0e10cSrcweir #define UTF8_CYR_S_LC "\321\201" 415cdf0e10cSrcweir #define UTF8_CYR_W_LC "\320\262" 416cdf0e10cSrcweir 417cdf0e10cSrcweir // Japanese/Chinese date/time characters 418cdf0e10cSrcweir #define UTF8_CJ_YEAR "\345\271\264" 419cdf0e10cSrcweir #define UTF8_CJ_MON "\346\234\210" 420cdf0e10cSrcweir #define UTF8_CJ_DAY "\346\227\245" 421cdf0e10cSrcweir #define UTF8_CJ_HOUR "\346\231\202" 422cdf0e10cSrcweir #define UTF8_CJ_MIN "\345\210\206" 423cdf0e10cSrcweir #define UTF8_CJ_SEC "\347\247\222" 424cdf0e10cSrcweir 425cdf0e10cSrcweir // Chinese Simplified date/time characters 426cdf0e10cSrcweir #define UTF8_CS_YEAR "\345\271\264" 427cdf0e10cSrcweir #define UTF8_CS_MON "\346\234\210" 428cdf0e10cSrcweir #define UTF8_CS_DAY "\346\227\245" 429cdf0e10cSrcweir #define UTF8_CS_HOUR "\346\227\266" 430cdf0e10cSrcweir #define UTF8_CS_MIN "\345\210\206" 431cdf0e10cSrcweir #define UTF8_CS_SEC "\347\247\222" 432cdf0e10cSrcweir 433cdf0e10cSrcweir // Korean date/time characters 434cdf0e10cSrcweir #define UTF8_KO_YEAR "\353\205\204" 435cdf0e10cSrcweir #define UTF8_KO_MON "\354\233\224" 436cdf0e10cSrcweir #define UTF8_KO_DAY "\354\235\274" 437cdf0e10cSrcweir #define UTF8_KO_HOUR "\354\213\234" 438cdf0e10cSrcweir #define UTF8_KO_MIN "\353\266\204" 439cdf0e10cSrcweir #define UTF8_KO_SEC "\354\264\210" 440cdf0e10cSrcweir 441cdf0e10cSrcweir // ---------------------------------------------------------------------------- 442cdf0e10cSrcweir 443cdf0e10cSrcweir /** Default number format table. Last parent of all other tables, used for unknown locales. */ 444cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_BASE[] = 445cdf0e10cSrcweir { 446cdf0e10cSrcweir // 0..13 numeric and currency formats 447cdf0e10cSrcweir NUMFMT_PREDEF( 0, NUMBER_STANDARD ), // General 448cdf0e10cSrcweir NUMFMT_PREDEF( 1, NUMBER_INT ), // 0 449cdf0e10cSrcweir NUMFMT_PREDEF( 2, NUMBER_DEC2 ), // 0.00 450cdf0e10cSrcweir NUMFMT_PREDEF( 3, NUMBER_1000INT ), // #,##0 451cdf0e10cSrcweir NUMFMT_PREDEF( 4, NUMBER_1000DEC2 ), // #,##0.00 452cdf0e10cSrcweir NUMFMT_PREDEF( 5, CURRENCY_1000INT ), // #,##0[symbol] 453cdf0e10cSrcweir NUMFMT_PREDEF( 6, CURRENCY_1000INT_RED ), // #,##0[symbol];[RED]-#,##0[symbol] 454cdf0e10cSrcweir NUMFMT_PREDEF( 7, CURRENCY_1000DEC2 ), // #,##0.00[symbol] 455cdf0e10cSrcweir NUMFMT_PREDEF( 8, CURRENCY_1000DEC2_RED ), // #,##0.00[symbol];[RED]-#,##0.00[symbol] 456cdf0e10cSrcweir NUMFMT_PREDEF( 9, PERCENT_INT ), // 0% 457cdf0e10cSrcweir NUMFMT_PREDEF( 10, PERCENT_DEC2 ), // 0.00% 458cdf0e10cSrcweir NUMFMT_PREDEF( 11, SCIENTIFIC_000E00 ), // 0.00E+00 459cdf0e10cSrcweir NUMFMT_PREDEF( 12, FRACTION_1 ), // # ?/? 460cdf0e10cSrcweir NUMFMT_PREDEF( 13, FRACTION_2 ), // # ??/?? 461cdf0e10cSrcweir 462cdf0e10cSrcweir // 14...22 date and time formats 463cdf0e10cSrcweir NUMFMT_PREDEF( 14, DATE_SYS_DDMMYYYY ), 464cdf0e10cSrcweir NUMFMT_PREDEF( 15, DATE_SYS_DMMMYY ), 465cdf0e10cSrcweir NUMFMT_PREDEF( 16, DATE_SYS_DDMMM ), 466cdf0e10cSrcweir NUMFMT_PREDEF( 17, DATE_SYS_MMYY ), 467cdf0e10cSrcweir NUMFMT_PREDEF( 18, TIME_HHMMAMPM ), 468cdf0e10cSrcweir NUMFMT_PREDEF( 19, TIME_HHMMSSAMPM ), 469cdf0e10cSrcweir NUMFMT_PREDEF( 20, TIME_HHMM ), 470cdf0e10cSrcweir NUMFMT_PREDEF( 21, TIME_HHMMSS ), 471cdf0e10cSrcweir NUMFMT_PREDEF( 22, DATETIME_SYSTEM_SHORT_HHMM ), 472cdf0e10cSrcweir 473cdf0e10cSrcweir // 23...36 international formats 474cdf0e10cSrcweir NUMFMT_REUSE( 23, 0 ), 475cdf0e10cSrcweir NUMFMT_REUSE( 24, 0 ), 476cdf0e10cSrcweir NUMFMT_REUSE( 25, 0 ), 477cdf0e10cSrcweir NUMFMT_REUSE( 26, 0 ), 478cdf0e10cSrcweir NUMFMT_REUSE( 27, 14 ), 479cdf0e10cSrcweir NUMFMT_REUSE( 28, 14 ), 480cdf0e10cSrcweir NUMFMT_REUSE( 29, 14 ), 481cdf0e10cSrcweir NUMFMT_REUSE( 30, 14 ), 482cdf0e10cSrcweir NUMFMT_REUSE( 31, 14 ), 483cdf0e10cSrcweir NUMFMT_REUSE( 32, 21 ), 484cdf0e10cSrcweir NUMFMT_REUSE( 33, 21 ), 485cdf0e10cSrcweir NUMFMT_REUSE( 34, 21 ), 486cdf0e10cSrcweir NUMFMT_REUSE( 35, 21 ), 487cdf0e10cSrcweir NUMFMT_REUSE( 36, 14 ), 488cdf0e10cSrcweir 489cdf0e10cSrcweir // 37...44 accounting formats, defaults without currency symbol here 490cdf0e10cSrcweir NUMFMT_CURRENCY_MINUS_SYMBOL_NUMBER( 37, "", "", "" ), 491cdf0e10cSrcweir NUMFMT_ACCOUNTING_MINUS_SYMBOL_NUMBER( 41, "", "" ), 492cdf0e10cSrcweir 493cdf0e10cSrcweir // 45...49 more special formats 494cdf0e10cSrcweir NUMFMT_STRING( 45, "mm:ss" ), 495cdf0e10cSrcweir NUMFMT_STRING( 46, "[h]:mm:ss" ), 496cdf0e10cSrcweir NUMFMT_STRING( 47, "mm:ss.0" ), 497cdf0e10cSrcweir NUMFMT_STRING( 48, "##0.0E+0" ), 498cdf0e10cSrcweir NUMFMT_PREDEF( 49, TEXT ), 499cdf0e10cSrcweir 500cdf0e10cSrcweir // 50...81 international formats 501cdf0e10cSrcweir NUMFMT_REUSE( 50, 14 ), 502cdf0e10cSrcweir NUMFMT_REUSE( 51, 14 ), 503cdf0e10cSrcweir NUMFMT_REUSE( 52, 14 ), 504cdf0e10cSrcweir NUMFMT_REUSE( 53, 14 ), 505cdf0e10cSrcweir NUMFMT_REUSE( 54, 14 ), 506cdf0e10cSrcweir NUMFMT_REUSE( 55, 14 ), 507cdf0e10cSrcweir NUMFMT_REUSE( 56, 14 ), 508cdf0e10cSrcweir NUMFMT_REUSE( 57, 14 ), 509cdf0e10cSrcweir NUMFMT_REUSE( 58, 14 ), 510cdf0e10cSrcweir NUMFMT_REUSE( 59, 1 ), 511cdf0e10cSrcweir NUMFMT_REUSE( 60, 2 ), 512cdf0e10cSrcweir NUMFMT_REUSE( 61, 3 ), 513cdf0e10cSrcweir NUMFMT_REUSE( 62, 4 ), 514cdf0e10cSrcweir NUMFMT_REUSE( 63, 5 ), 515cdf0e10cSrcweir NUMFMT_REUSE( 64, 6 ), 516cdf0e10cSrcweir NUMFMT_REUSE( 65, 7 ), 517cdf0e10cSrcweir NUMFMT_REUSE( 66, 8 ), 518cdf0e10cSrcweir NUMFMT_REUSE( 67, 9 ), 519cdf0e10cSrcweir NUMFMT_REUSE( 68, 10 ), 520cdf0e10cSrcweir NUMFMT_REUSE( 69, 12 ), 521cdf0e10cSrcweir NUMFMT_REUSE( 70, 13 ), 522cdf0e10cSrcweir NUMFMT_REUSE( 71, 14 ), 523cdf0e10cSrcweir NUMFMT_REUSE( 72, 14 ), 524cdf0e10cSrcweir NUMFMT_REUSE( 73, 15 ), 525cdf0e10cSrcweir NUMFMT_REUSE( 74, 16 ), 526cdf0e10cSrcweir NUMFMT_REUSE( 75, 17 ), 527cdf0e10cSrcweir NUMFMT_REUSE( 76, 20 ), 528cdf0e10cSrcweir NUMFMT_REUSE( 77, 21 ), 529cdf0e10cSrcweir NUMFMT_REUSE( 78, 22 ), 530cdf0e10cSrcweir NUMFMT_REUSE( 79, 45 ), 531cdf0e10cSrcweir NUMFMT_REUSE( 80, 46 ), 532cdf0e10cSrcweir NUMFMT_REUSE( 81, 47 ), 533cdf0e10cSrcweir 534cdf0e10cSrcweir // 82...163 not used, must not occur in a file (Excel may crash) 535cdf0e10cSrcweir 536cdf0e10cSrcweir NUMFMT_ENDTABLE() 537cdf0e10cSrcweir }; 538cdf0e10cSrcweir 539cdf0e10cSrcweir // ---------------------------------------------------------------------------- 540cdf0e10cSrcweir 541cdf0e10cSrcweir /** Arabic, U.A.E. */ 542cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_AE[] = 543cdf0e10cSrcweir { 544cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 545cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_AE "\"", " " ), 546cdf0e10cSrcweir NUMFMT_ENDTABLE() 547cdf0e10cSrcweir }; 548cdf0e10cSrcweir 549cdf0e10cSrcweir /** Arabic, Bahrain. */ 550cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_BH[] = 551cdf0e10cSrcweir { 552cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 553cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_BH "\"", " " ), 554cdf0e10cSrcweir NUMFMT_ENDTABLE() 555cdf0e10cSrcweir }; 556cdf0e10cSrcweir 557cdf0e10cSrcweir /** Arabic, Algeria. */ 558cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_DZ[] = 559cdf0e10cSrcweir { 560cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 561cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_DZ "\"", " " ), 562cdf0e10cSrcweir NUMFMT_ENDTABLE() 563cdf0e10cSrcweir }; 564cdf0e10cSrcweir 565cdf0e10cSrcweir /** Arabic, Egypt. */ 566cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_EG[] = 567cdf0e10cSrcweir { 568cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 569cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_EG "\"", " " ), 570cdf0e10cSrcweir NUMFMT_ENDTABLE() 571cdf0e10cSrcweir }; 572cdf0e10cSrcweir 573cdf0e10cSrcweir /** Arabic, Iraq. */ 574cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_IQ[] = 575cdf0e10cSrcweir { 576cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 577cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_IQ "\"", " " ), 578cdf0e10cSrcweir NUMFMT_ENDTABLE() 579cdf0e10cSrcweir }; 580cdf0e10cSrcweir 581cdf0e10cSrcweir /** Arabic, Jordan. */ 582cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_JO[] = 583cdf0e10cSrcweir { 584cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 585cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_JO "\"", " " ), 586cdf0e10cSrcweir NUMFMT_ENDTABLE() 587cdf0e10cSrcweir }; 588cdf0e10cSrcweir 589cdf0e10cSrcweir /** Arabic, Kuwait. */ 590cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_KW[] = 591cdf0e10cSrcweir { 592cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 593cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_KW "\"", " " ), 594cdf0e10cSrcweir NUMFMT_ENDTABLE() 595cdf0e10cSrcweir }; 596cdf0e10cSrcweir 597cdf0e10cSrcweir /** Arabic, Lebanon. */ 598cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_LB[] = 599cdf0e10cSrcweir { 600cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 601cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_LB "\"", " " ), 602cdf0e10cSrcweir NUMFMT_ENDTABLE() 603cdf0e10cSrcweir }; 604cdf0e10cSrcweir 605cdf0e10cSrcweir /** Arabic, Libya. */ 606cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_LY[] = 607cdf0e10cSrcweir { 608cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 609cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_LY "\"", " " ), 610cdf0e10cSrcweir NUMFMT_ENDTABLE() 611cdf0e10cSrcweir }; 612cdf0e10cSrcweir 613cdf0e10cSrcweir /** Arabic, Morocco. */ 614cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_MA[] = 615cdf0e10cSrcweir { 616cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 617cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_MA "\"", " " ), 618cdf0e10cSrcweir NUMFMT_ENDTABLE() 619cdf0e10cSrcweir }; 620cdf0e10cSrcweir 621cdf0e10cSrcweir /** Arabic, Oman. */ 622cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_OM[] = 623cdf0e10cSrcweir { 624cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 625cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_OM "\"", " " ), 626cdf0e10cSrcweir NUMFMT_ENDTABLE() 627cdf0e10cSrcweir }; 628cdf0e10cSrcweir 629cdf0e10cSrcweir /** Arabic, Qatar. */ 630cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_QA[] = 631cdf0e10cSrcweir { 632cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 633cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_QA "\"", " " ), 634cdf0e10cSrcweir NUMFMT_ENDTABLE() 635cdf0e10cSrcweir }; 636cdf0e10cSrcweir 637cdf0e10cSrcweir /** Arabic, Saudi Arabia. */ 638cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_SA[] = 639cdf0e10cSrcweir { 640cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 641cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_SA "\"", " " ), 642cdf0e10cSrcweir NUMFMT_ENDTABLE() 643cdf0e10cSrcweir }; 644cdf0e10cSrcweir 645cdf0e10cSrcweir /** Arabic, Syria. */ 646cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_SY[] = 647cdf0e10cSrcweir { 648cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 649cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_SY "\"", " " ), 650cdf0e10cSrcweir NUMFMT_ENDTABLE() 651cdf0e10cSrcweir }; 652cdf0e10cSrcweir 653cdf0e10cSrcweir /** Arabic, Tunisia. */ 654cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_TN[] = 655cdf0e10cSrcweir { 656cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 657cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_TN "\"", " " ), 658cdf0e10cSrcweir NUMFMT_ENDTABLE() 659cdf0e10cSrcweir }; 660cdf0e10cSrcweir 661cdf0e10cSrcweir /** Arabic, Yemen. */ 662cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ar_YE[] = 663cdf0e10cSrcweir { 664cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 665cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_AR_YE "\"", " " ), 666cdf0e10cSrcweir NUMFMT_ENDTABLE() 667cdf0e10cSrcweir }; 668cdf0e10cSrcweir 669cdf0e10cSrcweir /** Belarusian, Belarus. */ 670cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_be_BY[] = 671cdf0e10cSrcweir { 672cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 673cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "h" ), 674cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"" UTF8_CYR_R_LC ".\"", "_" UTF8_CYR_R_LC "_.", "\\ " ), 675cdf0e10cSrcweir NUMFMT_ENDTABLE() 676cdf0e10cSrcweir }; 677cdf0e10cSrcweir 678cdf0e10cSrcweir /** Bulgarian, Bulgaria. */ 679cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_bg_BG[] = 680cdf0e10cSrcweir { 681cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 682cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.M.YYYY", "DD", ".", "MMM", ".", "YY", "h", "hh" ), 683cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"" UTF8_CYR_L_LC UTF8_CYR_W_LC "\"", "_" UTF8_CYR_L_LC "_" UTF8_CYR_W_LC, "\\ " ), 684cdf0e10cSrcweir NUMFMT_ENDTABLE() 685cdf0e10cSrcweir }; 686cdf0e10cSrcweir 687cdf0e10cSrcweir /** Bengali, India. */ 688cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_bn_IN[] = 689cdf0e10cSrcweir { 690cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 691cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"" UTF8_CURR_BN_IN "\"", " " ), 692cdf0e10cSrcweir NUMFMT_ENDTABLE() 693cdf0e10cSrcweir }; 694cdf0e10cSrcweir 695cdf0e10cSrcweir /** Czech, Czech Republic. */ 696cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_cs_CZ[] = 697cdf0e10cSrcweir { 698cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 699cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D.M.YYYY", "D", ".", "MMM", ".", "YY", "h", "h" ), 700cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"K" UTF8_CCARON_LC "\"", "_K_" UTF8_CCARON_LC, "\\ " ), 701cdf0e10cSrcweir NUMFMT_ENDTABLE() 702cdf0e10cSrcweir }; 703cdf0e10cSrcweir 704cdf0e10cSrcweir /** Danish, Denmark. */ 705cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_da_DK[] = 706cdf0e10cSrcweir { 707cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YYYY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 708cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"kr\"", " " ), 709cdf0e10cSrcweir NUMFMT_ENDTABLE() 710cdf0e10cSrcweir }; 711cdf0e10cSrcweir 712cdf0e10cSrcweir /** German, Austria. */ 713cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_de_AT[] = 714cdf0e10cSrcweir { 715cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "hh" ), 716cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( UTF8_EURO, " " ), 717cdf0e10cSrcweir NUMFMT_ENDTABLE() 718cdf0e10cSrcweir }; 719cdf0e10cSrcweir 720cdf0e10cSrcweir /** German, Switzerland. */ 721cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_de_CH[] = 722cdf0e10cSrcweir { 723cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ". ", "MMM", " ", "YY", "h", "hh" ), 724cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"SFr.\"", " " ), 725cdf0e10cSrcweir NUMFMT_ENDTABLE() 726cdf0e10cSrcweir }; 727cdf0e10cSrcweir 728cdf0e10cSrcweir /** German, Germany. */ 729cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_de_DE[] = 730cdf0e10cSrcweir { 731cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ". ", "MMM", " ", "YY", "h", "hh" ), 732cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, " " ), 733cdf0e10cSrcweir NUMFMT_ENDTABLE() 734cdf0e10cSrcweir }; 735cdf0e10cSrcweir 736cdf0e10cSrcweir /** German, Liechtenstein. */ 737cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_de_LI[] = 738cdf0e10cSrcweir { 739cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ". ", "MMM", " ", "YY", "h", "hh" ), 740cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"CHF\"", " " ), 741cdf0e10cSrcweir NUMFMT_ENDTABLE() 742cdf0e10cSrcweir }; 743cdf0e10cSrcweir 744cdf0e10cSrcweir /** German, Luxembourg. */ 745cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_de_LU[] = 746cdf0e10cSrcweir { 747cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "hh" ), 748cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, " " ), 749cdf0e10cSrcweir NUMFMT_ENDTABLE() 750cdf0e10cSrcweir }; 751cdf0e10cSrcweir 752cdf0e10cSrcweir /** Divehi, Maldives. */ 753cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_div_MV[] = 754cdf0e10cSrcweir { 755cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 756cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_NUMBER_SYMBOL_MINUS( "\"" UTF8_RUFIYAA ".\"", "_" UTF8_RUFIYAA "_.", " " ), 757cdf0e10cSrcweir NUMFMT_ENDTABLE() 758cdf0e10cSrcweir }; 759cdf0e10cSrcweir 760cdf0e10cSrcweir /** Greek, Greece. */ 761cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_el_GR[] = 762cdf0e10cSrcweir { 763cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D/M/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 764cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, " " ), 765cdf0e10cSrcweir NUMFMT_ENDTABLE() 766cdf0e10cSrcweir }; 767cdf0e10cSrcweir 768cdf0e10cSrcweir /** English, Australia. */ 769cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_AU[] = 770cdf0e10cSrcweir { 771cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D/MM/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 772cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( "$", "" ), 773cdf0e10cSrcweir NUMFMT_ENDTABLE() 774cdf0e10cSrcweir }; 775cdf0e10cSrcweir 776cdf0e10cSrcweir /** English, Belize. */ 777cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_BZ[] = 778cdf0e10cSrcweir { 779cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 780cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"BZ$\"", "" ), 781cdf0e10cSrcweir NUMFMT_ENDTABLE() 782cdf0e10cSrcweir }; 783cdf0e10cSrcweir 784cdf0e10cSrcweir /** English, Canada. */ 785cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_CA[] = 786cdf0e10cSrcweir { 787cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 788cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( "$", "" ), 789cdf0e10cSrcweir NUMFMT_ENDTABLE() 790cdf0e10cSrcweir }; 791cdf0e10cSrcweir 792cdf0e10cSrcweir /** English, Caribbean. */ 793cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_CB[] = 794cdf0e10cSrcweir { 795cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "MM/DD/YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 796cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( "$", "" ), 797cdf0e10cSrcweir NUMFMT_ENDTABLE() 798cdf0e10cSrcweir }; 799cdf0e10cSrcweir 800cdf0e10cSrcweir /** English, United Kingdom. */ 801cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_GB[] = 802cdf0e10cSrcweir { 803cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 804cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( UTF8_POUND_GB, "" ), 805cdf0e10cSrcweir NUMFMT_ENDTABLE() 806cdf0e10cSrcweir }; 807cdf0e10cSrcweir 808cdf0e10cSrcweir /** English, Ireland. */ 809cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_IE[] = 810cdf0e10cSrcweir { 811cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 812cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( UTF8_EURO, "" ), 813cdf0e10cSrcweir NUMFMT_ENDTABLE() 814cdf0e10cSrcweir }; 815cdf0e10cSrcweir 816cdf0e10cSrcweir /** English, Jamaica. */ 817cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_JM[] = 818cdf0e10cSrcweir { 819cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 820cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( "\"J$\"", "" ), 821cdf0e10cSrcweir NUMFMT_ENDTABLE() 822cdf0e10cSrcweir }; 823cdf0e10cSrcweir 824cdf0e10cSrcweir /** English, New Zealand. */ 825cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_NZ[] = 826cdf0e10cSrcweir { 827cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D/MM/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 828cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( "$", "" ), 829cdf0e10cSrcweir NUMFMT_ENDTABLE() 830cdf0e10cSrcweir }; 831cdf0e10cSrcweir 832cdf0e10cSrcweir /** English, Philippines. */ 833cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_PH[] = 834cdf0e10cSrcweir { 835cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "M/D/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 836cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"Php\"", "" ), 837cdf0e10cSrcweir NUMFMT_ENDTABLE() 838cdf0e10cSrcweir }; 839cdf0e10cSrcweir 840cdf0e10cSrcweir /** English, Trinidad and Tobago. */ 841cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_TT[] = 842cdf0e10cSrcweir { 843cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 844cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"TT$\"", "" ), 845cdf0e10cSrcweir NUMFMT_ENDTABLE() 846cdf0e10cSrcweir }; 847cdf0e10cSrcweir 848cdf0e10cSrcweir /** English, USA. */ 849cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_US[] = 850cdf0e10cSrcweir { 851cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "M/D/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 852cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "$", "" ), 853cdf0e10cSrcweir NUMFMT_ENDTABLE() 854cdf0e10cSrcweir }; 855cdf0e10cSrcweir 856cdf0e10cSrcweir /** English, South Africa. */ 857cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_ZA[] = 858cdf0e10cSrcweir { 859cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY/MM/DD", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 860cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\\R", " " ), 861cdf0e10cSrcweir NUMFMT_ENDTABLE() 862cdf0e10cSrcweir }; 863cdf0e10cSrcweir 864cdf0e10cSrcweir /** English, Zimbabwe. */ 865cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_en_ZW[] = 866cdf0e10cSrcweir { 867cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "M/D/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 868cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"Z$\"", "" ), 869cdf0e10cSrcweir NUMFMT_ENDTABLE() 870cdf0e10cSrcweir }; 871cdf0e10cSrcweir 872cdf0e10cSrcweir /** Spanish, Argentina. */ 873cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_AR[] = 874cdf0e10cSrcweir { 875cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 876cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "$", " " ), 877cdf0e10cSrcweir NUMFMT_ENDTABLE() 878cdf0e10cSrcweir }; 879cdf0e10cSrcweir 880cdf0e10cSrcweir /** Spanish, Bolivia. */ 881cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_BO[] = 882cdf0e10cSrcweir { 883cdf0e10cSrcweir // slashes must be quoted to prevent conversion to minus 884cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD\\/MM\\/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 885cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"$b\"", " " ), 886cdf0e10cSrcweir NUMFMT_ENDTABLE() 887cdf0e10cSrcweir }; 888cdf0e10cSrcweir 889cdf0e10cSrcweir /** Spanish, Chile. */ 890cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_CL[] = 891cdf0e10cSrcweir { 892cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 893cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( "$", " " ), 894cdf0e10cSrcweir NUMFMT_ENDTABLE() 895cdf0e10cSrcweir }; 896cdf0e10cSrcweir 897cdf0e10cSrcweir /** Spanish, Colombia. */ 898cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_CO[] = 899cdf0e10cSrcweir { 900cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 901cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "$", " " ), 902cdf0e10cSrcweir NUMFMT_ENDTABLE() 903cdf0e10cSrcweir }; 904cdf0e10cSrcweir 905cdf0e10cSrcweir /** Spanish, Costa Rica. */ 906cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_CR[] = 907cdf0e10cSrcweir { 908cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 909cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( UTF8_COLON, "" ), 910cdf0e10cSrcweir NUMFMT_ENDTABLE() 911cdf0e10cSrcweir }; 912cdf0e10cSrcweir 913cdf0e10cSrcweir /** Spanish, Dominican Republic. */ 914cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_DO[] = 915cdf0e10cSrcweir { 916cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 917cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"RD$\"", "" ), 918cdf0e10cSrcweir NUMFMT_ENDTABLE() 919cdf0e10cSrcweir }; 920cdf0e10cSrcweir 921cdf0e10cSrcweir /** Spanish, Ecuador. */ 922cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_EC[] = 923cdf0e10cSrcweir { 924cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 925cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "$", " " ), 926cdf0e10cSrcweir NUMFMT_ENDTABLE() 927cdf0e10cSrcweir }; 928cdf0e10cSrcweir 929cdf0e10cSrcweir /** Spanish, Spain. */ 930cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_ES[] = 931cdf0e10cSrcweir { 932cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 933cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, " " ), 934cdf0e10cSrcweir NUMFMT_ENDTABLE() 935cdf0e10cSrcweir }; 936cdf0e10cSrcweir 937cdf0e10cSrcweir /** Spanish, Guatemala. */ 938cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_GT[] = 939cdf0e10cSrcweir { 940cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 941cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\\Q", "" ), 942cdf0e10cSrcweir NUMFMT_ENDTABLE() 943cdf0e10cSrcweir }; 944cdf0e10cSrcweir 945cdf0e10cSrcweir /** Spanish, Honduras. */ 946cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_HN[] = 947cdf0e10cSrcweir { 948cdf0e10cSrcweir // slashes must be quoted to prevent conversion to minus 949cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD\\/MM\\/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 950cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"L.\"", " " ), 951cdf0e10cSrcweir NUMFMT_ENDTABLE() 952cdf0e10cSrcweir }; 953cdf0e10cSrcweir 954cdf0e10cSrcweir /** Spanish, Mexico. */ 955cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_MX[] = 956cdf0e10cSrcweir { 957cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 958cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( "$", "" ), 959cdf0e10cSrcweir NUMFMT_ENDTABLE() 960cdf0e10cSrcweir }; 961cdf0e10cSrcweir 962cdf0e10cSrcweir /** Spanish, Nicaragua. */ 963cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_NI[] = 964cdf0e10cSrcweir { 965cdf0e10cSrcweir // slashes must be quoted to prevent conversion to minus 966cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD\\/MM\\/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 967cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"C$\"", " " ), 968cdf0e10cSrcweir NUMFMT_ENDTABLE() 969cdf0e10cSrcweir }; 970cdf0e10cSrcweir 971cdf0e10cSrcweir /** Spanish, Panama. */ 972cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_PA[] = 973cdf0e10cSrcweir { 974cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 975cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"B/.\"", " " ), 976cdf0e10cSrcweir NUMFMT_ENDTABLE() 977cdf0e10cSrcweir }; 978cdf0e10cSrcweir 979cdf0e10cSrcweir /** Spanish, Peru. */ 980cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_PE[] = 981cdf0e10cSrcweir { 982cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 983cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"S/.\"", " " ), 984cdf0e10cSrcweir NUMFMT_ENDTABLE() 985cdf0e10cSrcweir }; 986cdf0e10cSrcweir 987cdf0e10cSrcweir /** Spanish, Puerto Rico. */ 988cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_PR[] = 989cdf0e10cSrcweir { 990cdf0e10cSrcweir // slashes must be quoted to prevent conversion to minus 991cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD\\/MM\\/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 992cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "$", " " ), 993cdf0e10cSrcweir NUMFMT_ENDTABLE() 994cdf0e10cSrcweir }; 995cdf0e10cSrcweir 996cdf0e10cSrcweir /** Spanish, Paraguay. */ 997cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_PY[] = 998cdf0e10cSrcweir { 999cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 1000cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"Gs\"", " " ), 1001cdf0e10cSrcweir NUMFMT_ENDTABLE() 1002cdf0e10cSrcweir }; 1003cdf0e10cSrcweir 1004cdf0e10cSrcweir /** Spanish, El Salvador. */ 1005cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_SV[] = 1006cdf0e10cSrcweir { 1007cdf0e10cSrcweir // slashes must be quoted to prevent conversion to minus 1008cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD\\/MM\\/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 1009cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "$", "" ), 1010cdf0e10cSrcweir NUMFMT_ENDTABLE() 1011cdf0e10cSrcweir }; 1012cdf0e10cSrcweir 1013cdf0e10cSrcweir /** Spanish, Uruguay. */ 1014cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_UY[] = 1015cdf0e10cSrcweir { 1016cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 1017cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"$U\"", " " ), 1018cdf0e10cSrcweir NUMFMT_ENDTABLE() 1019cdf0e10cSrcweir }; 1020cdf0e10cSrcweir 1021cdf0e10cSrcweir /** Spanish, Venezuela. */ 1022cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_es_VE[] = 1023cdf0e10cSrcweir { 1024cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 1025cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "Bs", " " ), 1026cdf0e10cSrcweir NUMFMT_ENDTABLE() 1027cdf0e10cSrcweir }; 1028cdf0e10cSrcweir 1029cdf0e10cSrcweir /** Estonian, Estonia. */ 1030cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_et_EE[] = 1031cdf0e10cSrcweir { 1032cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1033cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D.MM.YYYY", "D", ".", "MMM", ".", "YY", "h", "h" ), 1034cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"kr\"", "_k_r", "\\ " ), 1035cdf0e10cSrcweir NUMFMT_ENDTABLE() 1036cdf0e10cSrcweir }; 1037cdf0e10cSrcweir 1038cdf0e10cSrcweir /** Farsi, Iran. */ 1039cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_fa_IR[] = 1040cdf0e10cSrcweir { 1041cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY/MM/DD", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 1042cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"" UTF8_CURR_FA_IR "\"", " " ), 1043cdf0e10cSrcweir NUMFMT_ENDTABLE() 1044cdf0e10cSrcweir }; 1045cdf0e10cSrcweir 1046cdf0e10cSrcweir /** Finnish, Finland. */ 1047cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_fi_FI[] = 1048cdf0e10cSrcweir { 1049cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1050cdf0e10cSrcweir NUMFMT_STRING( 9, "0\\ %" ), 1051cdf0e10cSrcweir NUMFMT_STRING( 10, "0.00\\ %" ), 1052cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D.M.YYYY", "D", ".", "MMM", ".", "YY", "h", "h" ), 1053cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, "\\ " ), 1054cdf0e10cSrcweir NUMFMT_ENDTABLE() 1055cdf0e10cSrcweir }; 1056cdf0e10cSrcweir 1057cdf0e10cSrcweir /** Faroese, Faroe Islands. */ 1058cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_fo_FO[] = 1059cdf0e10cSrcweir { 1060cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YYYY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1061cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"kr\"", " " ), 1062cdf0e10cSrcweir NUMFMT_ENDTABLE() 1063cdf0e10cSrcweir }; 1064cdf0e10cSrcweir 1065cdf0e10cSrcweir /** French, Belgium. */ 1066cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_fr_BE[] = 1067cdf0e10cSrcweir { 1068cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D/MM/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 1069cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, " " ), 1070cdf0e10cSrcweir NUMFMT_ENDTABLE() 1071cdf0e10cSrcweir }; 1072cdf0e10cSrcweir 1073cdf0e10cSrcweir /** French, Canada. */ 1074cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_fr_CA[] = 1075cdf0e10cSrcweir { 1076cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1077cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY-MM-DD", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1078cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_NUMBER_SYMBOL_CLOSE( "$", "_$", "\\ " ), 1079cdf0e10cSrcweir NUMFMT_ENDTABLE() 1080cdf0e10cSrcweir }; 1081cdf0e10cSrcweir 1082cdf0e10cSrcweir /** French, Switzerland. */ 1083cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_fr_CH[] = 1084cdf0e10cSrcweir { 1085cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "hh" ), 1086cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"SFr.\"", " " ), 1087cdf0e10cSrcweir NUMFMT_ENDTABLE() 1088cdf0e10cSrcweir }; 1089cdf0e10cSrcweir 1090cdf0e10cSrcweir /** French, France. */ 1091cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_fr_FR[] = 1092cdf0e10cSrcweir { 1093cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1094cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1095cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, "\\ " ), 1096cdf0e10cSrcweir NUMFMT_ENDTABLE() 1097cdf0e10cSrcweir }; 1098cdf0e10cSrcweir 1099cdf0e10cSrcweir /** French, Luxembourg. */ 1100cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_fr_LU[] = 1101cdf0e10cSrcweir { 1102cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1103cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1104cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, "\\ " ), 1105cdf0e10cSrcweir NUMFMT_ENDTABLE() 1106cdf0e10cSrcweir }; 1107cdf0e10cSrcweir 1108cdf0e10cSrcweir /** French, Monaco. */ 1109cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_fr_MC[] = 1110cdf0e10cSrcweir { 1111cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1112cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1113cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, "\\ " ), 1114cdf0e10cSrcweir NUMFMT_ENDTABLE() 1115cdf0e10cSrcweir }; 1116cdf0e10cSrcweir 1117cdf0e10cSrcweir /** Galizian, Spain. */ 1118cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_gl_ES[] = 1119cdf0e10cSrcweir { 1120cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 1121cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( UTF8_EURO, " " ), 1122cdf0e10cSrcweir NUMFMT_ENDTABLE() 1123cdf0e10cSrcweir }; 1124cdf0e10cSrcweir 1125cdf0e10cSrcweir /** Gujarati, India. */ 1126cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_gu_IN[] = 1127cdf0e10cSrcweir { 1128cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1129cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"" UTF8_CURR_GU_IN "\"", " " ), 1130cdf0e10cSrcweir NUMFMT_ENDTABLE() 1131cdf0e10cSrcweir }; 1132cdf0e10cSrcweir 1133cdf0e10cSrcweir /** Hebrew, Israel. */ 1134cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_he_IL[] = 1135cdf0e10cSrcweir { 1136cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1137cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( UTF8_SHEQEL, " " ), 1138cdf0e10cSrcweir NUMFMT_ENDTABLE() 1139cdf0e10cSrcweir }; 1140cdf0e10cSrcweir 1141cdf0e10cSrcweir /** Hindi, India. */ 1142cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_hi_IN[] = 1143cdf0e10cSrcweir { 1144cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YYYY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1145cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"" UTF8_CURR_HI_IN "\"", " " ), 1146cdf0e10cSrcweir NUMFMT_ENDTABLE() 1147cdf0e10cSrcweir }; 1148cdf0e10cSrcweir 1149cdf0e10cSrcweir /** Croatian, Bosnia and Herzegowina. */ 1150cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_hr_BA[] = 1151cdf0e10cSrcweir { 1152cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D.M.YYYY", "D", ".", "MMM", ".", "YY", "h", "h" ), 1153cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"KM\"", "_K_M", " " ), 1154cdf0e10cSrcweir NUMFMT_ENDTABLE() 1155cdf0e10cSrcweir }; 1156cdf0e10cSrcweir 1157cdf0e10cSrcweir /** Croatian, Croatia. */ 1158cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_hr_HR[] = 1159cdf0e10cSrcweir { 1160cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D.M.YYYY", "D", ".", "MMM", ".", "YY", "h", "h" ), 1161cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"kn\"", "_k_n", " " ), 1162cdf0e10cSrcweir NUMFMT_ENDTABLE() 1163cdf0e10cSrcweir }; 1164cdf0e10cSrcweir 1165cdf0e10cSrcweir /** Hungarian, Hungary. */ 1166cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_hu_HU[] = 1167cdf0e10cSrcweir { 1168cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1169cdf0e10cSrcweir // MMM is rendered differently in Calc and Excel (see #i41488#) 1170cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY.MM.DD", "DD", ".", "MMM", ".", "YY", "h", "h" ), 1171cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"Ft\"", "_F_t", "\\ " ), 1172cdf0e10cSrcweir NUMFMT_ENDTABLE() 1173cdf0e10cSrcweir }; 1174cdf0e10cSrcweir 1175cdf0e10cSrcweir /** Armenian, Armenia. */ 1176cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_hy_AM[] = 1177cdf0e10cSrcweir { 1178cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "h" ), 1179cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"" UTF8_HY_DA_LC UTF8_HY_REH_LC ".\"", "_" UTF8_HY_DA_LC "_" UTF8_HY_REH_LC "_.", " " ), 1180cdf0e10cSrcweir NUMFMT_ENDTABLE() 1181cdf0e10cSrcweir }; 1182cdf0e10cSrcweir 1183cdf0e10cSrcweir /** Indonesian, Indonesia. */ 1184cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_id_ID[] = 1185cdf0e10cSrcweir { 1186cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 1187cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"Rp\"", "" ), 1188cdf0e10cSrcweir NUMFMT_ENDTABLE() 1189cdf0e10cSrcweir }; 1190cdf0e10cSrcweir 1191cdf0e10cSrcweir /** Icelandic, Iceland. */ 1192cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_is_IS[] = 1193cdf0e10cSrcweir { 1194cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D.M.YYYY", "D", ".", "MMM", ".", "YY", "h", "hh" ), 1195cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"kr.\"", "_k_r_.", " " ), 1196cdf0e10cSrcweir NUMFMT_ENDTABLE() 1197cdf0e10cSrcweir }; 1198cdf0e10cSrcweir 1199cdf0e10cSrcweir /** Italian, Switzerland. */ 1200cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_it_CH[] = 1201cdf0e10cSrcweir { 1202cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "hh" ), 1203cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"SFr.\"", " " ), 1204cdf0e10cSrcweir NUMFMT_ENDTABLE() 1205cdf0e10cSrcweir }; 1206cdf0e10cSrcweir 1207cdf0e10cSrcweir /** Italian, Italy. */ 1208cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_it_IT[] = 1209cdf0e10cSrcweir { 1210cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 1211cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( UTF8_EURO, " " ), 1212cdf0e10cSrcweir NUMFMT_ENDTABLE() 1213cdf0e10cSrcweir }; 1214cdf0e10cSrcweir 1215cdf0e10cSrcweir /** Georgian, Georgia. */ 1216cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ka_GE[] = 1217cdf0e10cSrcweir { 1218cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1219cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "h" ), 1220cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"Lari\"", "_L_a_r_i", "\\ " ), 1221cdf0e10cSrcweir NUMFMT_ENDTABLE() 1222cdf0e10cSrcweir }; 1223cdf0e10cSrcweir 1224cdf0e10cSrcweir /** Kazakh, Kazakhstan. */ 1225cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_kk_KZ[] = 1226cdf0e10cSrcweir { 1227cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1228cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "h" ), 1229cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( "\\T", "" ), 1230cdf0e10cSrcweir NUMFMT_ENDTABLE() 1231cdf0e10cSrcweir }; 1232cdf0e10cSrcweir 1233cdf0e10cSrcweir /** Kannada, India. */ 1234cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_kn_IN[] = 1235cdf0e10cSrcweir { 1236cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1237cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"" UTF8_CURR_KN_IN "\"", " " ), 1238cdf0e10cSrcweir NUMFMT_ENDTABLE() 1239cdf0e10cSrcweir }; 1240cdf0e10cSrcweir 1241cdf0e10cSrcweir /** Kyrgyz, Kyrgyzstan. */ 1242cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ky_KG[] = 1243cdf0e10cSrcweir { 1244cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1245cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YY", "DD", ".", "MMM", ".", "YY", "h", "h" ), 1246cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"" UTF8_CYR_S_LC UTF8_CYR_O_LC UTF8_CYR_M_LC "\"", "_" UTF8_CYR_S_LC "_" UTF8_CYR_O_LC "_" UTF8_CYR_M_LC, "\\ " ), 1247cdf0e10cSrcweir NUMFMT_ENDTABLE() 1248cdf0e10cSrcweir }; 1249cdf0e10cSrcweir 1250cdf0e10cSrcweir /** Lithuanian, Lithuania. */ 1251cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_lt_LT[] = 1252cdf0e10cSrcweir { 1253cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY.MM.DD", "DD", ".", "MMM", ".", "YY", "h", "hh" ), 1254cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"Lt\"", "_L_t", " " ), 1255cdf0e10cSrcweir NUMFMT_ENDTABLE() 1256cdf0e10cSrcweir }; 1257cdf0e10cSrcweir 1258cdf0e10cSrcweir /** Latvian, Latvia. */ 1259cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_lv_LV[] = 1260cdf0e10cSrcweir { 1261cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1262cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY.MM.DD", "DD", ".", "MMM", ".", "YY", "h", "h" ), 1263cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( "\"Ls\"", "\\ " ), 1264cdf0e10cSrcweir NUMFMT_ENDTABLE() 1265cdf0e10cSrcweir }; 1266cdf0e10cSrcweir 1267cdf0e10cSrcweir /** Malayalam, India. */ 1268cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ml_IN[] = 1269cdf0e10cSrcweir { 1270cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1271cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"" UTF8_CURR_ML_IN "\"", " " ), 1272cdf0e10cSrcweir NUMFMT_ENDTABLE() 1273cdf0e10cSrcweir }; 1274cdf0e10cSrcweir 1275cdf0e10cSrcweir /** Mongolian, Mongolia. */ 1276cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_mn_MN[] = 1277cdf0e10cSrcweir { 1278cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YY.MM.DD", "DD", ".", "MMM", ".", "YY", "h", "h" ), 1279cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_TUGRUG, "_" UTF8_TUGRUG, "" ), 1280cdf0e10cSrcweir NUMFMT_ENDTABLE() 1281cdf0e10cSrcweir }; 1282cdf0e10cSrcweir 1283cdf0e10cSrcweir /** Malay, Brunei Darussalam. */ 1284cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ms_BN[] = 1285cdf0e10cSrcweir { 1286cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 1287cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "$", "" ), 1288cdf0e10cSrcweir NUMFMT_ENDTABLE() 1289cdf0e10cSrcweir }; 1290cdf0e10cSrcweir 1291cdf0e10cSrcweir /** Malay, Malaysia. */ 1292cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ms_MY[] = 1293cdf0e10cSrcweir { 1294cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 1295cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\\R", "" ), 1296cdf0e10cSrcweir NUMFMT_ENDTABLE() 1297cdf0e10cSrcweir }; 1298cdf0e10cSrcweir 1299cdf0e10cSrcweir /** Maltese, Malta. */ 1300cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_mt_MT[] = 1301cdf0e10cSrcweir { 1302cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1303cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( "\"Lm\"", "" ), 1304cdf0e10cSrcweir NUMFMT_ENDTABLE() 1305cdf0e10cSrcweir }; 1306cdf0e10cSrcweir 1307cdf0e10cSrcweir /** Dutch, Belgium. */ 1308cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_nl_BE[] = 1309cdf0e10cSrcweir { 1310cdf0e10cSrcweir // slashes must be quoted to prevent conversion to minus 1311cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D\\/MM\\/YYYY", "D", "\\/", "MMM", "\\/", "YY", "h", "h" ), 1312cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, " " ), 1313cdf0e10cSrcweir NUMFMT_ENDTABLE() 1314cdf0e10cSrcweir }; 1315cdf0e10cSrcweir 1316cdf0e10cSrcweir /** Dutch, Netherlands. */ 1317cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_nl_NL[] = 1318cdf0e10cSrcweir { 1319cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D-M-YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 1320cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( UTF8_EURO, " " ), 1321cdf0e10cSrcweir NUMFMT_ENDTABLE() 1322cdf0e10cSrcweir }; 1323cdf0e10cSrcweir 1324cdf0e10cSrcweir /** Norwegian (Bokmal and Nynorsk), Norway. */ 1325cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_no_NO[] = 1326cdf0e10cSrcweir { 1327cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1328cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "hh" ), 1329cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"kr\"", "\\ " ), 1330cdf0e10cSrcweir NUMFMT_ENDTABLE() 1331cdf0e10cSrcweir }; 1332cdf0e10cSrcweir 1333cdf0e10cSrcweir /** Punjabi, India. */ 1334cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_pa_IN[] = 1335cdf0e10cSrcweir { 1336cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YY", "DD", "-", "MMM", "-", "YY", "hh", "hh" ), 1337cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"" UTF8_CURR_PA_IN "\"", " " ), 1338cdf0e10cSrcweir NUMFMT_ENDTABLE() 1339cdf0e10cSrcweir }; 1340cdf0e10cSrcweir 1341cdf0e10cSrcweir /** Polish, Poland. */ 1342cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_pl_PL[] = 1343cdf0e10cSrcweir { 1344cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1345cdf0e10cSrcweir // MMM is rendered differently in Calc and Excel (see #i72300#) 1346cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY-MM-DD", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1347cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"z" UTF8_LSTROKE_LC "\"", "_z_" UTF8_LSTROKE_LC, "\\ " ), 1348cdf0e10cSrcweir NUMFMT_ENDTABLE() 1349cdf0e10cSrcweir }; 1350cdf0e10cSrcweir 1351cdf0e10cSrcweir /** Portugese, Brazil. */ 1352cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_pt_BR[] = 1353cdf0e10cSrcweir { 1354cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D/M/YYYY", "D", "/", "MMM", "/", "YY", "h", "hh" ), 1355cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"R$\"", " " ), 1356cdf0e10cSrcweir NUMFMT_ENDTABLE() 1357cdf0e10cSrcweir }; 1358cdf0e10cSrcweir 1359cdf0e10cSrcweir /** Portugese, Portugal. */ 1360cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_pt_PT[] = 1361cdf0e10cSrcweir { 1362cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 1363cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, " " ), 1364cdf0e10cSrcweir NUMFMT_ENDTABLE() 1365cdf0e10cSrcweir }; 1366cdf0e10cSrcweir 1367cdf0e10cSrcweir /** Romanian, Romania. */ 1368cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ro_RO[] = 1369cdf0e10cSrcweir { 1370cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted (but see #i75367#) 1371cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "hh" ), 1372cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"lei\"", "_l_e_i", "\\ " ), 1373cdf0e10cSrcweir NUMFMT_ENDTABLE() 1374cdf0e10cSrcweir }; 1375cdf0e10cSrcweir 1376cdf0e10cSrcweir /** Russian, Russian Federation. */ 1377cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ru_RU[] = 1378cdf0e10cSrcweir { 1379cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1380cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "h" ), 1381cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"" UTF8_CYR_R_LC ".\"", "_" UTF8_CYR_R_LC "_.", "" ), 1382cdf0e10cSrcweir NUMFMT_ENDTABLE() 1383cdf0e10cSrcweir }; 1384cdf0e10cSrcweir 1385cdf0e10cSrcweir /** Slovak, Slovakia. */ 1386cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_sk_SK[] = 1387cdf0e10cSrcweir { 1388cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1389cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D.M.YYYY", "D", ".", "MMM", ".", "YY", "h", "h" ), 1390cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"Sk\"", "_S_k", "\\ " ), 1391cdf0e10cSrcweir NUMFMT_ENDTABLE() 1392cdf0e10cSrcweir }; 1393cdf0e10cSrcweir 1394cdf0e10cSrcweir /** Slovenian, Slovenia. */ 1395cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_sl_SI[] = 1396cdf0e10cSrcweir { 1397cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D.M.YYYY", "D", ".", "MMM", ".", "YY", "h", "h" ), 1398cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"SIT\"", "_S_I_T", " " ), 1399cdf0e10cSrcweir NUMFMT_ENDTABLE() 1400cdf0e10cSrcweir }; 1401cdf0e10cSrcweir 1402cdf0e10cSrcweir /** Swedish, Finland. */ 1403cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_sv_FI[] = 1404cdf0e10cSrcweir { 1405cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1406cdf0e10cSrcweir NUMFMT_STRING( 9, "0\\ %" ), 1407cdf0e10cSrcweir NUMFMT_STRING( 10, "0.00\\ %" ), 1408cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D.M.YYYY", "D", ".", "MMM", ".", "YY", "h", "hh" ), 1409cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_EURO, "_" UTF8_EURO, "\\ " ), 1410cdf0e10cSrcweir NUMFMT_ENDTABLE() 1411cdf0e10cSrcweir }; 1412cdf0e10cSrcweir 1413cdf0e10cSrcweir /** Swedish, Sweden. */ 1414cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_sv_SE[] = 1415cdf0e10cSrcweir { 1416cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1417cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY-MM-DD", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1418cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"kr\"", "_k_r", "\\ " ), 1419cdf0e10cSrcweir NUMFMT_ENDTABLE() 1420cdf0e10cSrcweir }; 1421cdf0e10cSrcweir 1422cdf0e10cSrcweir /** Swahili, Tanzania. */ 1423cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_sw_TZ[] = 1424cdf0e10cSrcweir { 1425cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "M/D/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 1426cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\\S", "" ), 1427cdf0e10cSrcweir NUMFMT_ENDTABLE() 1428cdf0e10cSrcweir }; 1429cdf0e10cSrcweir 1430cdf0e10cSrcweir /** Tamil, India. */ 1431cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ta_IN[] = 1432cdf0e10cSrcweir { 1433cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YYYY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1434cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"" UTF8_CURR_TA_IN "\"", " " ), 1435cdf0e10cSrcweir NUMFMT_ENDTABLE() 1436cdf0e10cSrcweir }; 1437cdf0e10cSrcweir 1438cdf0e10cSrcweir /** Telugu, India. */ 1439cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_te_IN[] = 1440cdf0e10cSrcweir { 1441cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD-MM-YY", "DD", "-", "MMM", "-", "YY", "h", "hh" ), 1442cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( "\"" UTF8_CURR_TE_IN "\"", " " ), 1443cdf0e10cSrcweir NUMFMT_ENDTABLE() 1444cdf0e10cSrcweir }; 1445cdf0e10cSrcweir 1446cdf0e10cSrcweir /** Thai, Thailand. */ 1447cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_th_TH[] = 1448cdf0e10cSrcweir { 1449cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D/M/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 1450cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( UTF8_BAHT, "" ), 1451cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_SYMBOL_NUMBER_CLOSE( 63, UTF8_BAHT, "", "t" ), 1452cdf0e10cSrcweir NUMFMT_STRING( 59, "t0" ), 1453cdf0e10cSrcweir NUMFMT_STRING( 60, "t0.00" ), 1454cdf0e10cSrcweir NUMFMT_STRING( 61, "t#,##0" ), 1455cdf0e10cSrcweir NUMFMT_STRING( 62, "t#,##0.00" ), 1456cdf0e10cSrcweir NUMFMT_STRING( 67, "t0%" ), 1457cdf0e10cSrcweir NUMFMT_STRING( 68, "t0.00%" ), 1458cdf0e10cSrcweir NUMFMT_STRING( 69, "t# ?/?" ), 1459cdf0e10cSrcweir NUMFMT_STRING( 70, "t# ?\?/?\?" ), 1460cdf0e10cSrcweir NUMFMT_STRING( 71, "tD/M/EE" ), 1461cdf0e10cSrcweir NUMFMT_STRING( 72, "tD-MMM-E" ), 1462cdf0e10cSrcweir NUMFMT_STRING( 73, "tD-MMM" ), 1463cdf0e10cSrcweir NUMFMT_STRING( 74, "tMMM-E" ), 1464cdf0e10cSrcweir NUMFMT_STRING( 75, "th:mm" ), 1465cdf0e10cSrcweir NUMFMT_STRING( 76, "th:mm:ss" ), 1466cdf0e10cSrcweir NUMFMT_STRING( 77, "tD/M/EE h:mm" ), 1467cdf0e10cSrcweir NUMFMT_STRING( 78, "tmm:ss" ), 1468cdf0e10cSrcweir NUMFMT_STRING( 79, "t[h]:mm:ss" ), 1469cdf0e10cSrcweir NUMFMT_STRING( 80, "tmm:ss.0" ), 1470cdf0e10cSrcweir NUMFMT_STRING( 81, "D/M/E" ), 1471cdf0e10cSrcweir NUMFMT_ENDTABLE() 1472cdf0e10cSrcweir }; 1473cdf0e10cSrcweir 1474cdf0e10cSrcweir /** Turkish, Turkey. */ 1475cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_tr_TR[] = 1476cdf0e10cSrcweir { 1477cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "hh" ), 1478cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"TL\"", "_T_L", " " ), 1479cdf0e10cSrcweir NUMFMT_ENDTABLE() 1480cdf0e10cSrcweir }; 1481cdf0e10cSrcweir 1482cdf0e10cSrcweir /** Tatar, Russian Federation. */ 1483cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_tt_RU[] = 1484cdf0e10cSrcweir { 1485cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1486cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "h" ), 1487cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"" UTF8_CYR_R_LC ".\"", "_" UTF8_CYR_R_LC "_.", "\\ " ), 1488cdf0e10cSrcweir NUMFMT_ENDTABLE() 1489cdf0e10cSrcweir }; 1490cdf0e10cSrcweir 1491cdf0e10cSrcweir /** Ukrainian, Ukraine. */ 1492cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_uk_UA[] = 1493cdf0e10cSrcweir { 1494cdf0e10cSrcweir // space character is group separator, literal spaces must be quoted 1495cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD.MM.YYYY", "DD", ".", "MMM", ".", "YY", "h", "h" ), 1496cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( "\"" UTF8_CYR_G_LC UTF8_CYR_R_LC UTF8_CYR_N_LC ".\"", "_" UTF8_CYR_G_LC "_" UTF8_CYR_R_LC "_" UTF8_CYR_N_LC "_.", "\\ " ), 1497cdf0e10cSrcweir NUMFMT_ENDTABLE() 1498cdf0e10cSrcweir }; 1499cdf0e10cSrcweir 1500cdf0e10cSrcweir /** Urdu, Pakistan. */ 1501cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ur_PK[] = 1502cdf0e10cSrcweir { 1503cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 1504cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_NUMBER_MINUS( "\"Rs\"", "" ), 1505cdf0e10cSrcweir NUMFMT_ENDTABLE() 1506cdf0e10cSrcweir }; 1507cdf0e10cSrcweir 1508cdf0e10cSrcweir /** Vietnamese, Viet Nam. */ 1509cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_vi_VN[] = 1510cdf0e10cSrcweir { 1511cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "DD/MM/YYYY", "DD", "-", "MMM", "-", "YY", "h", "h" ), 1512cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_NUMBER_SYMBOL( UTF8_DONG, "_" UTF8_DONG, " " ), 1513cdf0e10cSrcweir NUMFMT_ENDTABLE() 1514cdf0e10cSrcweir }; 1515cdf0e10cSrcweir 1516cdf0e10cSrcweir // CJK ------------------------------------------------------------------------ 1517cdf0e10cSrcweir 1518cdf0e10cSrcweir /** Base table for CJK locales. */ 1519cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_CJK[] = 1520cdf0e10cSrcweir { 1521cdf0e10cSrcweir NUMFMT_REUSE( 29, 28 ), 1522cdf0e10cSrcweir NUMFMT_REUSE( 36, 27 ), 1523cdf0e10cSrcweir NUMFMT_REUSE( 50, 27 ), 1524cdf0e10cSrcweir NUMFMT_REUSE( 51, 28 ), 1525cdf0e10cSrcweir NUMFMT_REUSE( 52, 34 ), 1526cdf0e10cSrcweir NUMFMT_REUSE( 53, 35 ), 1527cdf0e10cSrcweir NUMFMT_REUSE( 54, 28 ), 1528cdf0e10cSrcweir NUMFMT_REUSE( 55, 34 ), 1529cdf0e10cSrcweir NUMFMT_REUSE( 56, 35 ), 1530cdf0e10cSrcweir NUMFMT_REUSE( 57, 27 ), 1531cdf0e10cSrcweir NUMFMT_REUSE( 58, 28 ), 1532cdf0e10cSrcweir NUMFMT_ENDTABLE() 1533cdf0e10cSrcweir }; 1534cdf0e10cSrcweir 1535cdf0e10cSrcweir /** Japanese, Japan. */ 1536cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ja_JP[] = 1537cdf0e10cSrcweir { 1538cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY/MM/DD", "DD", "-", "MMM", "-", "YY", "h", "h" ), 1539cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( UTF8_YEN_JP, "" ), 1540cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_SYMBOL_NUMBER_CLOSE( 23, "$", "", "" ), 1541cdf0e10cSrcweir NUMFMT_STRING( 27, "[$-411]GE.MM.DD" ), 1542cdf0e10cSrcweir NUMFMT_STRING( 28, "[$-411]GGGE\"" UTF8_CJ_YEAR "\"MM\"" UTF8_CJ_MON "\"DD\"" UTF8_CJ_DAY "\"" ), 1543cdf0e10cSrcweir NUMFMT_STRING( 30, "MM/DD/YY" ), 1544cdf0e10cSrcweir NUMFMT_STRING( 31, "YYYY\"" UTF8_CJ_YEAR "\"MM\"" UTF8_CJ_MON "\"DD\"" UTF8_CJ_DAY "\"" ), 1545cdf0e10cSrcweir NUMFMT_TIME_CJK( 32, "h", UTF8_CJ_HOUR, UTF8_CJ_MIN, UTF8_CJ_SEC ), 1546cdf0e10cSrcweir NUMFMT_STRING( 34, "YYYY\"" UTF8_CJ_YEAR "\"MM\"" UTF8_CJ_MON "\"" ), 1547cdf0e10cSrcweir NUMFMT_STRING( 35, "MM\"" UTF8_CJ_MON "\"DD\"" UTF8_CJ_DAY "\"" ), 1548cdf0e10cSrcweir NUMFMT_ENDTABLE() 1549cdf0e10cSrcweir }; 1550cdf0e10cSrcweir 1551cdf0e10cSrcweir /** Korean, South Korea. */ 1552cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_ko_KR[] = 1553cdf0e10cSrcweir { 1554cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY-MM-DD", "DD", "-", "MMM", "-", "YY", "h", "h" ), 1555cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( UTF8_WON, "" ), 1556cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_SYMBOL_NUMBER_CLOSE( 23, "$", "", "" ), 1557cdf0e10cSrcweir NUMFMT_STRING( 27, "YYYY" UTF8_CJ_YEAR " MM" UTF8_CJ_MON " DD" UTF8_CJ_DAY ), 1558cdf0e10cSrcweir NUMFMT_STRING( 28, "MM-DD" ), 1559cdf0e10cSrcweir NUMFMT_STRING( 30, "MM-DD-YY" ), 1560cdf0e10cSrcweir NUMFMT_STRING( 31, "YYYY" UTF8_KO_YEAR " MM" UTF8_KO_MON " DD" UTF8_KO_DAY ), 1561cdf0e10cSrcweir NUMFMT_TIME_CJK( 32, "h", UTF8_KO_HOUR, UTF8_KO_MIN, UTF8_KO_SEC ), 1562cdf0e10cSrcweir // slashes must be quoted to prevent conversion to minus 1563cdf0e10cSrcweir NUMFMT_STRING( 34, "YYYY\\/MM\\/DD" ), 1564cdf0e10cSrcweir NUMFMT_REUSE( 35, 14 ), 1565cdf0e10cSrcweir NUMFMT_ENDTABLE() 1566cdf0e10cSrcweir }; 1567cdf0e10cSrcweir 1568cdf0e10cSrcweir /** Chinese, China. */ 1569cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_zh_CN[] = 1570cdf0e10cSrcweir { 1571cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY-M-D", "D", "-", "MMM", "-", "YY", "h", "h" ), 1572cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_SYMBOL_MINUS_NUMBER( UTF8_YEN_CN, "" ), 1573cdf0e10cSrcweir NUMFMT_ALLTIMES_CJK( "h", "h", UTF8_CS_HOUR, UTF8_CS_MIN, UTF8_CS_SEC ), 1574cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_SYMBOL_NUMBER_CLOSE( 23, "$", "", "" ), 1575cdf0e10cSrcweir NUMFMT_STRING( 27, "YYYY\"" UTF8_CS_YEAR "\"M\"" UTF8_CS_MON "\"" ), 1576cdf0e10cSrcweir NUMFMT_STRING( 28, "M\"" UTF8_CS_MON "\"D\"" UTF8_CS_DAY "\"" ), 1577cdf0e10cSrcweir NUMFMT_STRING( 30, "M-D-YY" ), 1578cdf0e10cSrcweir NUMFMT_STRING( 31, "YYYY\"" UTF8_CS_YEAR "\"M\"" UTF8_CS_MON "\"D\"" UTF8_CS_DAY "\"" ), 1579cdf0e10cSrcweir NUMFMT_REUSE( 52, 27 ), 1580cdf0e10cSrcweir NUMFMT_REUSE( 53, 28 ), 1581cdf0e10cSrcweir NUMFMT_ENDTABLE() 1582cdf0e10cSrcweir }; 1583cdf0e10cSrcweir 1584cdf0e10cSrcweir /** Chinese, Hong Kong. */ 1585cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_zh_HK[] = 1586cdf0e10cSrcweir { 1587cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D/M/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 1588cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\"HK$\"", "" ), 1589cdf0e10cSrcweir NUMFMT_ALLTIMES_CJK( "h", "h", UTF8_CJ_HOUR, UTF8_CJ_MIN, UTF8_CJ_SEC ), 1590cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_SYMBOL_NUMBER_CLOSE( 23, "\"US$\"", "", "" ), 1591cdf0e10cSrcweir NUMFMT_STRING( 27, "[$-404]D/M/E" ), 1592cdf0e10cSrcweir NUMFMT_STRING( 28, "[$-404]D\"" UTF8_CJ_DAY "\"M\"" UTF8_CJ_MON "\"E\"" UTF8_CJ_YEAR "\"" ), 1593cdf0e10cSrcweir NUMFMT_STRING( 30, "M/D/YY" ), 1594cdf0e10cSrcweir NUMFMT_STRING( 31, "D\"" UTF8_CJ_DAY "\"M\"" UTF8_CJ_MON "\"YYYY\"" UTF8_CJ_YEAR "\"" ), 1595cdf0e10cSrcweir NUMFMT_ENDTABLE() 1596cdf0e10cSrcweir }; 1597cdf0e10cSrcweir 1598cdf0e10cSrcweir /** Chinese, Macau. */ 1599cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_zh_MO[] = 1600cdf0e10cSrcweir { 1601cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D/M/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 1602cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "\\P", "" ), 1603cdf0e10cSrcweir NUMFMT_ALLTIMES_CJK( "h", "h", UTF8_CJ_HOUR, UTF8_CJ_MIN, UTF8_CJ_SEC ), 1604cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_SYMBOL_NUMBER_CLOSE( 23, "\"US$\"", "", "" ), 1605cdf0e10cSrcweir NUMFMT_STRING( 27, "[$-404]D/M/E" ), 1606cdf0e10cSrcweir NUMFMT_STRING( 28, "[$-404]D\"" UTF8_CJ_DAY "\"M\"" UTF8_CJ_MON "\"E\"" UTF8_CJ_YEAR "\"" ), 1607cdf0e10cSrcweir NUMFMT_STRING( 30, "M/D/YY" ), 1608cdf0e10cSrcweir NUMFMT_STRING( 31, "D\"" UTF8_CJ_DAY "\"M\"" UTF8_CJ_MON "\"YYYY\"" UTF8_CJ_YEAR "\"" ), 1609cdf0e10cSrcweir NUMFMT_ENDTABLE() 1610cdf0e10cSrcweir }; 1611cdf0e10cSrcweir 1612cdf0e10cSrcweir /** Chinese, Singapore. */ 1613cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_zh_SG[] = 1614cdf0e10cSrcweir { 1615cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "D/M/YYYY", "D", "-", "MMM", "-", "YY", "h", "h" ), 1616cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_OPEN_SYMBOL_NUMBER_CLOSE( "$", "" ), 1617cdf0e10cSrcweir NUMFMT_ALLTIMES_CJK( "h", "h", UTF8_CS_HOUR, UTF8_CS_MIN, UTF8_CS_SEC ), 1618cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_SYMBOL_NUMBER_CLOSE( 23, "$", "", "" ), 1619cdf0e10cSrcweir NUMFMT_STRING( 27, "YYYY\"" UTF8_CS_YEAR "\"M\"" UTF8_CS_MON "\"" ), 1620cdf0e10cSrcweir NUMFMT_STRING( 28, "M\"" UTF8_CS_MON "\"D\"" UTF8_CS_DAY "\"" ), 1621cdf0e10cSrcweir NUMFMT_STRING( 30, "M/D/YY" ), 1622cdf0e10cSrcweir NUMFMT_STRING( 31, "D\"" UTF8_CS_DAY "\"M\"" UTF8_CS_MON "\"YYYY\"" UTF8_CS_YEAR "\"" ), 1623cdf0e10cSrcweir NUMFMT_ENDTABLE() 1624cdf0e10cSrcweir }; 1625cdf0e10cSrcweir 1626cdf0e10cSrcweir /** Chinese, Taiwan. */ 1627cdf0e10cSrcweir static const BuiltinFormat spBuiltinFormats_zh_TW[] = 1628cdf0e10cSrcweir { 1629cdf0e10cSrcweir NUMFMT_ALLDATETIMES( "YYYY/M/D", "D", "-", "MMM", "-", "YY", "hh", "hh" ), 1630cdf0e10cSrcweir NUMFMT_ALLCURRENCIES_MINUS_SYMBOL_NUMBER( "$", "" ), 1631cdf0e10cSrcweir NUMFMT_ALLTIMES_CJK( "hh", "hh", UTF8_CJ_HOUR, UTF8_CJ_MIN, UTF8_CJ_SEC ), 1632cdf0e10cSrcweir NUMFMT_CURRENCY_OPEN_SYMBOL_NUMBER_CLOSE( 23, "\"US$\"", "", "" ), 1633cdf0e10cSrcweir NUMFMT_STRING( 27, "[$-404]E/M/D" ), 1634cdf0e10cSrcweir NUMFMT_STRING( 28, "[$-404]E\"" UTF8_CJ_YEAR "\"M\"" UTF8_CJ_MON "\"D\"" UTF8_CJ_DAY "\"" ), 1635cdf0e10cSrcweir NUMFMT_STRING( 30, "M/D/YY" ), 1636cdf0e10cSrcweir NUMFMT_STRING( 31, "YYYY\"" UTF8_CJ_YEAR "\"M\"" UTF8_CJ_MON "\"D\"" UTF8_CJ_DAY "\"" ), 1637cdf0e10cSrcweir NUMFMT_ENDTABLE() 1638cdf0e10cSrcweir }; 1639cdf0e10cSrcweir 1640cdf0e10cSrcweir // ---------------------------------------------------------------------------- 1641cdf0e10cSrcweir 1642cdf0e10cSrcweir /** Specifies a built-in number format table for a specific locale. */ 1643cdf0e10cSrcweir struct BuiltinFormatTable 1644cdf0e10cSrcweir { 1645cdf0e10cSrcweir const sal_Char* mpcLocale; /// The locale for this table. 1646cdf0e10cSrcweir const sal_Char* mpcParent; /// The locale of the parent table. 1647cdf0e10cSrcweir const BuiltinFormat* mpFormats; /// The number format table (may be 0, if equal to parent). 1648cdf0e10cSrcweir }; 1649cdf0e10cSrcweir 1650cdf0e10cSrcweir static const BuiltinFormatTable spBuiltinFormatTables[] = 1651cdf0e10cSrcweir { // locale parent format table 1652cdf0e10cSrcweir { "*", "", spBuiltinFormats_BASE }, // Base table 1653cdf0e10cSrcweir { "af-ZA", "*", spBuiltinFormats_en_ZA }, // Afrikaans, South Africa 1654cdf0e10cSrcweir { "ar-AE", "*", spBuiltinFormats_ar_AE }, // Arabic, U.A.E. 1655cdf0e10cSrcweir { "ar-BH", "*", spBuiltinFormats_ar_BH }, // Arabic, Bahrain 1656cdf0e10cSrcweir { "ar-DZ", "*", spBuiltinFormats_ar_DZ }, // Arabic, Algeria 1657cdf0e10cSrcweir { "ar-EG", "*", spBuiltinFormats_ar_EG }, // Arabic, Egypt 1658cdf0e10cSrcweir { "ar-IQ", "*", spBuiltinFormats_ar_IQ }, // Arabic, Iraq 1659cdf0e10cSrcweir { "ar-JO", "*", spBuiltinFormats_ar_JO }, // Arabic, Jordan 1660cdf0e10cSrcweir { "ar-KW", "*", spBuiltinFormats_ar_KW }, // Arabic, Kuwait 1661cdf0e10cSrcweir { "ar-LB", "*", spBuiltinFormats_ar_LB }, // Arabic, Lebanon 1662cdf0e10cSrcweir { "ar-LY", "*", spBuiltinFormats_ar_LY }, // Arabic, Libya 1663cdf0e10cSrcweir { "ar-MA", "*", spBuiltinFormats_ar_MA }, // Arabic, Morocco 1664cdf0e10cSrcweir { "ar-OM", "*", spBuiltinFormats_ar_OM }, // Arabic, Oman 1665cdf0e10cSrcweir { "ar-QA", "*", spBuiltinFormats_ar_QA }, // Arabic, Qatar 1666cdf0e10cSrcweir { "ar-SA", "*", spBuiltinFormats_ar_SA }, // Arabic, Saudi Arabia 1667cdf0e10cSrcweir { "ar-SY", "*", spBuiltinFormats_ar_SY }, // Arabic, Syria 1668cdf0e10cSrcweir { "ar-TN", "*", spBuiltinFormats_ar_TN }, // Arabic, Tunisia 1669cdf0e10cSrcweir { "ar-YE", "*", spBuiltinFormats_ar_YE }, // Arabic, Yemen 1670cdf0e10cSrcweir { "be-BY", "*", spBuiltinFormats_be_BY }, // Belarusian, Belarus 1671cdf0e10cSrcweir { "bg-BG", "*", spBuiltinFormats_bg_BG }, // Bulgarian, Bulgaria 1672cdf0e10cSrcweir { "bn-IN", "*", spBuiltinFormats_bn_IN }, // Bengali, India 1673cdf0e10cSrcweir { "ca-ES", "*", spBuiltinFormats_es_ES }, // Catalan, Spain 1674cdf0e10cSrcweir { "cs-CZ", "*", spBuiltinFormats_cs_CZ }, // Czech, Czech Republic 1675cdf0e10cSrcweir { "cy-GB", "*", spBuiltinFormats_en_GB }, // Welsh, United Kingdom 1676cdf0e10cSrcweir { "da-DK", "*", spBuiltinFormats_da_DK }, // Danish, Denmark 1677cdf0e10cSrcweir { "de-AT", "*", spBuiltinFormats_de_AT }, // German, Austria 1678cdf0e10cSrcweir { "de-CH", "*", spBuiltinFormats_de_CH }, // German, Switzerland 1679cdf0e10cSrcweir { "de-DE", "*", spBuiltinFormats_de_DE }, // German, Germany 1680cdf0e10cSrcweir { "de-LI", "*", spBuiltinFormats_de_LI }, // German, Liechtenstein 1681cdf0e10cSrcweir { "de-LU", "*", spBuiltinFormats_de_LU }, // German, Luxembourg 1682cdf0e10cSrcweir { "div-MV", "*", spBuiltinFormats_div_MV }, // Divehi, Maldives 1683cdf0e10cSrcweir { "el-GR", "*", spBuiltinFormats_el_GR }, // Greek, Greece 1684cdf0e10cSrcweir { "en-AU", "*", spBuiltinFormats_en_AU }, // English, Australia 1685cdf0e10cSrcweir { "en-BZ", "*", spBuiltinFormats_en_BZ }, // English, Belize 1686cdf0e10cSrcweir { "en-CA", "*", spBuiltinFormats_en_CA }, // English, Canada 1687cdf0e10cSrcweir { "en-CB", "*", spBuiltinFormats_en_CB }, // English, Caribbean 1688cdf0e10cSrcweir { "en-GB", "*", spBuiltinFormats_en_GB }, // English, United Kingdom 1689cdf0e10cSrcweir { "en-IE", "*", spBuiltinFormats_en_IE }, // English, Ireland 1690cdf0e10cSrcweir { "en-JM", "*", spBuiltinFormats_en_JM }, // English, Jamaica 1691cdf0e10cSrcweir { "en-NZ", "*", spBuiltinFormats_en_NZ }, // English, New Zealand 1692cdf0e10cSrcweir { "en-PH", "*", spBuiltinFormats_en_PH }, // English, Philippines 1693cdf0e10cSrcweir { "en-TT", "*", spBuiltinFormats_en_TT }, // English, Trinidad and Tobago 1694cdf0e10cSrcweir { "en-US", "*", spBuiltinFormats_en_US }, // English, USA 1695cdf0e10cSrcweir { "en-ZA", "*", spBuiltinFormats_en_ZA }, // English, South Africa 1696cdf0e10cSrcweir { "en-ZW", "*", spBuiltinFormats_en_ZW }, // English, Zimbabwe 1697cdf0e10cSrcweir { "es-AR", "*", spBuiltinFormats_es_AR }, // Spanish, Argentina 1698cdf0e10cSrcweir { "es-BO", "*", spBuiltinFormats_es_BO }, // Spanish, Bolivia 1699cdf0e10cSrcweir { "es-CL", "*", spBuiltinFormats_es_CL }, // Spanish, Chile 1700cdf0e10cSrcweir { "es-CO", "*", spBuiltinFormats_es_CO }, // Spanish, Colombia 1701cdf0e10cSrcweir { "es-CR", "*", spBuiltinFormats_es_CR }, // Spanish, Costa Rica 1702cdf0e10cSrcweir { "es-DO", "*", spBuiltinFormats_es_DO }, // Spanish, Dominican Republic 1703cdf0e10cSrcweir { "es-EC", "*", spBuiltinFormats_es_EC }, // Spanish, Ecuador 1704cdf0e10cSrcweir { "es-ES", "*", spBuiltinFormats_es_ES }, // Spanish, Spain 1705cdf0e10cSrcweir { "es-GT", "*", spBuiltinFormats_es_GT }, // Spanish, Guatemala 1706cdf0e10cSrcweir { "es-HN", "*", spBuiltinFormats_es_HN }, // Spanish, Honduras 1707cdf0e10cSrcweir { "es-MX", "*", spBuiltinFormats_es_MX }, // Spanish, Mexico 1708cdf0e10cSrcweir { "es-NI", "*", spBuiltinFormats_es_NI }, // Spanish, Nicaragua 1709cdf0e10cSrcweir { "es-PA", "*", spBuiltinFormats_es_PA }, // Spanish, Panama 1710cdf0e10cSrcweir { "es-PE", "*", spBuiltinFormats_es_PE }, // Spanish, Peru 1711cdf0e10cSrcweir { "es-PR", "*", spBuiltinFormats_es_PR }, // Spanish, Puerto Rico 1712cdf0e10cSrcweir { "es-PY", "*", spBuiltinFormats_es_PY }, // Spanish, Paraguay 1713cdf0e10cSrcweir { "es-SV", "*", spBuiltinFormats_es_SV }, // Spanish, El Salvador 1714cdf0e10cSrcweir { "es-UY", "*", spBuiltinFormats_es_UY }, // Spanish, Uruguay 1715cdf0e10cSrcweir { "es-VE", "*", spBuiltinFormats_es_VE }, // Spanish, Venezuela 1716cdf0e10cSrcweir { "et-EE", "*", spBuiltinFormats_et_EE }, // Estonian, Estonia 1717cdf0e10cSrcweir { "fa-IR", "*", spBuiltinFormats_fa_IR }, // Farsi, Iran 1718cdf0e10cSrcweir { "fi-FI", "*", spBuiltinFormats_fi_FI }, // Finnish, Finland 1719cdf0e10cSrcweir { "fo-FO", "*", spBuiltinFormats_fo_FO }, // Faroese, Faroe Islands 1720cdf0e10cSrcweir { "fr-BE", "*", spBuiltinFormats_fr_BE }, // French, Belgium 1721cdf0e10cSrcweir { "fr-CA", "*", spBuiltinFormats_fr_CA }, // French, Canada 1722cdf0e10cSrcweir { "fr-CH", "*", spBuiltinFormats_fr_CH }, // French, Switzerland 1723cdf0e10cSrcweir { "fr-FR", "*", spBuiltinFormats_fr_FR }, // French, France 1724cdf0e10cSrcweir { "fr-LU", "*", spBuiltinFormats_fr_LU }, // French, Luxembourg 1725cdf0e10cSrcweir { "fr-MC", "*", spBuiltinFormats_fr_MC }, // French, Monaco 1726cdf0e10cSrcweir { "gl-ES", "*", spBuiltinFormats_gl_ES }, // Galizian, Spain 1727cdf0e10cSrcweir { "gu-IN", "*", spBuiltinFormats_gu_IN }, // Gujarati, India 1728cdf0e10cSrcweir { "he-IL", "*", spBuiltinFormats_he_IL }, // Hebrew, Israel 1729cdf0e10cSrcweir { "hi-IN", "*", spBuiltinFormats_hi_IN }, // Hindi, India 1730cdf0e10cSrcweir { "hr-BA", "*", spBuiltinFormats_hr_BA }, // Croatian, Bosnia and Herzegowina 1731cdf0e10cSrcweir { "hr-HR", "*", spBuiltinFormats_hr_HR }, // Croatian, Croatia 1732cdf0e10cSrcweir { "hu-HU", "*", spBuiltinFormats_hu_HU }, // Hungarian, Hungary 1733cdf0e10cSrcweir { "hy-AM", "*", spBuiltinFormats_hy_AM }, // Armenian, Armenia 1734cdf0e10cSrcweir { "id-ID", "*", spBuiltinFormats_id_ID }, // Indonesian, Indonesia 1735cdf0e10cSrcweir { "is-IS", "*", spBuiltinFormats_is_IS }, // Icelandic, Iceland 1736cdf0e10cSrcweir { "it-CH", "*", spBuiltinFormats_it_CH }, // Italian, Switzerland 1737cdf0e10cSrcweir { "it-IT", "*", spBuiltinFormats_it_IT }, // Italian, Italy 1738cdf0e10cSrcweir { "ka-GE", "*", spBuiltinFormats_ka_GE }, // Georgian, Georgia 1739cdf0e10cSrcweir { "kk-KZ", "*", spBuiltinFormats_kk_KZ }, // Kazakh, Kazakhstan 1740cdf0e10cSrcweir { "kn-IN", "*", spBuiltinFormats_kn_IN }, // Kannada, India 1741cdf0e10cSrcweir { "kok-IN", "*", spBuiltinFormats_hi_IN }, // Konkani, India 1742cdf0e10cSrcweir { "ky-KG", "*", spBuiltinFormats_ky_KG }, // Kyrgyz, Kyrgyzstan 1743cdf0e10cSrcweir { "lt-LT", "*", spBuiltinFormats_lt_LT }, // Lithuanian, Lithuania 1744cdf0e10cSrcweir { "lv-LV", "*", spBuiltinFormats_lv_LV }, // Latvian, Latvia 1745cdf0e10cSrcweir { "mi-NZ", "*", spBuiltinFormats_en_NZ }, // Maori, New Zealand 1746cdf0e10cSrcweir { "ml-IN", "*", spBuiltinFormats_ml_IN }, // Malayalam, India 1747cdf0e10cSrcweir { "mn-MN", "*", spBuiltinFormats_mn_MN }, // Mongolian, Mongolia 1748cdf0e10cSrcweir { "mr-IN", "*", spBuiltinFormats_hi_IN }, // Marathi, India 1749cdf0e10cSrcweir { "ms-BN", "*", spBuiltinFormats_ms_BN }, // Malay, Brunei Darussalam 1750cdf0e10cSrcweir { "ms-MY", "*", spBuiltinFormats_ms_MY }, // Malay, Malaysia 1751cdf0e10cSrcweir { "mt-MT", "*", spBuiltinFormats_mt_MT }, // Maltese, Malta 1752cdf0e10cSrcweir { "nb-NO", "*", spBuiltinFormats_no_NO }, // Norwegian Bokmal, Norway 1753cdf0e10cSrcweir { "nl-BE", "*", spBuiltinFormats_nl_BE }, // Dutch, Belgium 1754cdf0e10cSrcweir { "nl-NL", "*", spBuiltinFormats_nl_NL }, // Dutch, Netherlands 1755cdf0e10cSrcweir { "nn-NO", "*", spBuiltinFormats_no_NO }, // Norwegian Nynorsk, Norway 1756cdf0e10cSrcweir { "nso-ZA", "*", spBuiltinFormats_en_ZA }, // Northern Sotho, South Africa 1757cdf0e10cSrcweir { "pa-IN", "*", spBuiltinFormats_pa_IN }, // Punjabi, India 1758cdf0e10cSrcweir { "pl-PL", "*", spBuiltinFormats_pl_PL }, // Polish, Poland 1759cdf0e10cSrcweir { "pt-BR", "*", spBuiltinFormats_pt_BR }, // Portugese, Brazil 1760cdf0e10cSrcweir { "pt-PT", "*", spBuiltinFormats_pt_PT }, // Portugese, Portugal 1761cdf0e10cSrcweir { "qu-BO", "*", spBuiltinFormats_es_BO }, // Quechua, Bolivia 1762cdf0e10cSrcweir { "qu-EC", "*", spBuiltinFormats_es_EC }, // Quechua, Ecuador 1763cdf0e10cSrcweir { "qu-PE", "*", spBuiltinFormats_es_PE }, // Quechua, Peru 1764cdf0e10cSrcweir { "ro-RO", "*", spBuiltinFormats_ro_RO }, // Romanian, Romania 1765cdf0e10cSrcweir { "ru-RU", "*", spBuiltinFormats_ru_RU }, // Russian, Russian Federation 1766cdf0e10cSrcweir { "sa-IN", "*", spBuiltinFormats_hi_IN }, // Sanskrit, India 1767cdf0e10cSrcweir { "se-FI", "*", spBuiltinFormats_fi_FI }, // Sami, Finland 1768cdf0e10cSrcweir { "se-NO", "*", spBuiltinFormats_no_NO }, // Sami, Norway 1769cdf0e10cSrcweir { "se-SE", "*", spBuiltinFormats_sv_SE }, // Sami, Sweden 1770cdf0e10cSrcweir { "sk-SK", "*", spBuiltinFormats_sk_SK }, // Slovak, Slovakia 1771cdf0e10cSrcweir { "sl-SI", "*", spBuiltinFormats_sl_SI }, // Slovenian, Slovenia 1772cdf0e10cSrcweir { "sv-FI", "*", spBuiltinFormats_sv_FI }, // Swedish, Finland 1773cdf0e10cSrcweir { "sv-SE", "*", spBuiltinFormats_sv_SE }, // Swedish, Sweden 1774cdf0e10cSrcweir { "sw-TZ", "*", spBuiltinFormats_sw_TZ }, // Swahili, Tanzania 1775cdf0e10cSrcweir { "syr-SY", "*", spBuiltinFormats_ar_SY }, // Syriac, Syria 1776cdf0e10cSrcweir { "syr-TR", "*", spBuiltinFormats_tr_TR }, // Syriac, Turkey 1777cdf0e10cSrcweir { "ta-IN", "*", spBuiltinFormats_ta_IN }, // Tamil, India 1778cdf0e10cSrcweir { "te-IN", "*", spBuiltinFormats_te_IN }, // Telugu, India 1779cdf0e10cSrcweir { "th-TH", "*", spBuiltinFormats_th_TH }, // Thai, Thailand 1780cdf0e10cSrcweir { "tn-ZA", "*", spBuiltinFormats_en_ZA }, // Tswana, South Africa 1781cdf0e10cSrcweir { "tr-TR", "*", spBuiltinFormats_tr_TR }, // Turkish, Turkey 1782cdf0e10cSrcweir { "tt-RU", "*", spBuiltinFormats_tt_RU }, // Tatar, Russian Federation 1783cdf0e10cSrcweir { "uk-UA", "*", spBuiltinFormats_uk_UA }, // Ukrainian, Ukraine 1784cdf0e10cSrcweir { "ur-PK", "*", spBuiltinFormats_ur_PK }, // Urdu, Pakistan 1785cdf0e10cSrcweir { "vi-VN", "*", spBuiltinFormats_vi_VN }, // Vietnamese, Viet Nam 1786cdf0e10cSrcweir { "xh-ZA", "*", spBuiltinFormats_en_ZA }, // Xhosa, South Africa 1787cdf0e10cSrcweir { "zu-ZA", "*", spBuiltinFormats_en_ZA }, // Zulu, South Africa 1788cdf0e10cSrcweir 1789cdf0e10cSrcweir { "*CJK", "*", spBuiltinFormats_CJK }, // CJK base table 1790cdf0e10cSrcweir { "ja-JP", "*CJK", spBuiltinFormats_ja_JP }, // Japanese, Japan 1791cdf0e10cSrcweir { "ko-KR", "*CJK", spBuiltinFormats_ko_KR }, // Korean, South Korea 1792cdf0e10cSrcweir { "zh-CN", "*CJK", spBuiltinFormats_zh_CN }, // Chinese, China 1793cdf0e10cSrcweir { "zh-HK", "*CJK", spBuiltinFormats_zh_HK }, // Chinese, Hong Kong 1794cdf0e10cSrcweir { "zh-MO", "*CJK", spBuiltinFormats_zh_MO }, // Chinese, Macau 1795cdf0e10cSrcweir { "zh-SG", "*CJK", spBuiltinFormats_zh_SG }, // Chinese, Singapore 1796cdf0e10cSrcweir { "zh-TW", "*CJK", spBuiltinFormats_zh_TW } // Chinese, Taiwan 1797cdf0e10cSrcweir }; 1798cdf0e10cSrcweir 1799cdf0e10cSrcweir } // namespace 1800cdf0e10cSrcweir 1801cdf0e10cSrcweir // ============================================================================ 1802cdf0e10cSrcweir 1803cdf0e10cSrcweir NumFmtModel::NumFmtModel() : 1804cdf0e10cSrcweir mnPredefId( -1 ) 1805cdf0e10cSrcweir { 1806cdf0e10cSrcweir } 1807cdf0e10cSrcweir 1808cdf0e10cSrcweir // ---------------------------------------------------------------------------- 1809cdf0e10cSrcweir 1810cdf0e10cSrcweir ApiNumFmtData::ApiNumFmtData() : 1811cdf0e10cSrcweir mnIndex( 0 ) 1812cdf0e10cSrcweir { 1813cdf0e10cSrcweir } 1814cdf0e10cSrcweir 1815cdf0e10cSrcweir // ---------------------------------------------------------------------------- 1816cdf0e10cSrcweir 1817cdf0e10cSrcweir namespace { 1818cdf0e10cSrcweir 1819cdf0e10cSrcweir sal_Int32 lclCreatePredefinedFormat( const Reference< XNumberFormats >& rxNumFmts, 1820cdf0e10cSrcweir sal_Int16 nPredefId, const Locale& rToLocale ) 1821cdf0e10cSrcweir { 1822cdf0e10cSrcweir sal_Int32 nIndex = 0; 1823cdf0e10cSrcweir try 1824cdf0e10cSrcweir { 1825cdf0e10cSrcweir Reference< XNumberFormatTypes > xNumFmtTypes( rxNumFmts, UNO_QUERY_THROW ); 1826cdf0e10cSrcweir nIndex = (nPredefId >= 0) ? 1827cdf0e10cSrcweir xNumFmtTypes->getFormatIndex( nPredefId, rToLocale ) : 1828cdf0e10cSrcweir xNumFmtTypes->getStandardIndex( rToLocale ); 1829cdf0e10cSrcweir } 1830cdf0e10cSrcweir catch( Exception& ) 1831cdf0e10cSrcweir { 1832cdf0e10cSrcweir OSL_ENSURE( false, 1833cdf0e10cSrcweir OStringBuffer( "lclCreatePredefinedFormat - cannot create predefined number format " ). 1834cdf0e10cSrcweir append( OString::valueOf( static_cast< sal_Int32 >( nPredefId ) ) ).getStr() ); 1835cdf0e10cSrcweir } 1836cdf0e10cSrcweir return nIndex; 1837cdf0e10cSrcweir } 1838cdf0e10cSrcweir 1839cdf0e10cSrcweir sal_Int32 lclCreateFormat( const Reference< XNumberFormats >& rxNumFmts, 1840cdf0e10cSrcweir const OUString& rFmtCode, const Locale& rToLocale, const Locale& rFromLocale ) 1841cdf0e10cSrcweir { 1842cdf0e10cSrcweir sal_Int32 nIndex = 0; 1843cdf0e10cSrcweir try 1844cdf0e10cSrcweir { 1845cdf0e10cSrcweir nIndex = rxNumFmts->addNewConverted( rFmtCode, rFromLocale, rToLocale ); 1846cdf0e10cSrcweir } 1847cdf0e10cSrcweir catch( Exception& ) 1848cdf0e10cSrcweir { 1849cdf0e10cSrcweir // BIFF2-BIFF4 stores standard format explicitly in stream 1850cdf0e10cSrcweir if( rFmtCode.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "general" ) ) ) 1851cdf0e10cSrcweir { 1852cdf0e10cSrcweir nIndex = lclCreatePredefinedFormat( rxNumFmts, 0, rToLocale ); 1853cdf0e10cSrcweir } 1854cdf0e10cSrcweir else 1855cdf0e10cSrcweir { 1856cdf0e10cSrcweir // do not assert fractional number formats with fixed denominator 1857cdf0e10cSrcweir OSL_ENSURE( rFmtCode.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "#\\ ?/" ) ) || 1858cdf0e10cSrcweir rFmtCode.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "#\\ ?\?/" ) ) || 1859cdf0e10cSrcweir rFmtCode.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "#\\ ?\?\?/" ) ), 1860cdf0e10cSrcweir OStringBuffer( "lclCreateFormat - cannot create number format '" ). 1861cdf0e10cSrcweir append( OUStringToOString( rFmtCode, osl_getThreadTextEncoding() ) ). 1862cdf0e10cSrcweir append( '\'' ).getStr() ); 1863cdf0e10cSrcweir } 1864cdf0e10cSrcweir } 1865cdf0e10cSrcweir return nIndex; 1866cdf0e10cSrcweir } 1867cdf0e10cSrcweir 1868cdf0e10cSrcweir // ---------------------------------------------------------------------------- 1869cdf0e10cSrcweir 1870cdf0e10cSrcweir /** Functor for converting an XML number format to an API number format index. */ 1871cdf0e10cSrcweir class NumberFormatFinalizer 1872cdf0e10cSrcweir { 1873cdf0e10cSrcweir public: 1874cdf0e10cSrcweir explicit NumberFormatFinalizer( const WorkbookHelper& rHelper ); 1875cdf0e10cSrcweir 1876cdf0e10cSrcweir inline bool is() const { return mxNumFmts.is(); } 1877cdf0e10cSrcweir 1878cdf0e10cSrcweir inline void operator()( NumberFormat& rNumFmt ) const 1879cdf0e10cSrcweir { rNumFmt.finalizeImport( mxNumFmts, maEnUsLocale ); } 1880cdf0e10cSrcweir 1881cdf0e10cSrcweir private: 1882cdf0e10cSrcweir Reference< XNumberFormats > mxNumFmts; 1883cdf0e10cSrcweir Locale maEnUsLocale; 1884cdf0e10cSrcweir }; 1885cdf0e10cSrcweir 1886cdf0e10cSrcweir NumberFormatFinalizer::NumberFormatFinalizer( const WorkbookHelper& rHelper ) : 1887cdf0e10cSrcweir maEnUsLocale( CREATE_OUSTRING( "en" ), CREATE_OUSTRING( "US" ), OUString() ) 1888cdf0e10cSrcweir { 1889cdf0e10cSrcweir try 1890cdf0e10cSrcweir { 1891cdf0e10cSrcweir Reference< XNumberFormatsSupplier > xNumFmtsSupp( rHelper.getDocument(), UNO_QUERY_THROW ); 1892cdf0e10cSrcweir mxNumFmts = xNumFmtsSupp->getNumberFormats(); 1893cdf0e10cSrcweir } 1894cdf0e10cSrcweir catch( Exception& ) 1895cdf0e10cSrcweir { 1896cdf0e10cSrcweir } 1897cdf0e10cSrcweir OSL_ENSURE( mxNumFmts.is(), "NumberFormatFinalizer::NumberFormatFinalizer - cannot get number formats" ); 1898cdf0e10cSrcweir } 1899cdf0e10cSrcweir 1900cdf0e10cSrcweir } // namespace 1901cdf0e10cSrcweir 1902cdf0e10cSrcweir // ---------------------------------------------------------------------------- 1903cdf0e10cSrcweir 1904cdf0e10cSrcweir NumberFormat::NumberFormat( const WorkbookHelper& rHelper ) : 1905cdf0e10cSrcweir WorkbookHelper( rHelper ) 1906cdf0e10cSrcweir { 1907cdf0e10cSrcweir } 1908cdf0e10cSrcweir 1909cdf0e10cSrcweir void NumberFormat::setFormatCode( const OUString& rFmtCode ) 1910cdf0e10cSrcweir { 1911cdf0e10cSrcweir maModel.maFmtCode = rFmtCode; 1912cdf0e10cSrcweir } 1913cdf0e10cSrcweir 1914cdf0e10cSrcweir void NumberFormat::setFormatCode( const Locale& rLocale, const sal_Char* pcFmtCode ) 1915cdf0e10cSrcweir { 1916cdf0e10cSrcweir maModel.maLocale = rLocale; 1917cdf0e10cSrcweir maModel.maFmtCode = OStringToOUString( OString( pcFmtCode ), RTL_TEXTENCODING_UTF8 ); 1918cdf0e10cSrcweir maModel.mnPredefId = -1; 1919cdf0e10cSrcweir } 1920cdf0e10cSrcweir 1921cdf0e10cSrcweir void NumberFormat::setPredefinedId( const Locale& rLocale, sal_Int16 nPredefId ) 1922cdf0e10cSrcweir { 1923cdf0e10cSrcweir maModel.maLocale = rLocale; 1924cdf0e10cSrcweir maModel.maFmtCode = OUString(); 1925cdf0e10cSrcweir maModel.mnPredefId = nPredefId; 1926cdf0e10cSrcweir } 1927cdf0e10cSrcweir 1928cdf0e10cSrcweir sal_Int32 NumberFormat::finalizeImport( const Reference< XNumberFormats >& rxNumFmts, const Locale& rFromLocale ) 1929cdf0e10cSrcweir { 1930cdf0e10cSrcweir if( rxNumFmts.is() && (maModel.maFmtCode.getLength() > 0) ) 1931cdf0e10cSrcweir maApiData.mnIndex = lclCreateFormat( rxNumFmts, maModel.maFmtCode, maModel.maLocale, rFromLocale ); 1932cdf0e10cSrcweir else 1933cdf0e10cSrcweir maApiData.mnIndex = lclCreatePredefinedFormat( rxNumFmts, maModel.mnPredefId, maModel.maLocale ); 1934cdf0e10cSrcweir return maApiData.mnIndex; 1935cdf0e10cSrcweir } 1936cdf0e10cSrcweir 1937cdf0e10cSrcweir void NumberFormat::writeToPropertyMap( PropertyMap& rPropMap ) const 1938cdf0e10cSrcweir { 1939cdf0e10cSrcweir rPropMap[ PROP_NumberFormat ] <<= maApiData.mnIndex; 1940cdf0e10cSrcweir } 1941cdf0e10cSrcweir 1942cdf0e10cSrcweir // ============================================================================ 1943cdf0e10cSrcweir 1944cdf0e10cSrcweir NumberFormatsBuffer::NumberFormatsBuffer( const WorkbookHelper& rHelper ) : 1945cdf0e10cSrcweir WorkbookHelper( rHelper ), 1946cdf0e10cSrcweir mnNextBiffIndex( 0 ) 1947cdf0e10cSrcweir { 1948cdf0e10cSrcweir // get the current locale 1949cdf0e10cSrcweir try 1950cdf0e10cSrcweir { 1951cdf0e10cSrcweir Reference< XMultiServiceFactory > xConfigProv( getBaseFilter().getServiceFactory()->createInstance( 1952cdf0e10cSrcweir CREATE_OUSTRING( "com.sun.star.configuration.ConfigurationProvider" ) ), UNO_QUERY_THROW ); 1953cdf0e10cSrcweir 1954cdf0e10cSrcweir // try user-defined locale setting 1955cdf0e10cSrcweir Sequence< Any > aArgs( 1 ); 1956cdf0e10cSrcweir aArgs[ 0 ] <<= CREATE_OUSTRING( "org.openoffice.Setup/L10N/" ); 1957cdf0e10cSrcweir Reference< XNameAccess > xConfigNA( xConfigProv->createInstanceWithArguments( 1958cdf0e10cSrcweir CREATE_OUSTRING( "com.sun.star.configuration.ConfigurationAccess" ), aArgs ), UNO_QUERY_THROW ); 1959cdf0e10cSrcweir xConfigNA->getByName( CREATE_OUSTRING( "ooSetupSystemLocale" ) ) >>= maLocaleStr; 1960cdf0e10cSrcweir 1961cdf0e10cSrcweir // if set to "use system", get locale from system 1962cdf0e10cSrcweir if( maLocaleStr.getLength() == 0 ) 1963cdf0e10cSrcweir { 1964cdf0e10cSrcweir aArgs[ 0 ] <<= CREATE_OUSTRING( "org.openoffice.System/L10N/" ); 1965cdf0e10cSrcweir xConfigNA.set( xConfigProv->createInstanceWithArguments( 1966cdf0e10cSrcweir CREATE_OUSTRING( "com.sun.star.configuration.ConfigurationAccess" ), aArgs ), UNO_QUERY_THROW ); 1967cdf0e10cSrcweir xConfigNA->getByName( CREATE_OUSTRING( "Locale" ) ) >>= maLocaleStr; 1968cdf0e10cSrcweir } 1969cdf0e10cSrcweir } 1970cdf0e10cSrcweir catch( Exception& ) 1971cdf0e10cSrcweir { 1972cdf0e10cSrcweir OSL_ENSURE( false, "NumberFormatsBuffer::NumberFormatsBuffer - cannot get system locale" ); 1973cdf0e10cSrcweir } 1974cdf0e10cSrcweir 1975cdf0e10cSrcweir // create built-in formats for current locale 1976cdf0e10cSrcweir insertBuiltinFormats(); 1977cdf0e10cSrcweir } 1978cdf0e10cSrcweir 1979cdf0e10cSrcweir NumberFormatRef NumberFormatsBuffer::createNumFmt( sal_Int32 nNumFmtId, const OUString& rFmtCode ) 1980cdf0e10cSrcweir { 1981cdf0e10cSrcweir NumberFormatRef xNumFmt; 1982cdf0e10cSrcweir if( nNumFmtId >= 0 ) 1983cdf0e10cSrcweir { 1984cdf0e10cSrcweir xNumFmt.reset( new NumberFormat( *this ) ); 1985cdf0e10cSrcweir maNumFmts[ nNumFmtId ] = xNumFmt; 1986cdf0e10cSrcweir xNumFmt->setFormatCode( rFmtCode ); 1987cdf0e10cSrcweir } 1988cdf0e10cSrcweir return xNumFmt; 1989cdf0e10cSrcweir } 1990cdf0e10cSrcweir 1991cdf0e10cSrcweir NumberFormatRef NumberFormatsBuffer::importNumFmt( const AttributeList& rAttribs ) 1992cdf0e10cSrcweir { 1993cdf0e10cSrcweir sal_Int32 nNumFmtId = rAttribs.getInteger( XML_numFmtId, -1 ); 1994cdf0e10cSrcweir OUString aFmtCode = rAttribs.getXString( XML_formatCode, OUString() ); 1995cdf0e10cSrcweir return createNumFmt( nNumFmtId, aFmtCode ); 1996cdf0e10cSrcweir } 1997cdf0e10cSrcweir 1998cdf0e10cSrcweir void NumberFormatsBuffer::importNumFmt( SequenceInputStream& rStrm ) 1999cdf0e10cSrcweir { 2000cdf0e10cSrcweir sal_Int32 nNumFmtId = rStrm.readuInt16(); 2001cdf0e10cSrcweir OUString aFmtCode = BiffHelper::readString( rStrm ); 2002cdf0e10cSrcweir createNumFmt( nNumFmtId, aFmtCode ); 2003cdf0e10cSrcweir } 2004cdf0e10cSrcweir 2005cdf0e10cSrcweir void NumberFormatsBuffer::importFormat( BiffInputStream& rStrm ) 2006cdf0e10cSrcweir { 2007cdf0e10cSrcweir OUString aFmtCode; 2008cdf0e10cSrcweir switch( getBiff() ) 2009cdf0e10cSrcweir { 2010cdf0e10cSrcweir case BIFF2: 2011cdf0e10cSrcweir case BIFF3: 2012cdf0e10cSrcweir aFmtCode = rStrm.readByteStringUC( false, getTextEncoding() ); 2013cdf0e10cSrcweir break; 2014cdf0e10cSrcweir case BIFF4: 2015cdf0e10cSrcweir rStrm.skip( 2 ); // in BIFF4 the index field exists, but is undefined 2016cdf0e10cSrcweir aFmtCode = rStrm.readByteStringUC( false, getTextEncoding() ); 2017cdf0e10cSrcweir break; 2018cdf0e10cSrcweir case BIFF5: 2019cdf0e10cSrcweir mnNextBiffIndex = rStrm.readuInt16(); 2020cdf0e10cSrcweir aFmtCode = rStrm.readByteStringUC( false, getTextEncoding() ); 2021cdf0e10cSrcweir break; 2022cdf0e10cSrcweir case BIFF8: 2023cdf0e10cSrcweir mnNextBiffIndex = rStrm.readuInt16(); 2024cdf0e10cSrcweir aFmtCode = rStrm.readUniString(); 2025cdf0e10cSrcweir break; 2026cdf0e10cSrcweir case BIFF_UNKNOWN: break; 2027cdf0e10cSrcweir } 2028cdf0e10cSrcweir 2029cdf0e10cSrcweir createNumFmt( mnNextBiffIndex, aFmtCode ); 2030cdf0e10cSrcweir ++mnNextBiffIndex; 2031cdf0e10cSrcweir } 2032cdf0e10cSrcweir 2033cdf0e10cSrcweir void NumberFormatsBuffer::finalizeImport() 2034cdf0e10cSrcweir { 2035cdf0e10cSrcweir maNumFmts.forEach( NumberFormatFinalizer( *this ) ); 2036cdf0e10cSrcweir } 2037cdf0e10cSrcweir 2038cdf0e10cSrcweir void NumberFormatsBuffer::writeToPropertyMap( PropertyMap& rPropMap, sal_Int32 nNumFmtId ) const 2039cdf0e10cSrcweir { 2040cdf0e10cSrcweir if( const NumberFormat* pNumFmt = maNumFmts.get( nNumFmtId ).get() ) 2041cdf0e10cSrcweir pNumFmt->writeToPropertyMap( rPropMap ); 2042cdf0e10cSrcweir } 2043cdf0e10cSrcweir 2044cdf0e10cSrcweir void NumberFormatsBuffer::insertBuiltinFormats() 2045cdf0e10cSrcweir { 2046cdf0e10cSrcweir // build a map containing pointers to all tables 2047cdf0e10cSrcweir typedef ::std::map< OUString, const BuiltinFormatTable* > BuiltinMap; 2048cdf0e10cSrcweir BuiltinMap aBuiltinMap; 2049cdf0e10cSrcweir for( const BuiltinFormatTable* pTable = spBuiltinFormatTables; 2050cdf0e10cSrcweir pTable != STATIC_ARRAY_END( spBuiltinFormatTables ); ++pTable ) 2051cdf0e10cSrcweir aBuiltinMap[ OUString::createFromAscii( pTable->mpcLocale ) ] = pTable; 2052cdf0e10cSrcweir 2053cdf0e10cSrcweir // convert locale string to locale struct 2054cdf0e10cSrcweir Locale aSysLocale; 2055cdf0e10cSrcweir sal_Int32 nDashPos = maLocaleStr.indexOf( '-' ); 2056cdf0e10cSrcweir if( nDashPos < 0 ) nDashPos = maLocaleStr.getLength(); 2057cdf0e10cSrcweir aSysLocale.Language = maLocaleStr.copy( 0, nDashPos ); 2058cdf0e10cSrcweir if( nDashPos + 1 < maLocaleStr.getLength() ) 2059cdf0e10cSrcweir aSysLocale.Country = maLocaleStr.copy( nDashPos + 1 ); 2060cdf0e10cSrcweir 2061cdf0e10cSrcweir // build a list of table pointers for the current locale, with all parent tables 2062cdf0e10cSrcweir typedef ::std::vector< const BuiltinFormatTable* > BuiltinVec; 2063cdf0e10cSrcweir BuiltinVec aBuiltinVec; 2064cdf0e10cSrcweir BuiltinMap::const_iterator aMIt = aBuiltinMap.find( maLocaleStr ), aMEnd = aBuiltinMap.end(); 2065cdf0e10cSrcweir OSL_ENSURE( aMIt != aMEnd, 2066cdf0e10cSrcweir OStringBuffer( "NumberFormatsBuffer::insertBuiltinFormats - locale '" ). 2067cdf0e10cSrcweir append( OUStringToOString( maLocaleStr, RTL_TEXTENCODING_ASCII_US ) ). 2068cdf0e10cSrcweir append( "' not supported (#i29949#)" ).getStr() ); 2069cdf0e10cSrcweir // start with default table, if no table has been found 2070cdf0e10cSrcweir if( aMIt == aMEnd ) 2071cdf0e10cSrcweir aMIt = aBuiltinMap.find( CREATE_OUSTRING( "*" ) ); 2072cdf0e10cSrcweir OSL_ENSURE( aMIt != aMEnd, "NumberFormatsBuffer::insertBuiltinFormats - default map not found" ); 2073cdf0e10cSrcweir // insert all tables into the vector 2074cdf0e10cSrcweir for( ; aMIt != aMEnd; aMIt = aBuiltinMap.find( OUString::createFromAscii( aMIt->second->mpcParent ) ) ) 2075cdf0e10cSrcweir aBuiltinVec.push_back( aMIt->second ); 2076cdf0e10cSrcweir 2077cdf0e10cSrcweir // insert the default formats in the format map (in reverse order from default table to system locale) 2078cdf0e10cSrcweir typedef ::std::map< sal_Int32, sal_Int32 > ReuseMap; 2079cdf0e10cSrcweir ReuseMap aReuseMap; 2080cdf0e10cSrcweir for( BuiltinVec::reverse_iterator aVIt = aBuiltinVec.rbegin(), aVEnd = aBuiltinVec.rend(); aVIt != aVEnd; ++aVIt ) 2081cdf0e10cSrcweir { 2082cdf0e10cSrcweir // do not put the current system locale for default table 2083cdf0e10cSrcweir Locale aLocale; 2084cdf0e10cSrcweir if( (*aVIt)->mpcLocale[ 0 ] != '\0' ) 2085cdf0e10cSrcweir aLocale = aSysLocale; 2086cdf0e10cSrcweir for( const BuiltinFormat* pBuiltin = (*aVIt)->mpFormats; pBuiltin && (pBuiltin->mnNumFmtId >= 0); ++pBuiltin ) 2087cdf0e10cSrcweir { 2088cdf0e10cSrcweir NumberFormatRef& rxNumFmt = maNumFmts[ pBuiltin->mnNumFmtId ]; 2089cdf0e10cSrcweir rxNumFmt.reset( new NumberFormat( *this ) ); 2090cdf0e10cSrcweir 2091cdf0e10cSrcweir bool bReuse = false; 2092cdf0e10cSrcweir if( pBuiltin->mpcFmtCode ) 2093cdf0e10cSrcweir rxNumFmt->setFormatCode( aLocale, pBuiltin->mpcFmtCode ); 2094cdf0e10cSrcweir else if( pBuiltin->mnPredefId >= 0 ) 2095cdf0e10cSrcweir rxNumFmt->setPredefinedId( aLocale, pBuiltin->mnPredefId ); 2096cdf0e10cSrcweir else 2097cdf0e10cSrcweir bReuse = pBuiltin->mnReuseId >= 0; 2098cdf0e10cSrcweir 2099cdf0e10cSrcweir if( bReuse ) 2100cdf0e10cSrcweir aReuseMap[ pBuiltin->mnNumFmtId ] = pBuiltin->mnReuseId; 2101cdf0e10cSrcweir else 2102cdf0e10cSrcweir aReuseMap.erase( pBuiltin->mnNumFmtId ); 2103cdf0e10cSrcweir } 2104cdf0e10cSrcweir } 2105cdf0e10cSrcweir 2106cdf0e10cSrcweir // copy reused number formats 2107cdf0e10cSrcweir for( ReuseMap::const_iterator aRIt = aReuseMap.begin(), aREnd = aReuseMap.end(); aRIt != aREnd; ++aRIt ) 2108cdf0e10cSrcweir maNumFmts[ aRIt->first ] = maNumFmts[ aRIt->second ]; 2109cdf0e10cSrcweir } 2110cdf0e10cSrcweir 2111cdf0e10cSrcweir // ============================================================================ 2112cdf0e10cSrcweir 2113cdf0e10cSrcweir } // namespace xls 2114cdf0e10cSrcweir } // namespace oox 2115