summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/i18n/NumberFormatIndex.idl
diff options
context:
space:
mode:
Diffstat (limited to 'offapi/com/sun/star/i18n/NumberFormatIndex.idl')
-rw-r--r--offapi/com/sun/star/i18n/NumberFormatIndex.idl280
1 files changed, 280 insertions, 0 deletions
diff --git a/offapi/com/sun/star/i18n/NumberFormatIndex.idl b/offapi/com/sun/star/i18n/NumberFormatIndex.idl
new file mode 100644
index 000000000000..38163215d054
--- /dev/null
+++ b/offapi/com/sun/star/i18n/NumberFormatIndex.idl
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_i18n_NumberFormatIndex_idl__
+#define __com_sun_star_i18n_NumberFormatIndex_idl__
+
+//=============================================================================
+
+module com { module sun { module star { module i18n {
+
+//=============================================================================
+
+//! Do NOT insert any new values!
+//! Locale data number format creation must match these values!
+//! Number formatter internals must match these values!
+
+/**
+ Number format indices to be passed as the index argument to
+ <member>XNumberFormatCode::getFormatCode()</member>
+ or
+ <member scope="::com::sun::star::util">XNumberFormatTypes::getFormatIndex()</member>.
+
+ <p> Each locale can support up to about 5000 arbitrary format
+ codes. But for backward compatiblity reasons, each locale
+ <b>MUST</b> support some predefined format codes. These predefined
+ format codes are accessed through indices as the following, and
+ the locale data format code definitions in
+ i18npool\source\localedata\data\*.xml <b>MUST</b> have matching
+ entries in the form <br/>
+
+ <code>&lt;FormatElement formatindex="0"&gt;</code> <br/>
+
+ (see also <member>FormatElement::formatIndex</member>).
+
+ The index values are also used to define the <code>enum
+ NfIndexTableOffset</code> in file svtools/inc/zforlist.hxx </p>
+
+ <p> Note: This index has <b>nothing</b> to do with the index key
+ used internally by the number formatter. </p> <br/>
+
+ <p> Date formats may have a comment of DIN/EN/ISO, meaning
+ <ul>
+ <li> DIN 5008 (Deutsche Industrie Norm) </li>
+ <li> EN 28601 (European Norm) </li>
+ <li> ISO 8601 (International Standards Organisation) </li>
+ </ul>
+ </p>
+
+ <p> Some names of date format constants indicate a special
+ behavior of those formats in StarOffice 5.2 or older. Those are:
+
+ <dl>
+ <dt> <a name="SYSTEM"> DATE_SYSTEM_... </a> </dt>
+ <dd> On Windows platforms these formats were entirely
+ retrieved from the system's Regional Settings. OpenOffice.org
+ / StarOffice 6 don't use those Windows settings anymore in
+ order to provide the same functionality and document layout on
+ every platform. Like all other formats these formats are now
+ defined in the i18n framework locale data files under
+ i18npool\source\localedata\data\*.xml </dd>
+
+ <dt> <a name="SYS"> DATE_SYS_... </a> </dt>
+ <dd> On Windows platforms these formats used separators and
+ YMD order retrieved from the Regional Settings, but appearance
+ of short/long days/months/years was defined by the
+ application. </dd>
+
+ <dt> <a name="DEF"> DATE_DEF_... </a> </dt>
+ <dd> The format code was hard defined, only the date separator
+ was taken from the Windows Regional Settings, but not the YMD
+ order. </dd>
+
+ </dl>
+ </p>
+ */
+published constants NumberFormatIndex
+{
+ /// Start of simple numerical formats (first format)
+ const short NUMBER_START = 0;
+ /// The "General" standard format
+ const short NUMBER_STANDARD = NUMBER_START;
+ /// 0 <br/>Integer number
+ const short NUMBER_INT = NUMBER_START+1;
+ /// 0.00 <br/>Decimal number with 2 decimals
+ const short NUMBER_DEC2 = NUMBER_START+2;
+ /// #,##0 <br/>Integer number with group separator
+ const short NUMBER_1000INT = NUMBER_START+3;
+ /// #,##0.00 <br/>Decimal number with group separator
+ const short NUMBER_1000DEC2 = NUMBER_START+4;
+ /// #,##0.00 <br/> In SO5/Win this format was retrieved from the Regional Settings
+ const short NUMBER_SYSTEM = NUMBER_START+5;
+ /// End of simple numerical formats (last format)
+ const short NUMBER_END = NUMBER_SYSTEM ;
+
+
+ /// Start of Scientific formats (first format)
+ const short SCIENTIFIC_START = NUMBER_END+1;
+ /// 0.00E+000 <br/>Number in scientific notation with exponent in 3 digit placeholders
+ const short SCIENTIFIC_000E000 = SCIENTIFIC_START;
+ /// 0.00E+00 <br/>Number in scientific notation with exponent in 2 digit placeholders
+ const short SCIENTIFIC_000E00 = SCIENTIFIC_START+1;
+ /// End of Scientific formats (last format)
+ const short SCIENTIFIC_END = SCIENTIFIC_000E00;
+
+
+ /// Start of Percent formats (first format)
+ const short PERCENT_START = SCIENTIFIC_END+1;
+ /// 0% <br/>Percentage format, rounded to integer
+ const short PERCENT_INT = PERCENT_START;
+ /// 0.00% <br/>Percentage format, rounded to 2 decimals
+ const short PERCENT_DEC2 = PERCENT_START+1;
+ /// End of Percent formats (last format)
+ const short PERCENT_END = PERCENT_DEC2;
+
+
+ /// Start of Fraction formats (first format)
+ const short FRACTION_START = PERCENT_END+1;
+ /// # ?/? <br/>Number with decimal in fraction in 1 digit placeholder
+ const short FRACTION_1 = FRACTION_START;
+ /// # ??/?? <br/>Number with decimal in fraction in 2 digit placeholders
+ const short FRACTION_2 = FRACTION_START+1;
+ /// End of Fraction formats (last format)
+ const short FRACTION_END = FRACTION_2;
+
+
+ /// Start of Currency formats (first format)
+ const short CURRENCY_START = FRACTION_END+1;
+ /// #,##0 DM <br/>Integer currency format with group separator
+ const short CURRENCY_1000INT = CURRENCY_START;
+ /// #,##0.00 DM <br/>Decimal currency format with group separator
+ const short CURRENCY_1000DEC2 = CURRENCY_START+1;
+ /// #,##0 DM <br/>Integer currency format with negative in red
+ const short CURRENCY_1000INT_RED = CURRENCY_START+2;
+ /// #,##0.00 DM <br/>Decimal currency format with negative in red
+ const short CURRENCY_1000DEC2_RED = CURRENCY_START+3;
+ /// #,##0.00 DEM <br/>Currency in ISO-4217 abbreviation format
+ const short CURRENCY_1000DEC2_CCC = CURRENCY_START+4;
+ /// #,##0.-- DM <br/>Currency format with dash representing 0 in decimals
+ const short CURRENCY_1000DEC2_DASHED = CURRENCY_START+5;
+ /// End of Currency formats (last format)
+ const short CURRENCY_END = CURRENCY_1000DEC2_DASHED;
+
+
+ /// Start of Date formats (first format)
+ const short DATE_START = CURRENCY_END+1;
+ /// 08.10.97 <br/> see also DATE_SYSTEM_... <a href="#SYSTEM">explanation</a>
+ const short DATE_SYSTEM_SHORT = DATE_START;
+ /// Wednesday, 8. October 1997 <br/> see also DATE_SYSTEM_... <a href="#SYSTEM">explanation</a>
+ const short DATE_SYSTEM_LONG = DATE_START+1;
+ /// 08.10.97 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
+ const short DATE_SYS_DDMMYY = DATE_START+2;
+ /** 08.10.1997 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
+ <br/><b>Note:</b> When editing already existing date data this
+ format is forced in order to always edit the full century. */
+ const short DATE_SYS_DDMMYYYY = DATE_START+3;
+ /// 8. Oct 97 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
+ const short DATE_SYS_DMMMYY = DATE_START+4;
+ /// 8. Oct 1997 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
+ const short DATE_SYS_DMMMYYYY = DATE_START+5;
+ /// 8. Oct. 1997 <br/> DIN/EN
+ const short DATE_DIN_DMMMYYYY = DATE_START+6;
+ /// 8. October 1997 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
+ const short DATE_SYS_DMMMMYYYY = DATE_START+7;
+ /// 8. October 1997 <br/> DIN/EN
+ const short DATE_DIN_DMMMMYYYY = DATE_START+8;
+ /// Wed, 8. Oct 97 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
+ const short DATE_SYS_NNDMMMYY = DATE_START+9;
+ /// Wed 08.Oct 97 <br/> see also DATE_DEF_... <a href="#DEF">explanation</a>
+ const short DATE_DEF_NNDDMMMYY = DATE_START+10;
+ /// Wed, 8. October 1997 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
+ const short DATE_SYS_NNDMMMMYYYY = DATE_START+11;
+ /// Wednesday, 8. October 1997
+ const short DATE_SYS_NNNNDMMMMYYYY = DATE_START+12;
+ /// 10-08 <br/> DIN/EN
+ const short DATE_DIN_MMDD = DATE_START+13;
+ /// 97-10-08 <br/> DIN/EN/ISO
+ const short DATE_DIN_YYMMDD = DATE_START+14;
+ /// 1997-10-08 <br/> DIN/EN/ISO
+ const short DATE_DIN_YYYYMMDD = DATE_START+15;
+ /// 10.97 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
+ const short DATE_SYS_MMYY = DATE_START+16;
+ /// 08.Oct <br/> see also DATE_SYS_... <a href="#SYS">explanation</a>
+ const short DATE_SYS_DDMMM = DATE_START+17;
+ /// October
+ const short DATE_MMMM = DATE_START+18;
+ /// 4th quarter 97
+ const short DATE_QQJJ = DATE_START+19;
+ /// week of year
+ const short DATE_WW = DATE_START+20;
+ /// End of Date formats (last format)
+ const short DATE_END = DATE_WW;
+
+
+ /// Start of Time formats (first format)
+ const short TIME_START = DATE_END+1;
+ /// HH:MM <br/>Time format with hour and minute
+ const short TIME_HHMM = TIME_START;
+ /// HH:MM:SS <br/>Time format with hour, minute and second
+ const short TIME_HHMMSS = TIME_START+1;
+ /// HH:MM AM/PM <br/>Time format with hour, minute and morning/afternoon notation
+ const short TIME_HHMMAMPM = TIME_START+2;
+ /// HH:MM:SS AM/PM <br/>Time format with hour, minute, second and morning/afternoon notation
+ const short TIME_HHMMSSAMPM = TIME_START+3;
+ /// [HH]:MM:SS <br/>Time format with amount of hours
+ const short TIME_HH_MMSS = TIME_START+4;
+ /// MM:SS,00 <br/>Time format with second in fraction
+ const short TIME_MMSS00 = TIME_START+5;
+ /// [HH]:MM:SS,00 <br/>Time format with amount of hours and seconds with fraction
+ const short TIME_HH_MMSS00 = TIME_START+6;
+ /// End of Time formats (last format)
+ const short TIME_END = TIME_HH_MMSS00;
+
+
+ /// Start of DateTime formats (first format)
+ const short DATETIME_START = TIME_END + 1;
+ /// 08.10.97 01:23 Date/time format
+ const short DATETIME_SYSTEM_SHORT_HHMM = DATETIME_START;
+ /** 08.10.1997 01:23:45 Date/time format with second
+ <br/><b>Note:</b> When editing already existing date/time data this
+ format is forced in order to always edit the full century. */
+ const short DATETIME_SYS_DDMMYYYY_HHMMSS= DATETIME_START+1;
+ /// End of DateTime formats (last format)
+ const short DATETIME_END = DATETIME_SYS_DDMMYYYY_HHMMSS;
+
+
+ /**
+ BOOLEAN format
+
+ @ATTENTION
+ <b>Not</b> defined in locale data, but generated by the number
+ formatter. If you want to access this format you <b>MUST</b>
+ do it via <member scope="com::sun::star::util">XNumberFormatTypes::getFormatIndex()</member>
+ instead of <member>XNumberFormatCode::getFormatCode()</member>.
+ */
+ const short BOOLEAN = DATETIME_END+1;
+
+ /**
+ Text format
+
+ @ATTENTION
+ <b>Not</b> defined in locale data, but generated by the number
+ formatter. If you want to access this format you <b>MUST</b>
+ do it via <member scope="com::sun::star::util">XNumberFormatTypes::getFormatIndex()</member>
+ instead of <member>XNumberFormatCode::getFormatCode()</member>
+ */
+ const short TEXT = BOOLEAN+1;
+
+ /// count of built-in format codes.
+ const short INDEX_TABLE_ENTRIES = TEXT+1;
+};
+
+
+//=============================================================================
+}; }; }; };
+#endif
+