Better, Faster, Freer

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: i386 ]
Version: HEAD ]

001 /*************************************************************************
002  *
003  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004  * 
005  * Copyright 2008 by Sun Microsystems, Inc.
006  *
007  * OpenOffice.org - a multi-platform office productivity suite
008  *
009  * $RCSfile: NumberFormatIndex.idl,v $
010  * $Revision: 1.12 $
011  *
012  * This file is part of OpenOffice.org.
013  *
014  * OpenOffice.org is free software: you can redistribute it and/or modify
015  * it under the terms of the GNU Lesser General Public License version 3
016  * only, as published by the Free Software Foundation.
017  *
018  * OpenOffice.org is distributed in the hope that it will be useful,
019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
021  * GNU Lesser General Public License version 3 for more details
022  * (a copy is included in the LICENSE file that accompanied this code).
023  *
024  * You should have received a copy of the GNU Lesser General Public License
025  * version 3 along with OpenOffice.org.  If not, see
026  * <http://www.openoffice.org/license.html>
027  * for a copy of the LGPLv3 License.
028  *
029  ************************************************************************/
030 
031 #ifndef __com_sun_star_i18n_NumberFormatIndex_idl__
032 #define __com_sun_star_i18n_NumberFormatIndex_idl__
033 
034 //=============================================================================
035 
036 module com { module sun { module star { module i18n {
037 
038 //=============================================================================
039 
040 //! Do NOT insert any new values!
041 //! Locale data number format creation must match these values!
042 //! Number formatter internals must match these values!
043 
044 /**
045         Number format indices to be passed as the index argument to
046     <member>XNumberFormatCode::getFormatCode()</member>
047     or
048     <member scope="::com::sun::star::util">XNumberFormatTypes::getFormatIndex()</member>.
049 
050     <p> Each locale can support up to about 5000 arbitrary format
051     codes. But for backward compatiblity reasons, each locale
052     <b>MUST</b> support some predefined format codes. These predefined
053     format codes are accessed through indices as the following, and
054     the locale data format code definitions in
055     i18npool\source\localedata\data\*.xml <b>MUST</b> have matching
056     entries in the form <br/>
057 
058     <code>&lt;FormatElement formatindex="0"&gt;</code> <br/>
059 
060     (see also <member>FormatElement::formatIndex</member>).
061 
062     The index values are also used to define the <code>enum
063     NfIndexTableOffset</code> in file svtools/inc/zforlist.hxx </p>
064 
065     <p> Note: This index has <b>nothing</b> to do with the index key
066     used internally by the number formatter. </p> <br/>
067 
068     <p> Date formats may have a comment of DIN/EN/ISO, meaning
069         <ul>
070             <li> DIN 5008 (Deutsche Industrie Norm) </li>
071             <li> EN 28601 (European Norm) </li>
072             <li> ISO 8601 (International Standards Organisation) </li>
073         </ul>
074     </p>
075 
076     <p> Some names of date format constants indicate a special
077     behavior of those formats in StarOffice 5.2 or older. Those are:
078 
079     <dl>
080     <dt> <a name="SYSTEM"> DATE_SYSTEM_... </a> </dt>
081         <dd> On Windows platforms these formats were entirely
082         retrieved from the system's Regional Settings. OpenOffice.org
083         / StarOffice 6 don't use those Windows settings anymore in
084         order to provide the same functionality and document layout on
085         every platform. Like all other formats these formats are now
086         defined in the i18n framework locale data files under
087         i18npool\source\localedata\data\*.xml </dd>
088 
089     <dt> <a name="SYS"> DATE_SYS_... </a> </dt>
090         <dd> On Windows platforms these formats used separators and
091         YMD order retrieved from the Regional Settings, but appearance
092         of short/long days/months/years was defined by the
093         application. </dd>
094 
095     <dt> <a name="DEF"> DATE_DEF_... </a> </dt>
096         <dd> The format code was hard defined, only the date separator
097         was taken from the Windows Regional Settings, but not the YMD
098         order. </dd>
099 
100     </dl>
101     </p>
102  */
103 published constants NumberFormatIndex
104 {
105         /// Start of simple numerical formats (first format)
106         const short NUMBER_START                                = 0;
107         /// The "General" standard format
108         const short NUMBER_STANDARD                             = NUMBER_START;
109         /// 0           <br/>Integer number
110         const short NUMBER_INT                                  = NUMBER_START+1;
111         /// 0.00        <br/>Decimal number with 2 decimals
112         const short NUMBER_DEC2                                 = NUMBER_START+2;
113         /// #,##0       <br/>Integer number with group separator
114         const short NUMBER_1000INT                              = NUMBER_START+3;
115         /// #,##0.00    <br/>Decimal number with group separator
116         const short NUMBER_1000DEC2                             = NUMBER_START+4;
117         /// #,##0.00    <br/> In SO5/Win this format was retrieved from the Regional Settings
118         const short NUMBER_SYSTEM                               = NUMBER_START+5;
119     /// End of simple numerical formats (last format)
120         const short NUMBER_END                                  = NUMBER_SYSTEM ;
121 
122 
123         /// Start of Scientific formats (first format)
124         const short SCIENTIFIC_START                    = NUMBER_END+1;
125         /// 0.00E+000   <br/>Number in scientific notation with exponent in 3 digit placeholders
126         const short SCIENTIFIC_000E000                  = SCIENTIFIC_START;
127         /// 0.00E+00    <br/>Number in scientific notation with exponent in 2 digit placeholders
128         const short SCIENTIFIC_000E00                   = SCIENTIFIC_START+1;
129         /// End of Scientific formats (last format)
130         const short SCIENTIFIC_END                              = SCIENTIFIC_000E00;
131 
132 
133         /// Start of Percent formats (first format)
134         const short PERCENT_START                               = SCIENTIFIC_END+1;
135         /// 0%          <br/>Percentage format, rounded to integer
136         const short PERCENT_INT                                 = PERCENT_START;
137         /// 0.00%       <br/>Percentage format, rounded to 2 decimals
138         const short PERCENT_DEC2                                = PERCENT_START+1;
139         /// End of Percent formats (last format)
140         const short PERCENT_END                                 = PERCENT_DEC2;
141 
142 
143         /// Start of Fraction formats (first format)
144         const short FRACTION_START                              = PERCENT_END+1;
145         /// # ?/?       <br/>Number with decimal in fraction in 1 digit placeholder
146         const short FRACTION_1                                  = FRACTION_START;
147         /// # ??/??     <br/>Number with decimal in fraction in 2 digit placeholders
148         const short FRACTION_2                                  = FRACTION_START+1;
149         /// End of Fraction formats (last format)
150         const short FRACTION_END                                = FRACTION_2;
151 
152 
153         /// Start of Currency formats (first format)
154         const short CURRENCY_START                              = FRACTION_END+1;
155         /// #,##0 DM    <br/>Integer currency format with group separator
156         const short CURRENCY_1000INT                    = CURRENCY_START;
157         /// #,##0.00 DM <br/>Decimal currency format with group separator
158         const short CURRENCY_1000DEC2                   = CURRENCY_START+1;
159         /// #,##0 DM    <br/>Integer currency format with negative in red
160         const short CURRENCY_1000INT_RED                = CURRENCY_START+2;
161         /// #,##0.00 DM <br/>Decimal currency format with negative in red
162         const short CURRENCY_1000DEC2_RED               = CURRENCY_START+3;
163         /// #,##0.00 DEM <br/>Currency in ISO-4217 abbreviation format
164         const short CURRENCY_1000DEC2_CCC               = CURRENCY_START+4;
165         /// #,##0.-- DM <br/>Currency format with dash representing 0 in decimals
166         const short CURRENCY_1000DEC2_DASHED    = CURRENCY_START+5;
167         /// End of Currency formats (last format)
168         const short CURRENCY_END                                = CURRENCY_1000DEC2_DASHED;
169 
170 
171         /// Start of Date formats (first format)
172         const short DATE_START                                  = CURRENCY_END+1;
173         /// 08.10.97        <br/> see also DATE_SYSTEM_... <a href="#SYSTEM">explanation</a>
174     const short DATE_SYSTEM_SHORT                       = DATE_START;
175     /// Wednesday, 8. October 1997  <br/> see also DATE_SYSTEM_... <a href="#SYSTEM">explanation</a>
176         const short DATE_SYSTEM_LONG                    = DATE_START+1;
177         /// 08.10.97        <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
178         const short DATE_SYS_DDMMYY                     = DATE_START+2;
179         /** 08.10.1997      <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
180         <br/><b>Note:</b> When editing already existing date data this
181         format is forced in order to always edit the full century.  */
182         const short DATE_SYS_DDMMYYYY                   = DATE_START+3;
183         /// 8. Oct 97       <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
184         const short DATE_SYS_DMMMYY                     = DATE_START+4;
185         /// 8. Oct 1997     <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
186         const short DATE_SYS_DMMMYYYY                   = DATE_START+5;
187         /// 8. Oct. 1997    <br/> DIN/EN
188         const short DATE_DIN_DMMMYYYY                   = DATE_START+6;
189         /// 8. October 1997 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
190         const short DATE_SYS_DMMMMYYYY                  = DATE_START+7;
191         /// 8. October 1997 <br/> DIN/EN
192         const short DATE_DIN_DMMMMYYYY                  = DATE_START+8;
193         /// Wed, 8. Oct 97  <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
194         const short DATE_SYS_NNDMMMYY                   = DATE_START+9;
195         /// Wed 08.Oct 97   <br/> see also DATE_DEF_... <a href="#DEF">explanation</a>
196         const short DATE_DEF_NNDDMMMYY                  = DATE_START+10;
197         /// Wed, 8. October 1997    <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
198         const short DATE_SYS_NNDMMMMYYYY                = DATE_START+11;
199         /// Wednesday, 8. October 1997
200         const short DATE_SYS_NNNNDMMMMYYYY              = DATE_START+12;
201         /// 10-08           <br/> DIN/EN
202         const short DATE_DIN_MMDD                               = DATE_START+13;
203         /// 97-10-08        <br/> DIN/EN/ISO
204         const short DATE_DIN_YYMMDD                             = DATE_START+14;
205         /// 1997-10-08      <br/> DIN/EN/ISO
206         const short DATE_DIN_YYYYMMDD                   = DATE_START+15;
207         /// 10.97           <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
208         const short DATE_SYS_MMYY                               = DATE_START+16;
209         /// 08.Oct          <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
210         const short DATE_SYS_DDMMM                              = DATE_START+17;
211         /// October
212         const short DATE_MMMM                                   = DATE_START+18;
213         /// 4th quarter 97
214         const short DATE_QQJJ                                   = DATE_START+19;
215         /// week of year
216         const short DATE_WW                                             = DATE_START+20;
217         /// End of Date formats (last format)
218         const short DATE_END                                    = DATE_WW;
219 
220 
221         /// Start of Time formats (first format)
222         const short TIME_START                                  = DATE_END+1;
223         /// HH:MM           <br/>Time format with hour and minute
224         const short TIME_HHMM                                   = TIME_START;
225         /// HH:MM:SS        <br/>Time format with hour, minute and second
226         const short TIME_HHMMSS                                 = TIME_START+1;
227         /// HH:MM AM/PM     <br/>Time format with hour, minute and morning/afternoon notation
228         const short TIME_HHMMAMPM                               = TIME_START+2;
229         /// HH:MM:SS AM/PM  <br/>Time format with hour, minute, second and morning/afternoon notation
230         const short TIME_HHMMSSAMPM                             = TIME_START+3;
231         /// [HH]:MM:SS      <br/>Time format with amount of hours
232         const short TIME_HH_MMSS                                = TIME_START+4;
233         /// MM:SS,00        <br/>Time format with second in fraction
234         const short TIME_MMSS00                                 = TIME_START+5;
235         /// [HH]:MM:SS,00   <br/>Time format with amount of hours and seconds with fraction
236         const short TIME_HH_MMSS00                              = TIME_START+6;
237         /// End of Time formats (last format)
238         const short TIME_END                                    = TIME_HH_MMSS00;
239 
240 
241         /// Start of DateTime formats (first format)
242         const short DATETIME_START                              = TIME_END + 1;
243         /// 08.10.97 01:23 Date/time format
244         const short DATETIME_SYSTEM_SHORT_HHMM  = DATETIME_START;
245         /** 08.10.1997 01:23:45 Date/time format with second
246         <br/><b>Note:</b> When editing already existing date/time data this
247         format is forced in order to always edit the full century.  */
248         const short DATETIME_SYS_DDMMYYYY_HHMMSS= DATETIME_START+1;
249         /// End of DateTime formats (last format)
250         const short DATETIME_END                                = DATETIME_SYS_DDMMYYYY_HHMMSS;
251 
252 
253         /**
254                 BOOLEAN format
255 
256                 @ATTENTION
257                         <b>Not</b> defined in locale data, but generated by the number
258                         formatter. If you want to access this format you <b>MUST</b>
259                         do it via <member scope="com::sun::star::util">XNumberFormatTypes::getFormatIndex()</member>
260                         instead of <member>XNumberFormatCode::getFormatCode()</member>.
261         */
262         const short BOOLEAN                                             = DATETIME_END+1;
263 
264         /**
265                 Text format
266 
267                 @ATTENTION
268                         <b>Not</b> defined in locale data, but generated by the number
269                         formatter. If you want to access this format you <b>MUST</b>
270                         do it via <member scope="com::sun::star::util">XNumberFormatTypes::getFormatIndex()</member>
271                         instead of <member>XNumberFormatCode::getFormatCode()</member>
272     */
273         const short TEXT                                                = BOOLEAN+1;
274 
275         /// count of built-in format codes.
276         const short INDEX_TABLE_ENTRIES                 = TEXT+1;
277 };
278 
279 
280 //=============================================================================
281 }; }; }; };
282 #endif
283 

source navigation ] diff markup ] identifier search ] general search ]

This page was automatically generated by the LXR engine.
The LXR team
Valid HTML 4.01!