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