diff options
Diffstat (limited to 'offapi/com/sun/star/i18n')
85 files changed, 7831 insertions, 0 deletions
diff --git a/offapi/com/sun/star/i18n/AmPmValue.idl b/offapi/com/sun/star/i18n/AmPmValue.idl new file mode 100644 index 000000000000..03abe18ff0b8 --- /dev/null +++ b/offapi/com/sun/star/i18n/AmPmValue.idl @@ -0,0 +1,50 @@ +/************************************************************************* + * + * 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_AmPmValue_idl__ +#define __com_sun_star_i18n_AmPmValue_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Constants for AM/PM used in calls to <member>XCalendar::getDisplayName()</member>. + */ +published constants AmPmValue +{ + /// get display name string for AM + const short AM = 0; + /// get display name string for PM + const short PM = 1; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/Boundary.idl b/offapi/com/sun/star/i18n/Boundary.idl new file mode 100644 index 000000000000..31cd38cad2e2 --- /dev/null +++ b/offapi/com/sun/star/i18n/Boundary.idl @@ -0,0 +1,56 @@ +/************************************************************************* + * + * 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_Boundary_idl__ +#define __com_sun_star_i18n_Boundary_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** contains start and end position of a word. + + <p> It is used in word break iterator and text conversion. + </p> + + @see XBreakIterator + @see XTextConversion + */ +published struct Boundary +{ + /// Start position of a word, <b>inclusive</b> + long startPos ; + + /// End position of a word, <b>exclusive</b> + long endPos; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/BreakIterator.idl b/offapi/com/sun/star/i18n/BreakIterator.idl new file mode 100644 index 000000000000..658ce5764d76 --- /dev/null +++ b/offapi/com/sun/star/i18n/BreakIterator.idl @@ -0,0 +1,59 @@ +/************************************************************************* + * + * 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_BreakIterator_idl__ +#define __com_sun_star_i18n_BreakIterator_idl__ + +#include <com/sun/star/lang/XServiceInfo.idl> + +#ifndef __com_sun_star_i18n_XBreakIterator_idl__ +#include <com/sun/star/i18n/XBreakIterator.idl> +#endif + +//============================================================================= + + module com { module sun { module star { module i18n { + +//============================================================================= + +//-------------------------------------------------------------------------- +/** contains the base routines for iteration in Unicode string. Iterates over + characters, words, sentences and line breaks. + + <p> It also contains a BreakIterator service for Asian languages. + </p> +*/ +published service BreakIterator +{ + interface com::sun::star::i18n::XBreakIterator; + interface com::sun::star::lang::XServiceInfo; +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/BreakType.idl b/offapi/com/sun/star/i18n/BreakType.idl new file mode 100644 index 000000000000..33e731f91495 --- /dev/null +++ b/offapi/com/sun/star/i18n/BreakType.idl @@ -0,0 +1,56 @@ +/************************************************************************* + * + * 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_BreakType_idl__ +#define __com_sun_star_i18n_BreakType_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Constants to specify the type of a line break, used with + <member>LineBreakResults::breakType</member>. + */ + +published constants BreakType +{ + /// Line break is a word break. + const short WORDBOUNDARY = 1; + + /// Line break is a result of hyphenation. + const short HYPHENATION = 2; + + /// Line break - hanging punctuation recognized. + const short HANGINGPUNCTUATION = 3; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/CTLScriptType.idl b/offapi/com/sun/star/i18n/CTLScriptType.idl new file mode 100644 index 000000000000..a192f5f5d0c2 --- /dev/null +++ b/offapi/com/sun/star/i18n/CTLScriptType.idl @@ -0,0 +1,68 @@ +/************************************************************************* + * + * 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_CTLScriptType_idl__ +#define __com_sun_star_i18n_CTLScriptType_idl__ + + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +//-------------------------------------------------------------------------- +/** CTL tcript type constants for layout engine, returned by + <member>XScriptTypeDetector::getCTLScriptType()</member> + + @since OOo 1.1.2 +*/ + +published constants CTLScriptType +{ + /// For CTL scripts OOo currently does not support or could not handle + const short CTL_UNKNOWN = 0; + + /// For Hebrew script + const short CTL_HEBREW = 1; + + /// For Arabic script + const short CTL_ARABIC = 2; + + /// For Thai script + const short CTL_THAI = 3; + + /// For Indic script (including Devanagari, Tamil, Telugu and Gujarati script) + const short CTL_INDIC = 4; + +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/Calendar.idl b/offapi/com/sun/star/i18n/Calendar.idl new file mode 100644 index 000000000000..8e063c04e853 --- /dev/null +++ b/offapi/com/sun/star/i18n/Calendar.idl @@ -0,0 +1,68 @@ +/************************************************************************* + * + * 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_Calendar_idl__ +#define __com_sun_star_i18n_Calendar_idl__ + +#include <com/sun/star/i18n/CalendarItem.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + A calendar as returned in a sequence by + <member>XLocaleData::getAllCalendars()</member>. + + @see XLocaleData + for links to DTD of XML locale data files. + */ + +published struct Calendar +{ + /// the days of the week, see also <type>CalendarItem</type>. + sequence< CalendarItem > Days; + /// the months of the year, see also <type>CalendarItem</type>. + sequence< CalendarItem > Months; + /// the possible eras, see also <type>CalendarItem</type>. + sequence< CalendarItem > Eras; + /// the ID of the day with which the week begins. + string StartOfWeek; + /// how many days must reside in the first week of a year. + short MinimumNumberOfDaysForFirstWeek; + /// if this is the default calendar for a given locale. + boolean Default; + /// the name of the calendar, for example, <b>gregorian</b>. + string Name; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/CalendarDisplayCode.idl b/offapi/com/sun/star/i18n/CalendarDisplayCode.idl new file mode 100644 index 000000000000..780a88eb8fa7 --- /dev/null +++ b/offapi/com/sun/star/i18n/CalendarDisplayCode.idl @@ -0,0 +1,90 @@ +/************************************************************************* + * + * 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_CalendarDisplayCode_idl__ +#define __com_sun_star_i18n_CalendarDisplayCode_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + + +/** + Constants to use with <member>XExtendedCalendar::getDisplayString()</member>. + + <p> The examples given are for an English Gregorian calendar, note + that other calendars or locales may return completely different + strings, for example not a four digit year but a CJK name instead. + <p/> + + @since OOo 1.1.2 + */ +published constants CalendarDisplayCode +{ + /// Day of month, one or two digits, no leading zero. + const long SHORT_DAY = 1; + /// Day of month, two digits, with leading zero. + const long LONG_DAY = 2; + /// Day of week, abbreviated name. + const long SHORT_DAY_NAME = 3; + /// Day of week, full name. + const long LONG_DAY_NAME = 4; + + /// Month of year, one or two digits, no leading zero. + const long SHORT_MONTH = 5; + /// Month of year, with leading zero. + const long LONG_MONTH = 6; + /// Full month name. + const long SHORT_MONTH_NAME = 7; + /// Abbreviated month name. + const long LONG_MONTH_NAME = 8; + + /// Year, two digits. + const long SHORT_YEAR = 9; + /// Year, four digits. + const long LONG_YEAR = 10; + /// Full era name, for example, "Before Christ" or "Anno Dominus". + const long SHORT_ERA = 11; + /// Abbreviated era name, for example, BC or AD. + const long LONG_ERA = 12; + /// Combined short year and era, order depends on locale/calendar. + const long SHORT_YEAR_AND_ERA = 13; + /// Combined full year and era, order depends on locale/calendar. + const long LONG_YEAR_AND_ERA = 14; + + /// Short quarter, for example, "Q1" + const long SHORT_QUARTER = 15; + /// Long quarter, for example, "1st quarter" + const long LONG_QUARTER = 16; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/CalendarDisplayIndex.idl b/offapi/com/sun/star/i18n/CalendarDisplayIndex.idl new file mode 100644 index 000000000000..4338ad50742f --- /dev/null +++ b/offapi/com/sun/star/i18n/CalendarDisplayIndex.idl @@ -0,0 +1,58 @@ +/************************************************************************* + * + * 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_CalendarDisplayIndex_idl__ +#define __com_sun_star_i18n_CalendarDisplayIndex_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + + +/** + Values to be passed to <member>XCalendar::getDisplayName()</member>. + */ +published constants CalendarDisplayIndex +{ + /// name of an AM/PM value + const short AM_PM = 0; + /// name of a day of week + const short DAY = 1; + /// name of a month + const short MONTH = 2; + /// name of a year (if used for a specific calendar) + const short YEAR = 3; + /// name of an era, like BC/AD + const short ERA = 4; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/CalendarFieldIndex.idl b/offapi/com/sun/star/i18n/CalendarFieldIndex.idl new file mode 100644 index 000000000000..a2606f229d05 --- /dev/null +++ b/offapi/com/sun/star/i18n/CalendarFieldIndex.idl @@ -0,0 +1,137 @@ +/************************************************************************* + * + * 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_CalendarFieldIndex_idl__ +#define __com_sun_star_i18n_CalendarFieldIndex_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + + +/** + Field indices to be passed to various <type>XCalendar</type> methods. + + <p> Field is writable only if marked both Get/Set. </p> + + <p> ZONE_OFFSET and DST_OFFSET cooperate such that both values are added, + for example, ZoneOffset=1*60 and DstOffset=1*60 results in a time + difference of GMT+2. The calculation in minutes is + GMT = LocalTime - ZoneOffset - DstOffset </p> + + <p> With introduction of ZONE_OFFSET_SECOND_MILLIS and + DST_OFFSET_SECOND_MILLIS the exact calculation in milliseconds is + GMT = LocalTime + - (ZoneOffset*60000 + ZoneOffsetMillis * sign(ZoneOffset)) + - (DstOffset*60000 + DstOffsetMillis * sign(DstOffset)) + <p> + */ +published constants CalendarFieldIndex +{ + /// Get <type>AmPmValue</type>. + const short AM_PM = 0; + /// Get/Set day of month [1-31]. + const short DAY_OF_MONTH = 1; + /// Get day of week [0-6]. + const short DAY_OF_WEEK = 2; + /// Get day of year. + const short DAY_OF_YEAR = 3; + /** Get daylight saving time offset in minutes, e.g. [0*60..1*60] + <p> The DST offset value depends on the actual date set at the + calendar and is determined according to the timezone rules of + the locale used with the calendar. </p> + <p> Note that there is a bug in OpenOffice.org 1.0 / StarOffice 6.0 + that prevents interpreting this value correctly. </p> */ + const short DST_OFFSET = 4; + /// Get/Set hour [0-23]. + const short HOUR = 5; + /// Get/Set minute [0-59]. + const short MINUTE = 6; + /// Get/Set second [0-59]. + const short SECOND = 7; + /// Get/Set milliseconds [0-999]. + const short MILLISECOND = 8; + /// Get week of month. + const short WEEK_OF_MONTH = 9; + /// Get week of year. + const short WEEK_OF_YEAR = 10; + /// Get/Set year. + const short YEAR = 11; + /** Get/Set month [0-...]. + <p> Note that the maximum value is <b>not</b> necessarily 11 for + December but depends on the calendar used instead. </p> */ + const short MONTH = 12; + /// Get/Set era, for example, 0:= Before Christ, 1:= After Christ. + const short ERA = 13; + /// Get/Set time zone offset in minutes, e.g. [-14*60..14*60] + const short ZONE_OFFSET = 14; + + /// Total number of fields for < OOo 3.1 + const short FIELD_COUNT = 15; + + /** Get/Set additional offset in milliseconds that <b>adds</b> to + the value of ZONE_OFFSET. This may be necessary to correctly + interpret historical timezone data that consists of fractions of + minutes, e.g. seconds. 1 minute == 60000 milliseconds. + + @ATTENTION! Though the field's type is signed 16-bit, the field + value is treated as unsigned 16-bit to allow for values up to + 60000 and expresses an absolute value that inherits its sign + from the parent ZONE_OFFSET field. + + @since OOo 3.1 + */ + const short ZONE_OFFSET_SECOND_MILLIS = 15; + + /** Get additional offset in milliseconds that <b>adds</b> to + the value of DST_OFFSET. This may be necessary to correctly + interpret historical timezone data that consists of fractions of + minutes, e.g. seconds. 1 minute == 60000 milliseconds. + + @ATTENTION! Though the field's type is signed 16-bit, the field + value is treated as unsigned 16-bit to allow for values up to + 60000 and expresses an absolute value that inherits its sign + from the parent DST_OFFSET field. + + @since OOo 3.1 + */ + const short DST_OFFSET_SECOND_MILLIS = 16; + + /** Total number of fields as of OOo 3.1 + + @since OOo 3.1 + */ + const short FIELD_COUNT2 = 17; + +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/CalendarItem.idl b/offapi/com/sun/star/i18n/CalendarItem.idl new file mode 100644 index 000000000000..5fd2f1209f57 --- /dev/null +++ b/offapi/com/sun/star/i18n/CalendarItem.idl @@ -0,0 +1,60 @@ +/************************************************************************* + * + * 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_CalendarItem_idl__ +#define __com_sun_star_i18n_CalendarItem_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + + +/** + One entry in a calendar, for example, a day of week or a month or an + era. + + <p> A sequence of CalendarItems is contained in + <member>Calendar::Days</member>, <member>Calendar::Months</member>, + <member>Calendar::Eras</member> </p> + */ + +published struct CalendarItem +{ + /** A unique ID for an entry of this type, usually the lower case + abbreviated English name, for example, <b>"sun"</b> for Sunday. */ + string ID; + /// The abbreviated name, for example, <b>"Sun"</b>. + string AbbrevName; + /// The full name, for example, <b>"Sunday"</b>. + string FullName; }; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/ChapterCollator.idl b/offapi/com/sun/star/i18n/ChapterCollator.idl new file mode 100644 index 000000000000..eb7f9e40a58b --- /dev/null +++ b/offapi/com/sun/star/i18n/ChapterCollator.idl @@ -0,0 +1,49 @@ +/************************************************************************* + * + * 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_ChapterCollator_idl__ +#define __com_sun_star_i18n_ChapterCollator_idl__ + +#include <com/sun/star/lang/XServiceInfo.idl> +#include <com/sun/star/i18n/XCollator.idl> + +//============================================================================ + + module com { module sun { module star { module i18n { + +//============================================================================ + +/// Specific collator to sort chapter numbering. +published service ChapterCollator +{ + interface com::sun::star::i18n::XCollator; + interface com::sun::star::lang::XServiceInfo; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/CharType.idl b/offapi/com/sun/star/i18n/CharType.idl new file mode 100644 index 000000000000..2e6406e9b4d0 --- /dev/null +++ b/offapi/com/sun/star/i18n/CharType.idl @@ -0,0 +1,85 @@ +/************************************************************************* + * + * 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_CharType_idl__ +#define __com_sun_star_i18n_CharType_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Constants to specify the character type that starts a character block. + Character type is Unicode type defined in <type>UnicodeType</type> + + <p> Used with <member>XBreakIterator::beginOfCharBlock()</member>, + <member>XBreakIterator::endOfCharBlock()</member>, + <member>XBreakIterator::nextCharBlock()</member>, + <member>XBreakIterator::previousCharBlock()</member> </p> + */ +published constants CharType +{ + /// all alpha characters allowed + const short ANY_CHAR = 0; + + const short UPPERCASE_LETTER = 1; + const short LOWERCASE_LETTER = 2; + const short TITLECASE_LETTER = 3; + const short MODIFIER_LETTER = 4; + const short OTHER_LETTER = 5; + const short NON_SPACING_MARK = 6; + const short ENCLOSING_MARK = 7; + const short COMBINING_SPACING_MARK = 8; + const short DECIMAL_DIGIT_NUMBER = 9; + const short LETTER_NUMBER = 10; + const short OTHER_NUMBER = 11; + const short SPACE_SEPARATOR = 12; + const short LINE_SEPARATOR = 13; + const short PARAGRAPH_SEPARATOR = 14; + const short CONTROL = 15; + const short FORMAT = 16; + const short PRIVATE_USE = 17; + const short SURROGATE = 18; + const short DASH_PUNCTUATION = 19; + const short START_PUNCTUATION = 20; + const short END_PUNCTUATION = 21; + const short CONNECTOR_PUNCTUATION = 22; + const short OTHER_PUNCTUATION = 23; + const short MATH_SYMBOL = 24; + const short CURRENCY_SYMBOL = 25; + const short MODIFIER_SYMBOL = 26; + const short OTHER_SYMBOL = 27; + const short INITIAL_PUNCTUATION = 28; + const short FINAL_PUNCTUATION = 29; + const short GENERAL_TYPES_COUNT = 30; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/CharacterClassification.idl b/offapi/com/sun/star/i18n/CharacterClassification.idl new file mode 100644 index 000000000000..1c903b95033d --- /dev/null +++ b/offapi/com/sun/star/i18n/CharacterClassification.idl @@ -0,0 +1,55 @@ +/************************************************************************* + * + * 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_CharacterClassification_idl__ +#define __com_sun_star_i18n_CharacterClassification_idl__ + +#include <com/sun/star/lang/XServiceInfo.idl> + +#include <com/sun/star/i18n/XCharacterClassification.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Character classification, such as upper, lower, alpha, digit, et al. + + <p>Provides also a generic parser functionality.</p> + */ +published service CharacterClassification +{ + interface com::sun::star::i18n::XCharacterClassification; + interface com::sun::star::lang::XServiceInfo; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/CharacterIteratorMode.idl b/offapi/com/sun/star/i18n/CharacterIteratorMode.idl new file mode 100644 index 000000000000..3b233868b746 --- /dev/null +++ b/offapi/com/sun/star/i18n/CharacterIteratorMode.idl @@ -0,0 +1,57 @@ +/************************************************************************* + * + * 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_CharacterIteratorMode_idl__ +#define __com_sun_star_i18n_CharacterIteratorMode_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Constants to specify the type of character iteration. + + <p> Used with <member>XBreakIterator::nextCharacters()</member> and + <method>XBreakIterator::previousCharacters</method> </p> + */ +published constants CharacterIteratorMode +{ + /// skip characters + const short SKIPCHARACTER = 0; + + /// skip cells + const short SKIPCELL = 1; + + /// skip control characters + const short SKIPCONTROLCHARACTER = 2; +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/Collator.idl b/offapi/com/sun/star/i18n/Collator.idl new file mode 100644 index 000000000000..79cea254bb56 --- /dev/null +++ b/offapi/com/sun/star/i18n/Collator.idl @@ -0,0 +1,55 @@ +/************************************************************************* + * + * 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_Collator_idl__ +#define __com_sun_star_i18n_Collator_idl__ + +#include <com/sun/star/lang/XServiceInfo.idl> + +#ifndef __com_sun_star_i18n_XCollator_idl__ +#include <com/sun/star/i18n/XCollator.idl> +#endif + +//============================================================================ + + module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Access collation algorithms of different locales. + */ + +published service Collator +{ + interface com::sun::star::i18n::XCollator; + interface com::sun::star::lang::XServiceInfo; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/CollatorOptions.idl b/offapi/com/sun/star/i18n/CollatorOptions.idl new file mode 100644 index 000000000000..9af23dadde73 --- /dev/null +++ b/offapi/com/sun/star/i18n/CollatorOptions.idl @@ -0,0 +1,53 @@ +/************************************************************************* + * + * 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_CollatorOptions_idl__ +#define __com_sun_star_i18n_CollatorOptions_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Options to be used with <type>XCollator</type> methods. + */ +published constants CollatorOptions +{ + /// Ignore case. + const short CollatorOptions_IGNORE_CASE = 1; + /// Ignore Kana. + const short CollatorOptions_IGNORE_KANA = 2; + /// Ignore width. + const short CollatorOptions_IGNORE_WIDTH = 4; + /// Ignore case and accent. + const short CollatorOptions_IGNORE_CASE_ACCENT = 8; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/Currency.idl b/offapi/com/sun/star/i18n/Currency.idl new file mode 100644 index 000000000000..d4f6671c6fe9 --- /dev/null +++ b/offapi/com/sun/star/i18n/Currency.idl @@ -0,0 +1,84 @@ +/************************************************************************* + * + * 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_Currency_idl__ +#define __com_sun_star_i18n_Currency_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Symbols, names, and attributes of a specific currency, returned in a + sequence by <member>XLocaleData::getAllCurrencies()</member>. + + @see XLocaleData + for links to DTD of XML locale data files. + */ + +published struct Currency +{ + /** ISO 4217 currency code identifier, for example, <b>EUR</b> or + <b>USD</b>. */ + string ID; + + /** Currency symbol, for example, <b>$</b>. */ + string Symbol; + + /** Currency abbreviation used by banks and in money exchange, for + example, <b>EUR</b> or <b>USD</b>. This usually should be + identical to the ISO 4217 currency code also used in the + <member>ID</member>, but doesn't necessarily have to be. */ + string BankSymbol; + + /** Name of the currency, for example, <b>Euro</b> or <b>US + Dollar</b>. Should be the localized name. */ + string Name; + + /** If this currency is the default currency for a given locale. */ + boolean Default; + + /** If this currency is the one used in compatible number format codes with + <member>FormatElement::formatIndex</member> values in the range 12..17. + Those format codes are used to generate some old style currency format + codes for compatibility with StarOffice5 and StarOffice4. + + @see com::sun::star::i18n::NumberFormatIndex + */ + boolean UsedInCompatibleFormatCodes; + + /** The number of decimal places, for example, <b>2</b> for US Dollar + or <b>0</b> for Italian Lira. */ + short DecimalPlaces; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/Currency2.idl b/offapi/com/sun/star/i18n/Currency2.idl new file mode 100644 index 000000000000..e6a7cc2a5090 --- /dev/null +++ b/offapi/com/sun/star/i18n/Currency2.idl @@ -0,0 +1,68 @@ +/************************************************************************* + * + * 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_Currency2_idl__ +#define __com_sun_star_i18n_Currency2_idl__ + +#ifndef __com_sun_star_i18n_Currency_idl__ +#include <com/sun/star/i18n/Currency.idl> +#endif + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Symbols, names, and attributes of a specific currency, returned in a + sequence by <member>XLocaleData2::getAllCurrencies2()</member>. + + <p> It is derived from + <type scope="::com::sun::star::i18n">Currency</type> and provides an + additional flag for currency entries that are available only for legacy + reasons in context of loaded documents that use them, but otherwise + should not be offered to the user to be selectable. + + @see XLocaleData + for links to DTD of XML locale data files. + */ + +published struct Currency2 : com::sun::star::i18n::Currency +{ + /** If set, the currency and/or its symbol is only to be used in + legacy context. + + @since OOo 2.0.3 + */ + boolean LegacyOnly; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/DirectionProperty.idl b/offapi/com/sun/star/i18n/DirectionProperty.idl new file mode 100644 index 000000000000..7a46b8a5b6e9 --- /dev/null +++ b/offapi/com/sun/star/i18n/DirectionProperty.idl @@ -0,0 +1,67 @@ +/************************************************************************* + * + * 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_DirectionProperty_idl__ +#define __com_sun_star_i18n_DirectionProperty_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Direction properties returned by + <method>XCharacterClassification::getCharacterDirection</method>. + */ + +published enum DirectionProperty +{ + LEFT_TO_RIGHT = 0, + RIGHT_TO_LEFT = 1, + EUROPEAN_NUMBER = 2, + EUROPEAN_NUMBER_SEPARATOR = 3, + EUROPEAN_NUMBER_TERMINATOR = 4, + ARABIC_NUMBER = 5, + COMMON_NUMBER_SEPARATOR = 6, + BLOCK_SEPARATOR = 7, + SEGMENT_SEPARATOR = 8, + WHITE_SPACE_NEUTRAL = 9, + OTHER_NEUTRAL = 10, + LEFT_TO_RIGHT_EMBEDDING = 11, + LEFT_TO_RIGHT_OVERRIDE = 12, + RIGHT_TO_LEFT_ARABIC = 13, + RIGHT_TO_LEFT_EMBEDDING = 14, + RIGHT_TO_LEFT_OVERRIDE = 15, + POP_DIRECTIONAL_FORMAT = 16, + DIR_NON_SPACING_MARK = 17, + BOUNDARY_NEUTRAL = 18 +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/ForbiddenCharacters.idl b/offapi/com/sun/star/i18n/ForbiddenCharacters.idl new file mode 100644 index 000000000000..11ec09f834fe --- /dev/null +++ b/offapi/com/sun/star/i18n/ForbiddenCharacters.idl @@ -0,0 +1,57 @@ +/************************************************************************* + * + * 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_ForbiddenCharacters_idl__ +#define __com_sun_star_i18n_ForbiddenCharacters_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Locale (mostly CJK) dependent characters that are forbidden at the + start or end of a line. + + <p> Returned by + <method>XLocaleData::getForbiddenCharacters</method> and used with + <type>XForbiddenCharacters</type> methods. + */ + +published struct ForbiddenCharacters +{ + /// Characters forbidden at the start of a line + string beginLine; + + /// Characters forbidden at the end of a line. + string endLine; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/FormatElement.idl b/offapi/com/sun/star/i18n/FormatElement.idl new file mode 100644 index 000000000000..deb39eba5123 --- /dev/null +++ b/offapi/com/sun/star/i18n/FormatElement.idl @@ -0,0 +1,77 @@ +/************************************************************************* + * + * 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_FormatElement_idl__ +#define __com_sun_star_i18n_FormatElement_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + One number format code and its attributes, returned in a sequence by + <member>XLocaleData::getAllFormats()</member>. + + <p> Contains raw data defined in the XML locale data files. </p> + + @see XLocaleData + for links to DTD of XML locale data files. + */ + +published struct FormatElement +{ + /** The format code, for example, "YYYY-MM-DD". */ + string formatCode; + + /** A name or description that is displayed in the number formatter + dialog. */ + string formatName; + + /** A unique (within one locale) identifier. */ + string formatKey; + + /** Type may be one of "short", "medium", "long". */ + string formatType; + + /** Usage category, for example, "DATE" or "FIXED_NUMBER", + corresponding with <type>KNumberFormatUsage</type> values. */ + string formatUsage; + + /** The index used by the number formatter, predefined values + corresponding with <type>NumberFormatIndex</type> values. */ + short formatIndex; + + /** If a format code is the default code of a <em>formatType</em> + group. */ + boolean isDefault; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/Implementation.idl b/offapi/com/sun/star/i18n/Implementation.idl new file mode 100644 index 000000000000..15e99a22bdd8 --- /dev/null +++ b/offapi/com/sun/star/i18n/Implementation.idl @@ -0,0 +1,55 @@ +/************************************************************************* + * + * 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_Implementation_idl__ +#define __com_sun_star_i18n_Implementation_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Implementation name details returned in a sequence by + <member>XLocaleData::getCollatorImplementations()</member>. + + @see XLocaleData + for links to DTD of XML locale data files. + */ + +published struct Implementation +{ + /// The implementation name. + string unoID; + /// If this is the default implementation. + boolean isDefault; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/IndexEntrySupplier.idl b/offapi/com/sun/star/i18n/IndexEntrySupplier.idl new file mode 100644 index 000000000000..cb988eeb7520 --- /dev/null +++ b/offapi/com/sun/star/i18n/IndexEntrySupplier.idl @@ -0,0 +1,53 @@ +/************************************************************************* + * + * 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_IndexEntrySupplier_idl__ +#define __com_sun_star_i18n_IndexEntrySupplier_idl__ + +#include <com/sun/star/lang/XServiceInfo.idl> +#include <com/sun/star/i18n/XIndexEntrySupplier.idl> +#include <com/sun/star/i18n/XExtendedIndexEntrySupplier.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/// Supplier for creating index entries in a "table of alphabetical index" +published service IndexEntrySupplier +{ + interface com::sun::star::i18n::XIndexEntrySupplier; + interface com::sun::star::lang::XServiceInfo; + + [optional] interface com::sun::star::i18n::XExtendedIndexEntrySupplier; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/InputSequenceCheckMode.idl b/offapi/com/sun/star/i18n/InputSequenceCheckMode.idl new file mode 100644 index 000000000000..f94970c106bc --- /dev/null +++ b/offapi/com/sun/star/i18n/InputSequenceCheckMode.idl @@ -0,0 +1,61 @@ +/************************************************************************* + * + * 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_InputSequenceCheckMode_idl__ +#define __com_sun_star_i18n_InputSequenceCheckMode_idl__ + + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +//-------------------------------------------------------------------------- +/** Input check mode constants to use with + <member>XInputSequenceChecker::checkInputSequence()</member> + + @since OOo 1.1.2 +*/ + +published constants InputSequenceCheckMode +{ + /// Pass through mode (no checking) + const short PASSTHROUGH = 0; + + /// Basic checking mode + const short BASIC = 1; + + /// Strict checking mode + const short STRICT = 2; +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/InputSequenceChecker.idl b/offapi/com/sun/star/i18n/InputSequenceChecker.idl new file mode 100644 index 000000000000..38951efcbf30 --- /dev/null +++ b/offapi/com/sun/star/i18n/InputSequenceChecker.idl @@ -0,0 +1,55 @@ +/************************************************************************* + * + * 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_InputSequenceChecker_idl__ +#define __com_sun_star_i18n_InputSequenceChecker_idl__ + +#include <com/sun/star/lang/XServiceInfo.idl> +#include <com/sun/star/i18n/XExtendedInputSequenceChecker.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Check input sequence of CTL languages like Thai or Hindi. + + @since OOo 1.1.2 +*/ +published service InputSequenceChecker +{ + interface com::sun::star::i18n::XInputSequenceChecker; + interface com::sun::star::lang::XServiceInfo; + + [optional] interface com::sun::star::i18n::XExtendedInputSequenceChecker; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/KCharacterType.idl b/offapi/com/sun/star/i18n/KCharacterType.idl new file mode 100644 index 000000000000..099c8a1a16af --- /dev/null +++ b/offapi/com/sun/star/i18n/KCharacterType.idl @@ -0,0 +1,78 @@ +/************************************************************************* + * + * 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_KCharacterType_idl__ +#define __com_sun_star_i18n_KCharacterType_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Constants to identify the character type. + + <p> Returned by + <member>XCharacterClassification::getCharacterType()</member> and + <member>XCharacterClassification::getStringType()</member> </p> + */ + +published constants KCharacterType +{ + /// digit + const long DIGIT = 0x00000001; + + /// upper case alpha letter + const long UPPER = 0x00000002; + + /// lower case alpha letter + const long LOWER = 0x00000004; + + /// title case alpha letter + const long TITLE_CASE = 0x00000008; + + /// any alpha, ALPHA = UPPER | LOWER | TITLE_CASE + const long ALPHA = 0x0000000E; + + /// control character + const long CONTROL = 0x00000010; + + /// printable character + const long PRINTABLE = 0x00000020; + + /// base form + const long BASE_FORM = 0x00000040; + + /** any <type>UnicodeType</type>::..._LETTER. + Note that a LETTER must not necessarily be ALPHA */ + const long LETTER = 0x00000080; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/KNumberFormatType.idl b/offapi/com/sun/star/i18n/KNumberFormatType.idl new file mode 100644 index 000000000000..3d9ffc51b991 --- /dev/null +++ b/offapi/com/sun/star/i18n/KNumberFormatType.idl @@ -0,0 +1,54 @@ +/************************************************************************* + * + * 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_KNumberFormatType_idl__ +#define __com_sun_star_i18n_KNumberFormatType_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Attribute of number format, classifies the length of the formatted + display string. + */ + +published constants KNumberFormatType +{ + /// Short display string + const short SHORT = 1; + /// Medium length display string + const short MEDIUM = 2; + /// Long display string + const short LONG = 3; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/KNumberFormatUsage.idl b/offapi/com/sun/star/i18n/KNumberFormatUsage.idl new file mode 100644 index 000000000000..0300c4dfbd3a --- /dev/null +++ b/offapi/com/sun/star/i18n/KNumberFormatUsage.idl @@ -0,0 +1,63 @@ +/************************************************************************* + * + * 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_KNumberFormatUsage_idl__ +#define __com_sun_star_i18n_KNumberFormatUsage_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Category of number format code. + */ + +published constants KNumberFormatUsage +{ + /// Date format, for example, "YYYY-MM-DD". + const short DATE = 1; + /// Time format, for example, "HH:MM:SS". + const short TIME = 2; + /// Mixed date/time format, for example, "YYYY-MM-DD HH:MM:SS". + const short DATE_TIME = 3; + /// Numeric format, for example, "#,##0.00". + const short FIXED_NUMBER = 4; + /// Fractional format, for example, "# ??/??". + const short FRACTION_NUMBER = 5; + /// Percent format, for example, "0.00%". + const short PERCENT_NUMBER = 6; + /// Scientific format, for example, "0.00E+00". + const short SCIENTIFIC_NUMBER = 7; + /// Currency format, for example, "#,##0.00 [$EUR]" + const short CURRENCY = 8; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/KParseTokens.idl b/offapi/com/sun/star/i18n/KParseTokens.idl new file mode 100644 index 000000000000..fccaf55e31fb --- /dev/null +++ b/offapi/com/sun/star/i18n/KParseTokens.idl @@ -0,0 +1,178 @@ +/************************************************************************* + * + * 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_KParseTokens_idl__ +#define __com_sun_star_i18n_KParseTokens_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + These constants specify the characters a name or identifier token to + be parsed can have. + + <p> They are passed to + <member>XCharacterClassification::parseAnyToken()</member> and + <member>XCharacterClassification::parsePredefinedToken()</member>. + They are also set in the <member>ParseResult::StartFlags</member> + and <member>ParseResult::ContFlags</member>. </p> + */ + +published constants KParseTokens +{ + /// ASCII A-Z upper alpha + const long ASC_UPALPHA = 0x00000001; + + /// ASCII a-z lower alpha + const long ASC_LOALPHA = 0x00000002; + + /// ASCII 0-9 digit + const long ASC_DIGIT = 0x00000004; + + /// ASCII '_' underscore + const long ASC_UNDERSCORE = 0x00000008; + + /// ASCII '$' dollar + const long ASC_DOLLAR = 0x00000010; + + /// ASCII '.' dot/point + const long ASC_DOT = 0x00000020; + + /// ASCII ':' colon + const long ASC_COLON = 0x00000040; + + /// Special value to allow control characters (0x00 < char < 0x20) + const long ASC_CONTROL = 0x00000200; + + /** Special value to allow anything below 128 except control + characters. <strong>Not</strong> set in + <type>ParseResult</type>. */ + const long ASC_ANY_BUT_CONTROL = 0x00000400; + + /** Additional flag set in <member>ParseResult::StartFlags</member> + or <member>ParseResult::ContFlags</member>. Set if none of the + above ASC_... (except ASC_ANY_...) single values match an ASCII + character parsed. */ + const long ASC_OTHER = 0x00000800; + + /// Unicode (above 127) upper case letter + const long UNI_UPALPHA = 0x00001000; + + /// Unicode (above 127) lower case letter + const long UNI_LOALPHA = 0x00002000; + + /// Unicode (above 127) decimal digit number + const long UNI_DIGIT = 0x00004000; + + /// Unicode (above 127) title case letter + const long UNI_TITLE_ALPHA = 0x00008000; + + /// Unicode (above 127) modifier letter + const long UNI_MODIFIER_LETTER = 0x00010000; + + /// Unicode (above 127) other letter + const long UNI_OTHER_LETTER = 0x00020000; + + /// Unicode (above 127) letter number + const long UNI_LETTER_NUMBER = 0x00040000; + + /// Unicode (above 127) other number + const long UNI_OTHER_NUMBER = 0x00080000; + + /** If this bit is set in <em>nContCharFlags</em> parameters and a + string enclosed in double quotes is parsed and two consecutive + double quotes are encountered, the string is ended. If this bit + is not set, the two double quotes are parsed as one escaped + double quote and string parsing continues. The bit is ignored in + <em>nStartCharFlags</em> parameters. + + <p> Example: <br/> + "abc""def" --> bit not set => abc"def <br/> + "abc""def" --> bit set => abc </p> + */ + const long TWO_DOUBLE_QUOTES_BREAK_STRING = 0x10000000; + + /** Additional flag set in <member>ParseResult::StartFlags</member> + or <member>ParseResult::ContFlags</member>. Set if none of the + above UNI_... single values match a Unicode character parsed. */ + const long UNI_OTHER = 0x20000000; + + /** Only valid for <em>nStartCharFlags</em> parameter to + <method>ChararacterClassification::parseAnyToken</method> and + <method>ChararacterClassification::parsePredefinedToken</method>, + ignored on <em>nContCharFlags</em> parameter. + <strong>Not</strong> set in <type>ParseResult</type>. */ + const long IGNORE_LEADING_WS = 0x40000000; + + + // useful combinations + + /// ASCII a-zA-Z lower or upper alpha + const long ASC_ALPHA = ASC_UPALPHA | ASC_LOALPHA; + + /// ASCII a-zA-Z0-9 alphanumeric + const long ASC_ALNUM = ASC_ALPHA | ASC_DIGIT; + + /// Unicode (above 127) lower or upper or title case alpha + const long UNI_ALPHA = UNI_UPALPHA | UNI_LOALPHA | UNI_TITLE_ALPHA; + + /// Unicode (above 127) alphanumeric + const long UNI_ALNUM = UNI_ALPHA | UNI_DIGIT; + + /// Unicode (above 127) alpha or letter + const long UNI_LETTER = UNI_ALPHA | UNI_MODIFIER_LETTER | + UNI_OTHER_LETTER; + + /// Unicode (above 127) number + const long UNI_NUMBER = UNI_DIGIT | UNI_LETTER_NUMBER | + UNI_OTHER_NUMBER; + + /// any (ASCII or Unicode) alpha + const long ANY_ALPHA = ASC_ALPHA | UNI_ALPHA; + + /// any (ASCII or Unicode) digit + const long ANY_DIGIT = ASC_DIGIT | UNI_DIGIT; + + /// any (ASCII or Unicode) alphanumeric + const long ANY_ALNUM = ASC_ALNUM | UNI_ALNUM; + + /// any (ASCII or Unicode) letter + const long ANY_LETTER = ASC_ALPHA | UNI_LETTER; + + /// any (ASCII or Unicode) number + const long ANY_NUMBER = ASC_DIGIT | UNI_NUMBER; + + /// any (ASCII or Unicode) letter or number + const long ANY_LETTER_OR_NUMBER = ANY_LETTER | ANY_NUMBER; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/KParseType.idl b/offapi/com/sun/star/i18n/KParseType.idl new file mode 100644 index 000000000000..eaf34d2de4a9 --- /dev/null +++ b/offapi/com/sun/star/i18n/KParseType.idl @@ -0,0 +1,92 @@ +/************************************************************************* + * + * 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_KParseType_idl__ +#define __com_sun_star_i18n_KParseType_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Constants to specify the type of a parsed token. + + <p> Set by + <member>XCharacterClassification::parseAnyToken()</member> and + <member>XCharacterClassification::parsePredefinedToken()</member> in + <member>ParseResult::TokenType</member>. </p> + */ + +published constants KParseType +{ + /// One single character like ! # ; : $ et al. + const long ONE_SINGLE_CHAR = 0x00000001; + + // For human .idl readers: <, >, <>, =, <=, >= + /// A Boolean operator like <, >, <>, =, <=, >= + const long BOOLEAN = 0x00000002; + + /// A name matching the conditions passed. + const long IDENTNAME = 0x00000004; + + + // Hint for human .idl readers: do not get confused about the double + // quotation marks, they are needed for the unoidl compiler which otherwise + // gets confused about the single quotation marks. + /** "A single-quoted name matching the conditions passed ( 'na\'me' )." + "Dequoted name in <member>ParseResult::DequotedNameOrString</member> ( na'me )." */ + const long SINGLE_QUOTE_NAME = 0x00000008; + + /** A double-quoted string ( "str\"i""ng" ). Dequoted string in + <member>ParseResult::DequotedNameOrString</member> ( str"i"ng ). */ + const long DOUBLE_QUOTE_STRING = 0x00000010; + + /** A number where all digits are ASCII characters. + Numerical value in <member>ParseResult::Value</member>. */ + const long ASC_NUMBER = 0x00000020; + + /** A number where at least some digits are Unicode (and maybe + ASCII) characters. Numerical value inKParseType + <member>ParseResult::Value</member>. */ + const long UNI_NUMBER = 0x00000040; + + /** Set (ored) if SINGLE_QUOTE_NAME or DOUBLE_QUOTE_STRING has no + closing quote. */ + const long MISSING_QUOTE = 0x40000000; + + + // useful combinations + + /// Any ASCII or Unicode number + const long ANY_NUMBER = ASC_NUMBER | UNI_NUMBER; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/LanguageCountryInfo.idl b/offapi/com/sun/star/i18n/LanguageCountryInfo.idl new file mode 100644 index 000000000000..74c6ccf4aebd --- /dev/null +++ b/offapi/com/sun/star/i18n/LanguageCountryInfo.idl @@ -0,0 +1,63 @@ +/************************************************************************* + * + * 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_LanguageCountryInfo_idl__ +#define __com_sun_star_i18n_LanguageCountryInfo_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + The language and country identifiers and descriptive names of the + loaded locale data returned by + <member>XLocaleData::getLanguageCountryInfo()</member>. + + @see XLocaleData + for links to DTD of XML locale data files. + */ + +published struct LanguageCountryInfo +{ + /// ISO-639 language code, for example, "en" or "de" + string Language; + /// Descriptive language name, for example, "English" or "German" + string LanguageDefaultName; + /// ISO-3166 country code, for example, "US" or "DE" + string Country; + /// Descriptive country name, for example, "United States" or "Germany" + string CountryDefaultName; + /// A variant name + string Variant; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/LineBreakHyphenationOptions.idl b/offapi/com/sun/star/i18n/LineBreakHyphenationOptions.idl new file mode 100644 index 000000000000..fb58e57fc9d1 --- /dev/null +++ b/offapi/com/sun/star/i18n/LineBreakHyphenationOptions.idl @@ -0,0 +1,59 @@ +/************************************************************************* + * + * 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_LineBreakHyphenationOptions_idl__ +#define __com_sun_star_i18n_LineBreakHyphenationOptions_idl__ + +#ifndef __com_sun_star_linguistic2_XHyphenator_idl__ +#include <com/sun/star/linguistic2/XHyphenator.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Hyphenation options passed in calls to <member>XBreakIterator::getLineBreak()</member>. + */ +published struct LineBreakHyphenationOptions +{ + /// Reference to the specific hyphenator - can be zero. + ::com::sun::star::linguistic2::XHyphenator rHyphenator; + + /** Sequence of property values to be used by the hyphenator - can be + empty if the default values (from the property set) should be used. */ + ::com::sun::star::beans::PropertyValues aHyphenationOptions; + + /** The first character not fitting to the current line, + considering an additional "-" for hyphenation */ + long hyphenIndex; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/LineBreakResults.idl b/offapi/com/sun/star/i18n/LineBreakResults.idl new file mode 100644 index 000000000000..00b34baeee68 --- /dev/null +++ b/offapi/com/sun/star/i18n/LineBreakResults.idl @@ -0,0 +1,57 @@ +/************************************************************************* + * + * 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_LineBreakResults_idl__ +#define __com_sun_star_i18n_LineBreakResults_idl__ + +#ifndef __com_sun_star_linguistic2_XHyphenatedWord_idl__ +#include <com/sun/star/linguistic2/XHyphenatedWord.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Results of method <member>XBreakIterator::getLineBreak()</member>. + */ +published struct LineBreakResults +{ + /// Type of line break, see <type>BreakType</type>. + short breakType; + + /// Position of the calculated line break. + long breakIndex; + + /// Return value of the hyphenator. + ::com::sun::star::linguistic2::XHyphenatedWord rHyphenatedWord; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/LineBreakUserOptions.idl b/offapi/com/sun/star/i18n/LineBreakUserOptions.idl new file mode 100644 index 000000000000..549a3ccba89e --- /dev/null +++ b/offapi/com/sun/star/i18n/LineBreakUserOptions.idl @@ -0,0 +1,62 @@ +/************************************************************************* + * + * 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_LineBreakUserOptions_idl__ +#define __com_sun_star_i18n_LineBreakUserOptions_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Line break options passed in calls to <member>XBreakIterator::getLineBreak()</member>. + */ +published struct LineBreakUserOptions +{ + /// Characters not allowed at the beginning of a line. + string forbiddenBeginCharacters; + + /// Characters not allowed at the end of a line. + string forbiddenEndCharacters; + + /// If the forbidden characters rules are to be applied or not. + boolean applyForbiddenRules; + + /** If punctuation characters are allowed at the end of the line if + outside of the margins, resulting in a line not being wrapped if only + the punctuation would wrap. */ + boolean allowPunctuationOutsideMargin; + + /// Allow English hyphenation. + boolean allowHyphenateEnglish; + +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/LocaleCalendar.idl b/offapi/com/sun/star/i18n/LocaleCalendar.idl new file mode 100644 index 000000000000..e34d88731378 --- /dev/null +++ b/offapi/com/sun/star/i18n/LocaleCalendar.idl @@ -0,0 +1,53 @@ +/************************************************************************* + * + * 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_LocaleCalendar_idl__ +#define __com_sun_star_i18n_LocaleCalendar_idl__ + +#include <com/sun/star/lang/XServiceInfo.idl> +#include <com/sun/star/i18n/XCalendar.idl> +#include <com/sun/star/i18n/XExtendedCalendar.idl> + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/// Access a locale specific calendar. +published service LocaleCalendar +{ + interface com::sun::star::i18n::XCalendar; + interface com::sun::star::lang::XServiceInfo; + + [optional] interface com::sun::star::i18n::XExtendedCalendar; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/LocaleData.idl b/offapi/com/sun/star/i18n/LocaleData.idl new file mode 100644 index 000000000000..69846c11948f --- /dev/null +++ b/offapi/com/sun/star/i18n/LocaleData.idl @@ -0,0 +1,52 @@ +/************************************************************************* + * + * 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_LocaleData_idl__ +#define __com_sun_star_i18n_LocaleData_idl__ + +#include <com/sun/star/lang/XServiceInfo.idl> +#include <com/sun/star/i18n/XLocaleData2.idl> + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/// Access locale specific data. +published service LocaleData +{ + interface com::sun::star::i18n::XLocaleData; + interface com::sun::star::lang::XServiceInfo; + + [optional] interface com::sun::star::i18n::XLocaleData2; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/LocaleDataItem.idl b/offapi/com/sun/star/i18n/LocaleDataItem.idl new file mode 100644 index 000000000000..d628c0a40196 --- /dev/null +++ b/offapi/com/sun/star/i18n/LocaleDataItem.idl @@ -0,0 +1,85 @@ +/************************************************************************* + * + * 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_LocaleDataItem_idl__ +#define __com_sun_star_i18n_LocaleDataItem_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Locale specific data, for example, separators, quotation marks. + + @see XLocaleData + for links to DTD of XML locale data files. + */ + +published struct LocaleDataItem +{ + /// internal ID string, not unique, not meaningful to the outer world + string unoID; + /// date separator, for example, <b>"/"</b> or <b>"."</b> or <b>"-"</b> + string dateSeparator; + /// group and thousand separator, for example, <b>","</b> or <b>"."</b> + string thousandSeparator; + /// decimal separator, for example, <b>"."</b> or <b>","</b> + string decimalSeparator; + /// time separator, for example, <b>":"</b> + string timeSeparator; + /// time 100th seconds separator, for example, <b>","</b> + string time100SecSeparator; + /// list separator, for example, <b>";"</b> + string listSeparator; + /// single quotation mark start + string quotationStart; + /// single quotation mark end + string quotationEnd; + /// double quotation mark start + string doubleQuotationStart; + /// double quotation mark end + string doubleQuotationEnd; + /// time AM symbol, for example, <b>"AM"</b> or <b>"am"</b> + string timeAM; + /// time PM symbol, for example, <b>"PM"</b> or <b>"pm"</b> + string timePM; + /// measurement system, <b>"metric"</b> or <b>"us"</b> + string measurementSystem; + /// long date day of week separator, for example, <b>", "</b> + string LongDateDayOfWeekSeparator; + /// long date day separator, for example, <b>", "</b> + string LongDateDaySeparator; + /// long date month separator, for example, <b>" "</b> + string LongDateMonthSeparator; + /// long date year separator, for example, <b>" "</b> + string LongDateYearSeparator; +}; + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/LocaleItem.idl b/offapi/com/sun/star/i18n/LocaleItem.idl new file mode 100644 index 000000000000..ef2a19b4bc27 --- /dev/null +++ b/offapi/com/sun/star/i18n/LocaleItem.idl @@ -0,0 +1,102 @@ +/************************************************************************* + * + * 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_LocaleItem_idl__ +#define __com_sun_star_i18n_LocaleItem_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + @deprecated internal + Constant values identifying specific locale data items. + + <p> These are not used with the API but with an OOo internal wrapper class + that caches the contents of an instance of <type>LocaleDataItem</type> and + uses these values to access it's members for faster access. </p> + + <p> Whenever locale data items were added these values and the wrapper + class would have to be adjusted to give the application an easier access. + </p> + */ + +published constants LocaleItem +{ + /// @see ::com::sun::star::i18n::LocaleDataItem::dateSeparator + const short DATE_SEPARATOR = 0; + /// @see com::sun::star::i18n::LocaleDataItem::thousandSeparator + const short THOUSAND_SEPARATOR = 1; + /// @see com::sun::star::i18n::LocaleDataItem::decimalSeparator + const short DECIMAL_SEPARATOR = 2; + /// @see com::sun::star::i18n::LocaleDataItem::timeSeparator + const short TIME_SEPARATOR = 3; + /// @see com::sun::star::i18n::LocaleDataItem::time100SecSeparator + const short TIME_100SEC_SEPARATOR = 4; + /// @see com::sun::star::i18n::LocaleDataItem::listSeparator + const short LIST_SEPARATOR = 5; + /// @see com::sun::star::i18n::LocaleDataItem::quotationStart + const short SINGLE_QUOTATION_START = 6; + /// @see com::sun::star::i18n::LocaleDataItem::quotationEnd + const short SINGLE_QUOTATION_END = 7; + /// @see com::sun::star::i18n::LocaleDataItem::doubleQuotationStart + const short DOUBLE_QUOTATION_START = 8; + /// @see com::sun::star::i18n::LocaleDataItem::doubleQuotationEnd + const short DOUBLE_QUOTATION_END = 9; + /// @see com::sun::star::i18n::LocaleDataItem::timeAM + const short MEASUREMENT_SYSTEM = 10; + /// @see com::sun::star::i18n::LocaleDataItem::timePM + const short TIME_AM = 11; + /// @see com::sun::star::i18n::LocaleDataItem::measurementSystem + const short TIME_PM = 12; + /// @see com::sun::star::i18n::LocaleDataItem::LongDateDayOfWeekSeparator + const short LONG_DATE_DAY_OF_WEEK_SEPARATOR = 13; + /// @see com::sun::star::i18n::LocaleDataItem::LongDateDaySeparator + const short LONG_DATE_DAY_SEPARATOR = 14; + /// @see com::sun::star::i18n::LocaleDataItem::LongDateMonthSeparator + const short LONG_DATE_MONTH_SEPARATOR = 15; + /// @see com::sun::star::i18n::LocaleDataItem::LongDateYearSeparator + const short LONG_DATE_YEAR_SEPARATOR = 16; + + //! New values may be inserted here if locale data provides them. + //! Do not forget to adjust the COUNT value. + + /// count of items available + const short COUNT = 17; +}; + + +//============================================================================= + +}; }; }; }; + +//============================================================================= + +#endif + diff --git a/offapi/com/sun/star/i18n/Months.idl b/offapi/com/sun/star/i18n/Months.idl new file mode 100644 index 000000000000..8ea0c03b25d0 --- /dev/null +++ b/offapi/com/sun/star/i18n/Months.idl @@ -0,0 +1,72 @@ +/************************************************************************* + * + * 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_Months_idl__ +#define __com_sun_star_i18n_Months_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Constants for month names used in calls to <member>XCalendar::getDisplayName()</member>. + */ + +published constants Months +{ + /// January + const short JANUARY = 0; + /// February + const short FEBURARY = 1; + /// March + const short MARCH = 2; + /// April + const short APRIL = 3; + /// May + const short MAY = 4; + /// June + const short JUNE = 5; + /// July + const short JULY = 6; + /// August + const short AUGUST = 7; + /// September + const short SEPTEMBER = 8; + /// October + const short OCTOBER = 9; + /// November + const short NOVEMBER = 10; + /// December + const short DECEMBER = 11; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/MultipleCharsOutputException.idl b/offapi/com/sun/star/i18n/MultipleCharsOutputException.idl new file mode 100644 index 000000000000..f0dcd01ee0f9 --- /dev/null +++ b/offapi/com/sun/star/i18n/MultipleCharsOutputException.idl @@ -0,0 +1,58 @@ +/************************************************************************* + * + * 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_MultipleCharsOutputException_idl__ +#define __com_sun_star_i18n_MultipleCharsOutputException_idl__ + +#ifndef __com_sun_star_uno_Exception_idl__ +#include <com/sun/star/uno/Exception.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Indicates transliteration generated multiple characters output but + only single character return value was requested. + + <p> Used by + <method>XExtendedTransliteration::transliterateChar2Char()</method> + </p> + + @since OOo 1.1.2 + */ +published exception MultipleCharsOutputException : ::com::sun::star::uno::Exception +{ +}; + +//============================================================================= +}; }; }; }; +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/i18n/NativeNumberMode.idl b/offapi/com/sun/star/i18n/NativeNumberMode.idl new file mode 100644 index 000000000000..c3294973739c --- /dev/null +++ b/offapi/com/sun/star/i18n/NativeNumberMode.idl @@ -0,0 +1,144 @@ +/************************************************************************* + * + * 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_NativeNumberMode_idl__ +#define __com_sun_star_i18n_NativeNumberMode_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Constants to use with + <member>XExtendedCalendar::getDisplayString()</member> and the + <type>XNativeNumberSupplier</type> methods. + + <p> The constants have different meanings if used with different + locales. However, <const>NATNUM1</const> always tries to convert to + a string matching the native number mode of the corresponding + locale. </p> + + <p> Where available, the corresponding Microsoft Excel (tm) DBNum + number format code modifier is listed. </p> + + <p> Modifiers supported by XExtendedCalendar::getDisplayString() are + marked with CAL: for the specific language and the corresponding + DBNum modifier and the NatNum values used for Y/M/D are listed </p> + + @since OOo 1.1.2 + */ + +published constants NativeNumberMode +{ + /** Transliteration to ASCII Arabic digits. + Try to convert any native number string to ASCII. + If already ASCII it remains ASCII. + */ + const short NATNUM0 = 0; + + /** Transliteration in <br/> + Chinese: Chinese lower case characters; CAL: 1/7/7 [DBNum1] <br/> + Japanese: short Kanji characters [DBNum1]; CAL: 1/4/4 [DBNum1] <br/> + Korean: Korean lower case characters [DBNum1]; CAL: 1/7/7 [DBNum1] <br/> + Thai: Thai characters <br/> + Arabic: Indic characters <br/> + Indic: Indic characters + */ + const short NATNUM1 = 1; + + /** Transliteration in <br/> + Chinese: Chinese upper case characters; CAL: 2/8/8 [DBNum2] <br/> + Japanese: traditional Kanji characters; CAL: 2/5/5 [DBNum2] <br/> + Korean: Korean upper case characters [DBNum2]; CAL: 2/8/8 [DBNum2] + */ + const short NATNUM2 = 2; + + /** Transliteration in <br/> + Chinese: fullwidth Arabic digits; CAL: 3/3/3 [DBNum3] <br/> + Japanese: fullwidth Arabic digits; CAL: 3/3/3 [DBNum3] <br/> + Korean: fullwidth Arabic digits [DBNum3]; CAL: 3/3/3 [DBNum3] + */ + const short NATNUM3 = 3; + + /** Transliteration in <br/> + Chinese: lower case text [DBNum1] <br/> + Japanese: modern long Kanji text [DBNum2] <br/> + Korean: formal lower case text + */ + const short NATNUM4 = 4; + + /** Transliteration in <br/> + Chinese: Chinese upper case text [DBNum2] <br/> + Japanese: traditional long Kanji text [DBNum3] <br/> + Korean: formal upper case text + */ + const short NATNUM5 = 5; + + /** Transliteration in <br/> + Chinese: fullwidth text [DBNum3] <br/> + Japanese: fullwidth text <br/> + Korean: fullwidth text + */ + const short NATNUM6 = 6; + + /** Transliteration in <br/> + Chinese: short lower case text <br/> + Japanese: modern short Kanji text <br/> + Korean: informal lower case text + */ + const short NATNUM7 = 7; + + /** Transliteration in <br/> + Chinese: short upper case text <br/> + Japanese: traditional short Kanji text [DBNum4] <br/> + Korean: informal upper case text + */ + const short NATNUM8 = 8; + + /** Transliteration in <br/> + Korean: Hangul characters + */ + const short NATNUM9 = 9; + + /** Transliteration in <br/> + Korean: formal Hangul text [DBNum4]; CAL: 9/11/11 [DBNum4] + */ + const short NATNUM10 = 10; + + /** Transliteration in <br/> + Korean: informal Hangul text + */ + const short NATNUM11 = 11; + +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/NativeNumberSupplier.idl b/offapi/com/sun/star/i18n/NativeNumberSupplier.idl new file mode 100644 index 000000000000..2f0f6fda1dc8 --- /dev/null +++ b/offapi/com/sun/star/i18n/NativeNumberSupplier.idl @@ -0,0 +1,53 @@ +/************************************************************************* + * + * 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_NativeNumberSupplier_idl__ +#define __com_sun_star_i18n_NativeNumberSupplier_idl__ + +#include <com/sun/star/lang/XServiceInfo.idl> +#include <com/sun/star/i18n/XNativeNumberSupplier.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Supplier for transliteration of numerals (native number strings). + + @since OOo 1.1.2 +*/ +published service NativeNumberSupplier +{ + interface com::sun::star::i18n::XNativeNumberSupplier; + interface com::sun::star::lang::XServiceInfo; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/NativeNumberXmlAttributes.idl b/offapi/com/sun/star/i18n/NativeNumberXmlAttributes.idl new file mode 100644 index 000000000000..efc7e663cd4b --- /dev/null +++ b/offapi/com/sun/star/i18n/NativeNumberXmlAttributes.idl @@ -0,0 +1,68 @@ +/************************************************************************* + * + * 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_NativeNumberXmlAttributes_idl__ +#define __com_sun_star_i18n_NativeNumberXmlAttributes_idl__ + +#include <com/sun/star/lang/Locale.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Attributes describing a native number mode for a specific locale, + stored in XML file format. + + <p> Used with + <member>XNativeNumberSupplier::convertToXmlAttributes()</member> and + <member>XNativeNumberSupplier::convertFromXmlAttributes()</member> + </p> + + @since OOo 1.1.2 + */ + +published struct NativeNumberXmlAttributes +{ + /// The locale of the native number representation + ::com::sun::star::lang::Locale Locale; + + /// The number "1" expressed as a native number string. + string Format; + + /** The type of the number string, for example, "short" or "medium" + or "long". */ + string Style; + +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/NumberFormatCode.idl b/offapi/com/sun/star/i18n/NumberFormatCode.idl new file mode 100644 index 000000000000..ca0039db5ce2 --- /dev/null +++ b/offapi/com/sun/star/i18n/NumberFormatCode.idl @@ -0,0 +1,62 @@ +/************************************************************************* + * + * 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_NumberFormatCode_idl__ +#define __com_sun_star_i18n_NumberFormatCode_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Number format code information returned by various + <type>XNumberFormatCode</type> methods. + */ + +published struct NumberFormatCode +{ + /// One of <type>KNumberFormatType</type> values. + short Type; + /// One of <type>KNumberFormatUsage</type> values. + short Usage; + /// Format code, for example, "YYYY-MM-DD". + string Code; + /// Descriptive name of the format for this locale. + string DefaultName; + /// Message identifier to be used if the name of the format is localized. + string NameID; + /// Index of the code as defined in <type>NumberFormatIndex</type>. + short Index; + /// If this format is the default format of the <em>Usage</em> group. + boolean Default; +}; + +//============================================================================= +}; }; }; }; + +#endif 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><FormatElement formatindex="0"></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 + diff --git a/offapi/com/sun/star/i18n/NumberFormatMapper.idl b/offapi/com/sun/star/i18n/NumberFormatMapper.idl new file mode 100644 index 000000000000..043e9450f42e --- /dev/null +++ b/offapi/com/sun/star/i18n/NumberFormatMapper.idl @@ -0,0 +1,52 @@ +/************************************************************************* + * + * 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_NumberFormatMapper_idl__ +#define __com_sun_star_i18n_NumberFormatMapper_idl__ + +#include <com/sun/star/i18n/XNumberFormatCode.idl> +#include <com/sun/star/lang/XServiceInfo.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Access locale data number format codes to use with the + number formatter +*/ + +published service NumberFormatMapper +{ + interface com::sun::star::i18n::XNumberFormatCode; + interface com::sun::star::lang::XServiceInfo; +}; + +//============================================================================= +}; }; }; }; +#endif diff --git a/offapi/com/sun/star/i18n/OrdinalSuffix.idl b/offapi/com/sun/star/i18n/OrdinalSuffix.idl new file mode 100644 index 000000000000..500ef74ccffc --- /dev/null +++ b/offapi/com/sun/star/i18n/OrdinalSuffix.idl @@ -0,0 +1,59 @@ +/************************************************************************* + * + * 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 INCLUDED_com_sun_star_i18n_OrdinalSuffix_idl +#define INCLUDED_com_sun_star_i18n_OrdinalSuffix_idl + +#include <com/sun/star/lang/XServiceInfo.idl> +#include <com/sun/star/i18n/XOrdinalSuffix.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +/** provides access to locale specific ordinal suffix systems. + + @since OOo2.2 + + @internal + + ATTENTION: This service is marked <em>internal</em> and does not + have the <em>published</em> flag, which means it is subject to + change without notice and should not be used outside the OOo core. + */ + +service OrdinalSuffix +{ + interface com::sun::star::i18n::XOrdinalSuffix; + interface com::sun::star::lang::XServiceInfo; +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/ParseResult.idl b/offapi/com/sun/star/i18n/ParseResult.idl new file mode 100644 index 000000000000..e50ac2053a07 --- /dev/null +++ b/offapi/com/sun/star/i18n/ParseResult.idl @@ -0,0 +1,83 @@ +/************************************************************************* + * + * 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_ParseResult_idl__ +#define __com_sun_star_i18n_ParseResult_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Parser results returned by + <member>XCharacterClassification::parseAnyToken()</member> and + <member>XCharacterClassification::parsePredefinedToken()</member>. + */ + +published struct ParseResult +{ + /** Count of ignored leading whitespace, in code points, not + characters. */ + long LeadingWhiteSpace; + + /** Code point index of first unprocessed character. */ + long EndPos; + + /** Number of characters (not code points) of the parsed token, not + including leading whitespace. */ + long CharLen; + + /** Value of token in case of numeric. */ + double Value; + + /** <type>KParseType</type> token type like + <const>KParseType::IDENTNAME</const>. */ + long TokenType; + + /** <type>KParseTokens</type> flags of first character of actual + token matched. If <em>TokenType</em> is a + <const>KParseType::SINGLE_QUOTE_NAME</const> or a + <const>KParseType::DOUBLE_QUOTE_STRING</const> the first + character is the first character inside the quotes, not the + quote itself. */ + long StartFlags; + + /** <type>KParseTokens</type> flags of remaining characters of + actual token matched. */ + long ContFlags; + + /** If a quoted name or string is encountered the dequoted result + goes here. */ + string DequotedNameOrString; + +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/ScriptDirection.idl b/offapi/com/sun/star/i18n/ScriptDirection.idl new file mode 100644 index 000000000000..97437d3f3b3a --- /dev/null +++ b/offapi/com/sun/star/i18n/ScriptDirection.idl @@ -0,0 +1,60 @@ +/************************************************************************* + * + * 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_ScriptDirection_idl__ +#define __com_sun_star_i18n_ScriptDirection_idl__ + + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +//-------------------------------------------------------------------------- +/** Script direction constants to use with + <type>XScriptTypeDetector</type> methods. + + @since OOo 1.1.2 +*/ + +published constants ScriptDirection +{ + /// Script direction is neutral + const short NEUTRAL = 0; + + /// Script direction is left to right + const short LEFT_TO_RIGHT = 1; + + /// Script direction is right to left + const short RIGHT_TO_LEFT = 2; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/ScriptType.idl b/offapi/com/sun/star/i18n/ScriptType.idl new file mode 100644 index 000000000000..f50ee82347f1 --- /dev/null +++ b/offapi/com/sun/star/i18n/ScriptType.idl @@ -0,0 +1,61 @@ +/************************************************************************* + * + * 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_ScriptType_idl__ +#define __com_sun_star_i18n_ScriptType_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Constants to specify the script type. + + <p> Used with <member>XBreakIterator::beginOfScript()</member>, + <member>XBreakIterator::endOfScript()</member>, + <member>XBreakIterator::nextScript()</member>, + <member>XBreakIterator::previousScript()</member> </p> + */ +published constants ScriptType +{ + /// Latin characters (English, ...) + const short LATIN = 1; + + /// Asian characters (Japanese, ...) + const short ASIAN = 2; + + /// Complex characters (Arabic, ...) + const short COMPLEX = 3; + + /// undefined characters (punctuation, ...) + const short WEAK = 4; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/TextConversion.idl b/offapi/com/sun/star/i18n/TextConversion.idl new file mode 100644 index 000000000000..42fcb192294e --- /dev/null +++ b/offapi/com/sun/star/i18n/TextConversion.idl @@ -0,0 +1,57 @@ +/************************************************************************* + * + * 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_TextConversion_idl__ +#define __com_sun_star_i18n_TextConversion_idl__ + +#ifndef __com_sun_star_i18n_XTextConversion_idl__ +#include <com/sun/star/i18n/XTextConversion.idl> +#endif + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= +/** offers generic text conversion. + + <p>This is an abstract service which does not make sense to be instatiated. + + @since OOo 1.1.2 +*/ +published service TextConversion +{ + /** to access the text conversion functionality. + */ + interface ::com::sun::star::i18n::XTextConversion; + +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/TextConversionOption.idl b/offapi/com/sun/star/i18n/TextConversionOption.idl new file mode 100644 index 000000000000..8f70cfb08bac --- /dev/null +++ b/offapi/com/sun/star/i18n/TextConversionOption.idl @@ -0,0 +1,71 @@ +/************************************************************************* + * + * 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_TextConversionOption_idl__ +#define __com_sun_star_i18n_TextConversionOption_idl__ + + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +//-------------------------------------------------------------------------- +/** Text conversion options to be used with <type>XTextConversion</type>. + + <p>These text conversion options are usuall selected by end users. + The options can be combined and may be related to + <type>TextConversionType</type>. </p> + + @since OOo 1.1.2 +*/ + +published constants TextConversionOption +{ + /// No option + const long NONE = 0; + + /// Character by character conversion + const long CHARACTER_BY_CHARACTER = 1; // (1 << 0) + + /// Ignore post-positional word for Hangul to Hanja conversion + const long IGNORE_POST_POSITIONAL_WORD = 2; // (1 << 1) + + /** Use Taiwan, HongKong SAR, and Macao SAR character variants for + Simplified to Traditionary Chinese conversion + + @since OOo 2.0.0 + */ + const long USE_CHARACTER_VARIANTS = 2; // (1 << 1) +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/TextConversionResult.idl b/offapi/com/sun/star/i18n/TextConversionResult.idl new file mode 100644 index 000000000000..226687ec3d67 --- /dev/null +++ b/offapi/com/sun/star/i18n/TextConversionResult.idl @@ -0,0 +1,67 @@ +/************************************************************************* + * + * 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_XTextConversionResult_idl__ +#define __com_sun_star_i18n_XTextConversionResult_idl__ + + +#ifndef __com_sun_star_i18n_Boundary_idl__ +#include <com/sun/star/i18n/Boundary.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Text conversion result to be used with <type>XTextConversion</type>. + + @since OOo 1.1.2 +*/ + +published struct TextConversionResult +{ + /** The boundary of the first convertible word in the given text. + + <p>If there is no convertible word found in the text, <var>startPos</var> + and <var>endPos</var> for Boundary equal 0. + */ + ::com::sun::star::i18n::Boundary Boundary; + + /** A list of replacement candidates for the first convertible word + found in the given text. + */ + sequence < string > Candidates; +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/TextConversionType.idl b/offapi/com/sun/star/i18n/TextConversionType.idl new file mode 100644 index 000000000000..f7c29404aa0c --- /dev/null +++ b/offapi/com/sun/star/i18n/TextConversionType.idl @@ -0,0 +1,64 @@ +/************************************************************************* + * + * 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_TextConversionType_idl__ +#define __com_sun_star_i18n_TextConversionType_idl__ + + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +//-------------------------------------------------------------------------- +/** These constansts specifiy the conversion type to be used with + <type>XTextConversion</type>. + + @since OOo 1.1.2 +*/ + +published constants TextConversionType +{ + /// Conversion from Hanja to Hangul + const short TO_HANGUL = 1; + + /// Conversion from Hangul to Hanja + const short TO_HANJA = 2; + + /// Conversion from Traditional to Simplified Chinese + const short TO_SCHINESE = 3; + + /// Conversion from Simplified to Traditional Chinese + const short TO_TCHINESE = 4; +}; + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/Transliteration.idl b/offapi/com/sun/star/i18n/Transliteration.idl new file mode 100644 index 000000000000..2448a458115d --- /dev/null +++ b/offapi/com/sun/star/i18n/Transliteration.idl @@ -0,0 +1,53 @@ +/************************************************************************* + * + * 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_Transliteration_idl__ +#define __com_sun_star_i18n_Transliteration_idl__ + +#include <com/sun/star/lang/XServiceInfo.idl> +#include <com/sun/star/i18n/XTransliteration.idl> +#include <com/sun/star/i18n/XExtendedTransliteration.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/// Transliteration of characters, such as case folding +published service Transliteration +{ + interface com::sun::star::i18n::XTransliteration; + interface com::sun::star::lang::XServiceInfo; + + [optional] interface com::sun::star::i18n::XExtendedTransliteration; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/TransliterationModules.idl b/offapi/com/sun/star/i18n/TransliterationModules.idl new file mode 100644 index 000000000000..1ac752d52fd8 --- /dev/null +++ b/offapi/com/sun/star/i18n/TransliterationModules.idl @@ -0,0 +1,119 @@ +/************************************************************************* + * + * 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_TransliterationModules_idl__ +#define __com_sun_star_i18n_TransliterationModules_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Old transliteration module enumeration to use with + <member>XTransliteration::loadModule()</member> + */ + +published enum TransliterationModules +{ + /// Transliterate a string from upper case to lower case + UPPERCASE_LOWERCASE = 1, + /// Transliterate a string from lower case to upper case + LOWERCASE_UPPERCASE = 2, + /// Transliterate a string from half width character to full width character + HALFWIDTH_FULLWIDTH = 3, + /// Transliterate a string from full width character to half width character + FULLWIDTH_HALFWIDTH = 4, + /// Transliterate a Japanese string from Katakana to Hiragana + KATAKANA_HIRAGANA = 5, + /// Transliterate a Japanese string from Hiragnan to Katakana + HIRAGANA_KATAKANA = 6, + /// Transliterate an ascii number string to Simplified Chinese lower case number string in spellout format + NumToTextLower_zh_CN = 7, + /// Transliterate an ascii number string to Simplified Chinese upper case number string in spellout format + NumToTextUpper_zh_CN = 8, + /// Transliterate an ascii number string to Traditional Chinese lower case number string in spellout format + NumToTextLower_zh_TW = 9, + /// Transliterate an ascii number string to Traditional Chinese upper case number string in spellout format + NumToTextUpper_zh_TW = 10, + /// Transliterate an ascii number string to formal Korean Hangul number string in spellout format + NumToTextFormalHangul_ko = 11, + /// Transliterate an ascii number string to formal Korean Hanja lower case number string in spellout format + NumToTextFormalLower_ko = 12, + /// Transliterate an ascii number string to formal Korean Hanja upper case number string in spellout format + NumToTextFormalUpper_ko = 13, + NON_IGNORE_MASK = 0x000000ff, + IGNORE_MASK = -0x100, + /// Ignore case when comparing strings by transliteration service + IGNORE_CASE = 0x00000100, + /// Ignore Hiragana and Katakana when comparing strings by transliteration service + IGNORE_KANA = 0x00000200, // ja_JP + /// Ignore full width and half width character when comparing strings by transliteration service + IGNORE_WIDTH = 0x00000400, // ja_JP + // not used yet = 0x00000800, + /// Ignore Japanese traditional Kanji character in Japanese fuzzy search + ignoreTraditionalKanji_ja_JP = 0x00001000, + /// Ignore Japanese traditional Katakana and Hiragana character in Japanese fuzzy search + ignoreTraditionalKana_ja_JP = 0x00002000, + /// Ignore dash or minus sign in Japanese fuzzy search + ignoreMinusSign_ja_JP = 0x00004000, + /// Ignore Hiragana and Katakana iteration mark in Japanese fuzzy search + ignoreIterationMark_ja_JP = 0x00008000, + /// Ignore separator punctuations in Japanese fuzzy search + ignoreSeparator_ja_JP = 0x00010000, + /// Ignore Katakana and Hiragana Zi/Zi and Zu/Zu in Japanese fuzzy search + ignoreZiZu_ja_JP = 0x00020000, + /// Ignore Katakana and Hiragana Ba/Gua and Ha/Fa in Japanese fuzzy search + ignoreBaFa_ja_JP = 0x00040000, + /// Ignore Katakana and Hiragana Tsui/Tea/Ti and Dyi/Ji in Japanese fuzzy search + ignoreTiJi_ja_JP = 0x00080000, + /// Ignore Katakana and Hiragana Hyu/Fyu and Byu/Gyu in Japanese fuzzy search + ignoreHyuByu_ja_JP = 0x00100000, + /// Ignore Katakana and Hiragana Se/Sye and Ze/Je in Japanese fuzzy search + ignoreSeZe_ja_JP = 0x00200000, + /// Ignore Katakana YA/A which follows the character in either I or E row in Japanese fuzzy search + ignoreIandEfollowedByYa_ja_JP = 0x00400000, + /// Ignore Katakana KI/KU which follows the character in SA column in Japanese fuzzy search + ignoreKiKuFollowedBySa_ja_JP = 0x00800000, + /// Ignore Japanese normal and small sized character in Japanese fuzzy search + ignoreSize_ja_JP = 0x01000000, + /// Ignore Japanese prolonged sound mark in Japanese fuzzy search + ignoreProlongedSoundMark_ja_JP = 0x02000000, + /// Ignore middle dot in Japanese fuzzy search + ignoreMiddleDot_ja_JP = 0x04000000, + /// Ignore white space characters, include space, TAB, return, etc. in Japanese fuzzy search + ignoreSpace_ja_JP = 0x08000000, + /// transliterate Japanese small sized character to normal sized character + smallToLarge_ja_JP = 0x10000000, + /// transliterate Japanese normal sized character to small sized character + largeToSmall_ja_JP = 0x20000000, + END_OF_MODULE = 0 +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl b/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl new file mode 100644 index 000000000000..17cd0d6a7ba6 --- /dev/null +++ b/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: TransliterationModulesExtra.idl,v $ + * $Revision: 1.0 $ + * + * 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_TransliterationModulesExtra_idl__ +#define __com_sun_star_i18n_TransliterationModulesExtra_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Extra transliteration module enumeration to use with + <member>XTransliteration::loadModule()</member> + + The values used in this group need to be different from the ones in + <type>TransliterationModules</type> and <type>TransliterationModulesNew</type>! + */ + + +// using a constant group instead of enum leaves room for additional values later on... +constants TransliterationModulesExtra +{ + /** The first character of the sentence is put in upper case + */ + const short SENTENCE_CASE = 200; + + //------------------------------------------------------------------------- + + /** The first character of the word is put in upper case. + * This one is part + */ + const short TITLE_CASE = 201; + + //------------------------------------------------------------------------- + + /** All characters of the word are to change their case from small letters + * to capital letters and vice versa. + */ + const short TOGGLE_CASE = 202; + + //------------------------------------------------------------------------- + + const long END_OF_MODULE = 0; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/TransliterationModulesNew.idl b/offapi/com/sun/star/i18n/TransliterationModulesNew.idl new file mode 100644 index 000000000000..796cf44f5b6e --- /dev/null +++ b/offapi/com/sun/star/i18n/TransliterationModulesNew.idl @@ -0,0 +1,175 @@ +/************************************************************************* + * + * 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_TransliterationModulesNew_idl__ +#define __com_sun_star_i18n_TransliterationModulesNew_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** New transliteration module enumeration to use with + <member>XTransliteration::loadModuleNew()</member> + */ + +published enum TransliterationModulesNew +{ + /// Transliterate a string from upper case to lower case + UPPERCASE_LOWERCASE = 1, + /// Transliterate a string from lower case to upper case + LOWERCASE_UPPERCASE = 2, + /// Transliterate a string from half width character to full width character + HALFWIDTH_FULLWIDTH = 3, + /// Transliterate a string from full width character to half width character + FULLWIDTH_HALFWIDTH = 4, + /// Transliterate a Japanese string from Katakana to Hiragana + KATAKANA_HIRAGANA = 5, + /// Transliterate a Japanese string from Hiragnan to Katakana + HIRAGANA_KATAKANA = 6, + /// Ignore case when comparing strings by transliteration service + IGNORE_CASE = 7, + /// Ignore Hiragana and Katakana when comparing strings by transliteration service + IGNORE_KANA = 8, // ja_JP + /// Ignore full width and half width characters when comparing strings by transliteration service + IGNORE_WIDTH = 9, // ja_JP + /// Ignore Japanese traditional Kanji characters in Japanese fuzzy search + ignoreTraditionalKanji_ja_JP = 10, + /// Ignore Japanese traditional Katakana and Hiragana characters in Japanese fuzzy search + ignoreTraditionalKana_ja_JP = 11, + /// Ignore dash or minus sign in Japanese fuzzy search + ignoreMinusSign_ja_JP = 12, + /// Ignore Hiragana and Katakana iteration mark in Japanese fuzzy search + ignoreIterationMark_ja_JP = 13, + /// Ignore separator punctuations in Japanese fuzzy search + ignoreSeparator_ja_JP = 14, + /// Ignore Katakana and Hiragana Zi/Zi and Zu/Zu in Japanese fuzzy search + ignoreZiZu_ja_JP = 15, + /// Ignore Katakana and Hiragana Ba/Gua and Ha/Fa in Japanese fuzzy search + ignoreBaFa_ja_JP = 16, + /// Ignore Katakana and Hiragana Tsui/Tea/Ti and Dyi/Ji in Japanese fuzzy search + ignoreTiJi_ja_JP = 17, + /// Ignore Katakana and Hiragana Hyu/Fyu and Byu/Gyu in Japanese fuzzy search + ignoreHyuByu_ja_JP = 18, + /// Ignore Katakana and Hiragana Se/Sye and Ze/Je in Japanese fuzzy search + ignoreSeZe_ja_JP = 19, + /// Ignore Katakana YA/A following the character in either I or E row in Japanese fuzzy search + ignoreIandEfollowedByYa_ja_JP = 20, + /// Ignore Katakana KI/KU following the character in SA column in Japanese fuzzy search + ignoreKiKuFollowedBySa_ja_JP = 21, + /// Ignore Japanese normal and small sized character in Japanese fuzzy search + ignoreSize_ja_JP = 22, + /// Ignore Japanese prolonged sound mark in Japanese fuzzy search + ignoreProlongedSoundMark_ja_JP = 23, + /// Ignore middle dot in Japanese fuzzy search + ignoreMiddleDot_ja_JP = 24, + /// Ignore white space characters, include space, TAB, return, etc. in Japanese fuzzy search + ignoreSpace_ja_JP = 25, + /// transliterate Japanese small sized character to normal sized character + smallToLarge_ja_JP = 26, + /// transliterate Japanese normal sized character to small sized character + largeToSmall_ja_JP = 27, + /// Transliterate an ascii number string to Simplified Chinese lower case number string in spellout format + NumToTextLower_zh_CN = 28, + /// Transliterate an ascii number string to Simplified Chinese upper case number string in spellout format + NumToTextUpper_zh_CN = 29, + /// Transliterate an ascii number string to Traditional Chinese lower case number string in spellout format + NumToTextLower_zh_TW = 30, + /// Transliterate an ascii number string to Traditional Chinese upper case number string in spellout format + NumToTextUpper_zh_TW = 31, + /// Transliterate an ascii number string to formal Korean Hangul number string in spellout format + NumToTextFormalHangul_ko = 32, + /// Transliterate an ascii number string to formal Korean Hanja lower case number string in spellout format + NumToTextFormalLower_ko = 33, + /// Transliterate an ascii number string to formal Korean Hanja upper case number string in spellout format + NumToTextFormalUpper_ko = 34, + /// Transliterate an ascii number string to informal Korean Hangul number string in spellout format + NumToTextInformalHangul_ko = 35, + /// Transliterate an ascii number string to informal Korean Hanja lower case number string in spellout format + NumToTextInformalLower_ko = 36, + /// Transliterate an ascii number string to informal Korean Hanja upper case number string in spellout format + NumToTextInformalUpper_ko = 37, + /// Transliterate an ascii number string to Simplified Chinese lower case number string + NumToCharLower_zh_CN = 38, + /// Transliterate an ascii number string to Simplified Chinese upper case number string + NumToCharUpper_zh_CN = 39, + /// Transliterate an ascii number string to Traditional Chinese lower case number string + NumToCharLower_zh_TW = 40, + /// Transliterate an ascii number string to Traditional Chinese upper case number string + NumToCharUpper_zh_TW = 41, + /// Transliterate an ascii number string to Korean Hangul number string + NumToCharHangul_ko = 42, + /// Transliterate an ascii number string to Korean Hanja lower case number string + NumToCharLower_ko = 43, + /// Transliterate an ascii number string to Korean Hanja upper case number string + NumToCharUpper_ko = 44, + /// Transliterate a half width number string to full width number string + NumToCharFullwidth = 45, + /// Transliterate an ascii number string to Japanese Kanji number string + NumToCharKanjiShort_ja_JP = 46, + /// Transliterate a Simplified Chinese lower case number string (sepllout) to ascii number string + TextToNumLower_zh_CN = 47, + /// Transliterate a Simplified Chinese upper case number string (sepllout) to ascii number string + TextToNumUpper_zh_CN = 48, + /// Transliterate a Traditional Chinese lower case number string (sepllout) to ascii number string + TextToNumLower_zh_TW = 49, + /// Transliterate a Traditional Chinese upper case number string (sepllout) to ascii number string + TextToNumUpper_zh_TW = 50, + /// Transliterate a Korean formal Hangul number string (sepllout) to ascii number string + TextToNumFormalHangul_ko = 51, + /// Transliterate a Korean formal Hanja lower case number string (sepllout) to ascii number string + TextToNumFormalLower_ko = 52, + /// Transliterate a Korean formal Hanja upper case number string (sepllout) to ascii number string + TextToNumFormalUpper_ko = 53, + /// Transliterate a Korean informal Hangul number string (sepllout) to ascii number string + TextToNumInformalHangul_ko = 54, + /// Transliterate a Korean informal Hanja lower case number string (sepllout) to ascii number string + TextToNumInformalLower_ko = 55, + /// Transliterate a Korean informal Hanja upper case number string (sepllout) to ascii number string + TextToNumInformalUpper_ko = 56, + // 2 Spaces for Japanese TextToNum + /// Transliterate a Simplified Chinese lower case number string to ascii number string + CharToNumLower_zh_CN = 59, + /// Transliterate a Simplified Chinese upper case number string to ascii number string + CharToNumUpper_zh_CN = 60, + /// Transliterate a Traditional Chinese lower case number string to ascii number string + CharToNumLower_zh_TW = 61, + /// Transliterate a Traditional Chinese upper case number string to ascii number string + CharToNumUpper_zh_TW = 62, + /// Transliterate a Korean Hangul number string to ascii number string + CharToNumHangul_ko = 63, + /// Transliterate a Korean Hanja lower case number string to ascii number string + CharToNumLower_ko = 64, + /// Transliterate a Korean Hanja upper case number string to ascii number string + CharToNumUpper_ko = 65, + END_OF_MODULE = 0 +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/TransliterationType.idl b/offapi/com/sun/star/i18n/TransliterationType.idl new file mode 100644 index 000000000000..4a7b8223ab61 --- /dev/null +++ b/offapi/com/sun/star/i18n/TransliterationType.idl @@ -0,0 +1,81 @@ +/************************************************************************* + * + * 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_TransliterationType_idl__ +#define __com_sun_star_i18n_TransliterationType_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Bitmask transliteration types used with + <member>XTransliteration::getType()</member> and + <member>XTransliteration::getAvailableModules()</member> methods. + + <p> Non-IGNORE type modules provide + <member>XTransliteration::transliterate()</member>. <br/> + IGNORE type modules provide + <member>XTransliteration::equals()</member> and + <member>XTransliteration::transliterateRange()</member>. </p> + */ + +published constants TransliterationType +{ + const short NONE = 0; + + /** A transliteration module is ONE_TO_ONE if and only if it's + mapping between characters is one to one like a-z to A-Z. + Transliteration modules of this type can be used as choice in + regular expressions based search/replace. */ + const short ONE_TO_ONE = 1; + + /** A transliteration module can have attribute NUMERIC if it + tranliterates numbers in different languages like chinese + numbers to arabic numbers and vice versa. This mapping need not + be one to one, it should be primarily used by number formatting + and parsing methods. */ + const short NUMERIC = 2; + + /** A transliteration module is ONE_TO_ONE_NUMERIC if it offers + both one to one mapping and handles number also. */ + const short ONE_TO_ONE_NUMERIC = 3; + + /** With a transliterator IGNORE case, the regular + expression A-Z can be transformed to a-z, for example. */ + const short IGNORE = 4; + + /** If the transliteration is cascaded (uses more than one + algorithm). */ + const short CASCADE = 8; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/UnicodeScript.idl b/offapi/com/sun/star/i18n/UnicodeScript.idl new file mode 100644 index 000000000000..d69d08a60939 --- /dev/null +++ b/offapi/com/sun/star/i18n/UnicodeScript.idl @@ -0,0 +1,136 @@ +/************************************************************************* + * + * 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_UnicodeScript_idl__ +#define __com_sun_star_i18n_UnicodeScript_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Unicode script types, returned by + <member>XCharacterClassification::getScript()</member> + */ + +published enum UnicodeScript +{ + kBasicLatin, + kLatin1Supplement, + kLatinExtendedA, + kLatinExtendedB, + kIPAExtension, + kSpacingModifier, + kCombiningDiacritical, + kGreek, + kCyrillic, + kArmenian, + kHebrew, + kArabic, + kSyriac, + kThaana, + kDevanagari, + kBengali, + kGurmukhi, + kGujarati, + kOriya, + kTamil, + kTelugu, + kKannada, + kMalayalam, + kSinhala, + kThai, + kLao, + kTibetan, + kMyanmar, + kGeorgian, + kHangulJamo, + kEthiopic, + kCherokee, + kUnifiedCanadianAboriginalSyllabics, + kOgham, + kRunic, + kKhmer, + kMongolian, + kLatinExtendedAdditional, + kGreekExtended, + kGeneralPunctuation, + kSuperSubScript, + kCurrencySymbolScript, + kSymbolCombiningMark, + kLetterlikeSymbol, + kNumberForm, + kArrow, + kMathOperator, + kMiscTechnical, + kControlPicture, + kOpticalCharacter, + kEnclosedAlphanumeric, + kBoxDrawing, + kBlockElement, + kGeometricShape, + kMiscSymbol, + kDingbat, + kBraillePatterns, + kCJKRadicalsSupplement, + kKangxiRadicals, + kIdeographicDescriptionCharacters, + kCJKSymbolPunctuation, + kHiragana, + kKatakana, + kBopomofo, + kHangulCompatibilityJamo, + kKanbun, + kBopomofoExtended, + kEnclosedCJKLetterMonth, + kCJKCompatibility, + k_CJKUnifiedIdeographsExtensionA, + kCJKUnifiedIdeograph, + kYiSyllables, + kYiRadicals, + kHangulSyllable, + kHighSurrogate, + kHighPrivateUseSurrogate, + kLowSurrogate, + kPrivateUse, + kCJKCompatibilityIdeograph, + kAlphabeticPresentation, + kArabicPresentationA, + kCombiningHalfMark, + kCJKCompatibilityForm, + kSmallFormVariant, + kArabicPresentationB, + kNoScript, + kHalfwidthFullwidthForm, + kScriptCount +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/UnicodeType.idl b/offapi/com/sun/star/i18n/UnicodeType.idl new file mode 100644 index 000000000000..b9e37a8cd034 --- /dev/null +++ b/offapi/com/sun/star/i18n/UnicodeType.idl @@ -0,0 +1,79 @@ +/************************************************************************* + * + * 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_UnicodeType_idl__ +#define __com_sun_star_i18n_UnicodeType_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Constants to classify Unicode characters, returned by + <member>XCharacterClassification::getType()</member> + */ + +published constants UnicodeType +{ + const short UNASSIGNED = 0; + const short UPPERCASE_LETTER = 1; + const short LOWERCASE_LETTER = 2; + const short TITLECASE_LETTER = 3; + const short MODIFIER_LETTER = 4; + const short OTHER_LETTER = 5; + const short NON_SPACING_MARK = 6; + const short ENCLOSING_MARK = 7; + const short COMBINING_SPACING_MARK = 8; + const short DECIMAL_DIGIT_NUMBER = 9; + const short LETTER_NUMBER = 10; + const short OTHER_NUMBER = 11; + const short SPACE_SEPARATOR = 12; + const short LINE_SEPARATOR = 13; + const short PARAGRAPH_SEPARATOR = 14; + const short CONTROL = 15; + const short FORMAT = 16; + const short PRIVATE_USE = 17; + const short SURROGATE = 18; + const short DASH_PUNCTUATION = 19; + const short INITIAL_PUNCTUATION = 20; + const short FINAL_PUNCTUATION = 21; + const short CONNECTOR_PUNCTUATION = 22; + const short OTHER_PUNCTUATION = 23; + const short MATH_SYMBOL = 24; + const short CURRENCY_SYMBOL = 25; + const short MODIFIER_SYMBOL = 26; + const short OTHER_SYMBOL = 27; + const short START_PUNCTUATION = 28; + const short END_PUNCTUATION = 29; + const short GENERAL_TYPES_COUNT = 30; +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/Weekdays.idl b/offapi/com/sun/star/i18n/Weekdays.idl new file mode 100644 index 000000000000..2d17715d56f9 --- /dev/null +++ b/offapi/com/sun/star/i18n/Weekdays.idl @@ -0,0 +1,65 @@ +/************************************************************************* + * + * 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_Weekdays_idl__ +#define __com_sun_star_i18n_Weekdays_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + + +/** Constants for days of a week. + + <p> used with <member>XCalendar::getFirstDayOfWeek()</member>, + <member>XCalendar::setFirstDayOfWeek()</member> and + <member>XCalendar::getDisplayName()</member> </p> + */ +published constants Weekdays +{ + /// Sunday + const short SUNDAY = 0; + /// Monday + const short MONDAY = 1; + /// Tuesday + const short TUESDAY = 2; + /// Wednesday + const short WEDNESDAY = 3; + /// Thursday + const short THURSDAY = 4; + /// Friday + const short FRIDAY = 5; + /// Saturday + const short SATURDAY = 6; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/WordType.idl b/offapi/com/sun/star/i18n/WordType.idl new file mode 100644 index 000000000000..44108d9f48ca --- /dev/null +++ b/offapi/com/sun/star/i18n/WordType.idl @@ -0,0 +1,73 @@ +/************************************************************************* + * + * 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_WordType_idl__ +#define __com_sun_star_i18n_WordType_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Constants to specify the type of words. + + <p> Used with <member>XBreakIterator::nextWord()</member>, + <member>XBreakIterator::previousWord()</member>, + <member>XBreakIterator::getWordBoundary()</member>, + <member>XBreakIterator::getWordType()</member>, + <member>XBreakIterator::isBeginWord()</member>, + <member>XBreakIterator::isEndWord()</member> </p> +*/ +published constants WordType +{ + /** Any "words" - words in the meaning of same character types, + collection of alphanumeric characters, or collection of + non-alphanumeric characters. + */ + const short ANY_WORD = 0; + + /** Any "words" - words in the meaning of same character types, + collection of alphanumeric characters, or collection of + non-alphanumeric characters except blanks. + */ + const short ANYWORD_IGNOREWHITESPACES= 1; + + /** "words" - in the meaning of a collection of alphanumeric + characters and some punctuations, like dot for abbreviation. + */ + const short DICTIONARY_WORD = 2; + + /** The mode for counting words, it will combine punctuations and + spaces as word trail. + */ + const short WORD_COUNT = 3; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XBreakIterator.idl b/offapi/com/sun/star/i18n/XBreakIterator.idl new file mode 100644 index 000000000000..b1bf01526548 --- /dev/null +++ b/offapi/com/sun/star/i18n/XBreakIterator.idl @@ -0,0 +1,374 @@ +/************************************************************************* + * + * 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_XBreakIterator_idl__ +#define __com_sun_star_i18n_XBreakIterator_idl__ + +#ifndef __com_sun_star_lang_Locale_idl__ +#include <com/sun/star/lang/Locale.idl> +#endif + +#ifndef __com_sun_star_i18n_LineBreakUserOptions_idl__ +#include <com/sun/star/i18n/LineBreakUserOptions.idl> +#endif + +#ifndef __com_sun_star_i18n_LineBreakHyphenationOptions_idl__ +#include <com/sun/star/i18n/LineBreakHyphenationOptions.idl> +#endif + +#ifndef __com_sun_star_i18n_LineBreakResults_idl__ +#include <com/sun/star/i18n/LineBreakResults.idl> +#endif + +#ifndef __com_sun_star_i18n_Boundary_idl__ +#include <com/sun/star/i18n/Boundary.idl> +#endif + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + contains the base routines for iteration in Unicode string. Iterates over + characters, words, sentences and line breaks. + + <p> Assumption: StartPos is inclusive and EndPos is exclusive. </p> + */ + +published interface XBreakIterator: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------ + /** Traverses specified number of characters/cells in Text from + <em>nStartPos</em> forwards. + <type>CharacterIteratorMode</type> can be cell based or + character based. A cell is made of more than one character. + + @param nCount + Number of characters to traverse, it should not be less than 0. + If you want to traverse in the opposite direction use + <member>XBreakIterator::previousCharacters()</member> instead. + */ + long nextCharacters( [in] string aText, [in] long nStartPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nCharacterIteratorMode, + [in] long nCount, [out] long nDone ); + + //------------------------------------------------------------------------ + /** Traverses specified number of characters/cells in Text from + <em>nStartPos</em> backwards. + <type>CharacterIteratorMode</type> can be cell based or + character based. A cell is made of more than one character. + + @param nCount + Number of characters to traverse, it should not be less than 0. + If you want to traverse in the opposite direction use + <member>XBreakIterator::nextCharacters()</member> instead. + */ + long previousCharacters( [in] string aText, [in] long nStartPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nCharacterIteratorMode, + [in] long nCount, [out] long nDone ); + + //------------------------------------------------------------------------ + /** Traverses one word in Text from <em>nStartPos</em> forwards. + + @param nWordType + One of <type>WordType</type>, specifies the type of + travelling. + + @returns + The <type>Boundary</type> of the found word. Normally used for + CTRL-Right. + */ + Boundary nextWord( [in] string aText, [in] long nStartPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nWordType); + + //------------------------------------------------------------------------ + /** Traverses one word in Text from <em>nStartPos</em> backwards. + + @param aLocale + The locale of the character preceding <em>nStartPos</em>. + + <p> If the previous character is a space character and + <em>nWordType</em> indicates spaces should be skipped, and + if the first non-space character is an Asian character, + then, since Asian word break needs language specific + wordbreak dictionaries, the method will return -1 in + <member>Boundary::endPos</member> and the position after the + Asian character (i.e. the space character) in + <member>Boundary::startPos</member>. The caller then has to + call this method again with a correct <em>aLocale</em> + referring to the Asian character, which is then the previous + character of the space character where <em>nStartPos</em> + points to. </p> + + <p> <b>Note</b> that the OpenOffice.org 1.0 / StarOffice 6.0 + / StarSuite 6.0 i18n framework doesn't behave like this and + mixed Western/CJK text may lead to wrong word iteration. + This is fixed in later versions. </p> + + @param nWordType + One of <type>WordType</type>, specifies the type of + travelling. + + @returns + The <type>Boundary</type> of the found word. Normally used for + CTRL-Left. + */ + Boundary previousWord( [in] string aText, [in] long nStartPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nWordType); + + //------------------------------------------------------------------------ + /** Identifies StartPos and EndPos of current word. + + <p> If <em>nPos</em> is the boundary of a word, it is StartPos + of one word and EndPos of previous word. In this situation, the + outcome of the algorithm can be indeterminate. In this situation + the <em>bPreferForward</em> flag is used. If bPreferForward == + <FALSE/>, <em>nPos</em> is considered to be the end of the word + and we look backwards for beginning of word, otherwise + <em>nPos</em> is considered to be the start of the next word and + we look forwards for the end of the word. </p> + + @param nWordType + One of <type>WordType</type>. + + @returns + The Boundary of the current word. + */ + Boundary getWordBoundary( [in] string aText, [in] long nPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nWordType, + [in] boolean bPreferForward ); + + //------------------------------------------------------------------------ + /** @deprecated + Get the <type>WordType</type> of the word that starts at + position <em>nPos</em>. + + <p> This method is mis-defined, since <type>WordType</type> + is not an attribute of a word, but a way to break words, + like excluding or including tail spaces for spellchecker + or cursor traveling. It returns 0 always. + </p> + */ + short getWordType( [in] string aText, [in] long nPos, + [in] ::com::sun::star::lang::Locale aLocale); + + //------------------------------------------------------------------------ + /** If a word starts at position <em>nPos</em>. + + <p> It is possible that both of this method + and following method <em>isEndWord</em> all return + <TRUE/>, since StartPos of a word is inclusive + while EndPos of a word is exclusive. + </p> + + */ + boolean isBeginWord( [in] string aText, [in] long nPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nWordType); + + //------------------------------------------------------------------------ + /** If a word ends at position <em>nPos</em>. + */ + boolean isEndWord( [in] string aText, [in] long nPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nWordType); + + //------------------------------------------------------------------------ + /** Traverses in Text from <em>nStartPos</em> to the start of a + sentence. + + @returns + The position where the sentence starts. + */ + long beginOfSentence( [in] string aText, [in] long nStartPos, + [in] ::com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** Traverses in Text from <em>nStartPos</em> to the end of a + sentence. + + @returns + The position where the sentence ends. + */ + long endOfSentence( [in] string aText, [in] long nStartPos, + [in] ::com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** Calculate the line break position in the Text from the specified + <em>nStartPos</em>. + + @param nMinBreakPos + Defines a minimum break position for hyphenated line break. + When the position for hyphenated line break is less than + <em>nMinBreakPos</em>, break position in + <type>LineBreakResults</type> is set to -1. + + @param aHyphOptions + Defines if the hyphenator is to be used. + + @param aUserOptions + Defines how to handle hanging punctuations and forbidden + characters at the start/end of a line. + + @returns + The <type>LineBreakResults</type> contain the break + position of the line, <type>BreakType</type> and + <type scope="com::sun::star::linguistic2">XHyphenatedWord</type> + */ + LineBreakResults getLineBreak( [in] string aText, [in] long nStartPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] long nMinBreakPos, + [in] LineBreakHyphenationOptions aHyphOptions, + [in] LineBreakUserOptions aUserOptions ); + + //------------------------------------------------------------------------ + /** Traverses in Text from <em>nStartPos</em> to the beginning of + the specified script type. + + @param nScriptType + One of <type>ScriptType</type>. + + @returns + The position where the script type starts. + */ + long beginOfScript( [in] string aText, [in] long nStartPos, + [in] short nScriptType ); + + //------------------------------------------------------------------------ + /** Traverses in Text from <em>nStartPos</em> to the end of the + specified script type. + + @param nScriptType + One of <type>ScriptType</type>. + + @returns + The position where the script type ends. + */ + long endOfScript( [in] string aText, [in] long nStartPos, + [in] short nScriptType ); + + //------------------------------------------------------------------------ + /** Traverses in Text from <em>nStartPos</em> to the next start of + the specified script type. + + @param nScriptType + One of <type>ScriptType</type>. + + @returns + The position where the next script type starts. + */ + long nextScript( [in] string aText, [in] long nStartPos, + [in] short nScriptType ); + + //------------------------------------------------------------------------ + /** Traverses in Text from <em>nStartPos</em> to the previous start + of the specified script type. + + @param nScriptType + One of <type>ScriptType</type>. + + @returns + The position where the previous script type starts. + */ + long previousScript( [in] string aText, [in] long nStartPos, + [in] short nScriptType ); + + //------------------------------------------------------------------------ + /** Get the script type of the character at position <em>nPos</em>. + + @returns + One of <type>ScriptType</type>. + */ + short getScriptType( [in] string aText, [in] long nPos); + + //------------------------------------------------------------------------ + /** Traverses in Text from <em>nStartPos</em> to the beginning of + the specified character type. + + @param nCharType + One of <type>CharType</type> + + @returns + The position where the character type starts + */ + long beginOfCharBlock( [in] string aText, [in] long nStartPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nCharType ); + + //------------------------------------------------------------------------ + /** Traverses in Text from <em>nStartPos</em> to the end of the + specified character type. + + @param nCharType + One of <type>CharType</type> + + @returns + The position where the character type ends. + */ + long endOfCharBlock( [in] string aText, [in] long nStartPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nCharType ); + + //------------------------------------------------------------------------ + /** Traverses in Text from <em>nStartPos</em> to the next start of + the specified character type. + + @param nCharType + One of <type>CharType</type> + + @returns + The position where the next character type starts. + */ + long nextCharBlock( [in] string aText, [in] long nStartPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nCharType ); + + //------------------------------------------------------------------------ + /** Traverses in Text from <em>nStartPos</em> to the previous start + of the specified character type. + + @param nCharType + One of <type>CharType</type> + + @returns + The position where the previous character type starts. + */ + long previousCharBlock ( [in] string aText, [in] long nStartPos, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nCharType ); +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XCalendar.idl b/offapi/com/sun/star/i18n/XCalendar.idl new file mode 100644 index 000000000000..04fd12bf73e4 --- /dev/null +++ b/offapi/com/sun/star/i18n/XCalendar.idl @@ -0,0 +1,228 @@ +/************************************************************************* + * + * 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_XCalendar_idl__ +#define __com_sun_star_i18n_XCalendar_idl__ + +#include <com/sun/star/lang/Locale.idl> +#include <com/sun/star/i18n/Calendar.idl> +#include <com/sun/star/i18n/CalendarItem.idl> + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Access to locale specific calendar systems. + */ + +published interface XCalendar : com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------ + /// Load the default calendar for the given locale. + void loadDefaultCalendar( [in] ::com::sun::star::lang::Locale rLocale ); + + //------------------------------------------------------------------------ + /// Load a specific calendar for the given locale. + void loadCalendar( [in] string uniqueID, + [in] ::com::sun::star::lang::Locale rLocale ); + + //------------------------------------------------------------------------ + /// Get the currently loaded <type>Calendar</type>. + Calendar getLoadedCalendar(); + + //------------------------------------------------------------------------ + /// Returns all available calendars for the given locale. + sequence< string > getAllCalendars( [in] ::com::sun::star::lang::Locale rLocale ); + + //------------------------------------------------------------------------ + /** Returns the ID string of the loaded calendar, for example, + <b>"gregorian"</b> + */ + string getUniqueID(); + + //------------------------------------------------------------------------ + /** + Set the date/time as an offset to the start of the calendar at + 1-Jan-1970 00:00. The integer part represents the number of days + passed since start date. The fractional part represents + fractions of a day, thus 0.5 means 12 hours. + */ + void setDateTime( [in] double nTimeInDays ); + + //------------------------------------------------------------------------ + /** + Get the date/time as an offset to the start of the calendar at + 1-Jan-1970 00:00. The integer part represents the number of days + passed since start date. The fractional part represents + fractions of a day, thus 0.5 means 12 hours. + */ + double getDateTime(); + + //------------------------------------------------------------------------ + /** + Set the value of a field. + + @param nCalendarFieldIndex + One of <type>CalendarFieldIndex</type> values. + + @param nValue + A value of the allowed range for the field index. + */ + void setValue( [in] short nCalendarFieldIndex, [in] short nValue ); + + //------------------------------------------------------------------------ + /** + Get the value of a field. + + @param nCalendarFieldIndex + One of <type>CalendarFieldIndex</type> values. + */ + short getValue( [in] short nCalendarFieldIndex ); + + //------------------------------------------------------------------------ + /** + Verify if the date fields set by a combination of + <member>XCalendar::setValue()</member> calls is valid. It has a + side-effect because it will internally calculate the final value + for the date fields + */ + boolean isValid(); + + //------------------------------------------------------------------------ + /** + Add an amount to a field. + + @param nCalendarFieldIndex + One of <type>CalendarFieldIndex</type> values. + + @param nAmount + The amount to add. + */ + void addValue( [in] short nCalendarFieldIndex, [in] long nAmount ); + + //------------------------------------------------------------------------ + /** returns the first day of a week, one of <type>Weekdays</type> + values. + */ + short getFirstDayOfWeek(); + + //------------------------------------------------------------------------ + /** Set the first day of a week, one of <type>Weekdays</type> + values. + */ + void setFirstDayOfWeek( [in] short nDay ); + + //------------------------------------------------------------------------ + /** Set how many days of a week must reside in the first week of a + year. + */ + void setMinimumNumberOfDaysForFirstWeek( [in] short nDays ); + + //------------------------------------------------------------------------ + /** returns how many days of a week must reside in the first week of + a year. + */ + short getMinimumNumberOfDaysForFirstWeek(); + + //------------------------------------------------------------------------ + /// returns the number of months in a year, e.g. <b>12</b> + short getNumberOfMonthsInYear(); + + //------------------------------------------------------------------------ + /// returns the number of days in a week, e.g. <b>7</b> + short getNumberOfDaysInWeek(); + + //------------------------------------------------------------------------ + /** returns a sequence of <type>CalendarItem</type> describing the + month names. + */ + sequence< CalendarItem > getMonths(); + + //------------------------------------------------------------------------ + /** returns a sequence of <type>CalendarItem</type> describing the + day names. + */ + sequence< CalendarItem > getDays(); + + //------------------------------------------------------------------------ + /** + Returns a string (name to display) matching the given parameters. + + @param nCalendarDisplayIndex + One of <type>CalendarDisplayIndex</type> values + + @param nIdx + A value matching the <em>nCalendarDisplayIndex</em> type: + <dl> + <dt><const>CalendarDisplayIndex::AM_PM</const></dt> + <dd>one of <type>AmPmValue</type></dd> + <dt><const>CalendarDisplayIndex::DAY</const></dt> + <dd>one of <type>Weekdays</type> or a number used as + an offset into the corresponding + <member>Calendar::Days</member> sequence</dd> + <dt><const>CalendarDisplayIndex::MONTH</const></dt> + <dd>one of <type>Months</type> or a number used as + an offset into the corresponding + <member>Calendar::Months</member> sequence</dd> + <dt><const>CalendarDisplayIndex::YEAR</const></dt> + <dd>not used, empty string returned</dd> + <dt><const>CalendarDisplayIndex::ERA</const></dt> + <dd>a number used as an offset into the + corresponding <member>Calendar:Eras</member> + sequence</dd> + </dl> + + <p> The value should be obtained by a previous call to + <member>XCalendar::getValue()</member> with an appropriate + <type>CalendarFieldIndex</type> argument. </p> + + @param nNameType + A value indicating whether to return the abbreviated or the + full name. + <dl> + <dt> 0 </dt> + <dd>abbreviated name, e.g. <b>"Jan"</b></dd> + <dt> 1 </dt> + <dd>full name, e.g. <b>"January"</b></dd> + + <p> This parameter is not used if the + <em>nCalendarDisplayIndex</em> argument equals + <const>CalendarDisplayIndex::AM_PM</const> </p> + */ + + string getDisplayName( [in] short nCalendarDisplayIndex, + [in] short nIdx, + [in] short nNameType ); +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XCharacterClassification.idl b/offapi/com/sun/star/i18n/XCharacterClassification.idl new file mode 100644 index 000000000000..5b32c032b90a --- /dev/null +++ b/offapi/com/sun/star/i18n/XCharacterClassification.idl @@ -0,0 +1,286 @@ +/************************************************************************* + * + * 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_XCharacterClassification_idl__ +#define __com_sun_star_i18n_XCharacterClassification_idl__ + +#include <com/sun/star/i18n/ParseResult.idl> + +#ifndef __com_sun_star_lang_Locale_idl__ +#include <com/sun/star/lang/Locale.idl> +#endif +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/* + +Possible tokens to be parsed with parse...Token(): + +UPASCALPHA=[A-Z] +LOASCALPHA=[a-z] +ASCALPHA=1*(UPASCALPHA|LOASCALPHA) +ASCDIGIT=[0-9] +ASC_UNDERSCORE='_' +ASC_SPACE=' ' +ASC_HT='\0x9' +ASC_VT='\0xb' +ASC_WS=ASC_SPACE|ASC_HT|ASC_VT +ASC_DBL_QUOTE=\"; +ASC_QUOTE=\' +UPASC_IDENTIFIER=UPASCALPHA *(UPASCALPHA|ASCDIGIT|ASC_UNDERSCORE) + +ALPHA,DIGIT are the tokens which return true for isAlpha and isDigit +ALNUM=ALPHA|DIGIT +CHAR=anycharacter +WS=isWhiteSpace() +SIGN='+'|'-' +DECSEP=<locale dependent decimal separator> +GRPSEP=<locale dependent thousand separator> +EXPONENT=(E|e)[SIGN]1*ASC_DIGIT + +IDENTIFIER=ALPHA *ALNUM +UIDENTIFIER=(ALPHA | ASC_UNDERSCORE) *(ALNUM|ASC_UNDERSCORE) +ALPHA_NAME=ALPHA *(ALNUM|DEFCHARS) +ANY_NAME=1*(ALNUM|DEFCHARS) +SINGLE_QUOTE_NAME=ASC_QUOTE(1*CHAR)ASC_QUOTE +DOUBLE_QUOTE_NAME=ASC_DBL_QUOTE(*CHAR)ASC_DBL_QUOTE +ASC_NUMBER=[SIGN]*(1*ASC_DIGIT *(GRPSEP 1*ASC_DIGIT))[DECSEP]1*ASC_DIGIT[EXPONENT] +NUMBER=[SIGN]*(1*DIGIT *(GRPSEP 1*DIGIT))[DECSEP]1*DIGIT[EXPONENT] + +*/ + +//============================================================================ + +/** + Character classification (upper, lower, digit, letter, number, ...) + and generic Unicode enabled parser. + */ + +published interface XCharacterClassification : com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------ + /** Convert lower case alpha to upper case alpha, starting at + position <em>nPos</em> for <em>nCount</em> code points. + */ + string toUpper( [in] string aText, [in] long nPos, [in] long nCount, + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** Convert upper case alpha to lower case alpha, starting at + position <em>nPos</em> for <em>nCount</em> code points. + */ + string toLower( [in] string aText, [in] long nPos, [in] long nCount, + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** Convert to title case, starting at + position <em>nPos</em> for <em>nCount</em> code points. + */ + string toTitle( [in] string aText, [in] long nPos, [in] long nCount, + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /// Get <type>UnicodeType</type> of character at position <em>nPos</em>. + short getType( [in] string aText, [in] long nPos ); + + //------------------------------------------------------------------------ + /** Get <type>DirectionProperty</type> of character at position + <em>nPos</em>. + */ + short getCharacterDirection( [in] string aText, [in] long nPos ); + + //------------------------------------------------------------------------ + /// Get <type>UnicodeScript</type> of character at position <em>nPos</em>. + short getScript( [in] string aText, [in] long nPos ); + + //------------------------------------------------------------------------ + /// Get <type>KCharacterType</type> of character at position <em>nPos</em>. + long getCharacterType( [in] string aText, [in] long nPos, + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** Get accumulated <type>KCharacterType</type>s of string starting + at position <em>nPos</em> of length <em>nCount</em> code points. + + @returns + A number with appropriate flags set to indicate what type of + characters the string contains, each flag value being one of + KCharacterType values. + */ + long getStringType( [in] string aText, [in] long nPos, [in] long nCount, + [in] com::sun::star::lang::Locale aLocale ); + + + //------------------------------------------------------------------------ + /** + Parse a string for a token starting at position <em>nPos</em>. + + <p> A name or identifier must match the + <type>KParseTokens</type> criteria passed in + <em>nStartCharFlags</em> and <em>nContCharFlags</em> and may + additionally contain characters of + <em>aUserDefinedCharactersStart</em> and/or + <em>aUserDefinedCharactersCont</em>. </p> + + + @returns + A filled <type>ParseResult</type> structure. If no + unambigous token could be parsed, + <member>ParseResult::TokenType</member> will be set to + <b>0</b> (zero), other fields will contain the values parsed + so far. + + <p> If a token may represent either a numeric value or a + name according to the passed Start/Cont-Flags/Chars, both + <const>KParseType::ASC_NUM</const> (or + <const>KParseType::UNI_NUM</const>) and + <const>KParseType::IDENTNAME</const> are set in + <member>ParseResult::TokenType</member>. + + @param aText + Text to be parsed. + + @param nPos + Position where parsing starts. + + @param aLocale + The locale, for example, for decimal and group separator or + character type determination. + + @param nStartCharFlags + A set of <type>KParseTokens</type> constants determining the + allowed characters a name or identifier may start with. + + @param aUserDefinedCharactersStart + A set of additionally allowed characters a name or + identifier may start with. + + @param nContCharFlags + A set of <type>KParseTokens</type> constants determining the + allowed characters a name or identifier may continue with. + + @param aUserDefinedCharactersCont + A set of additionally allowed characters a name or + identifier may continue with. + + @example:C++ + <listing> + using namespace ::com::sun::star::i18n; + // First character of an identifier may be any alphabetic or underscore. + sal_Int32 nStartFlags = KParseTokens::ANY_ALPHA | KParseTokens::ASC_UNDERSCORE; + // Continuing characters may be any alphanumeric or underscore or dot. + sal_Int32 nContFlags = KParseTokens::ANY_ALNUM | KParseTokens::ASC_UNDERSCORE | KParseTokens::ASC_DOT; + // No further characters assumed to be contained in an identifier + String aEmptyString; + // Parse any token. + ParseResult rRes = xCC->parseAnyToken( aText, nPos, aLocale, + nStartFlags, aEmptyString, nContFlags, aEmptyString ); + // Get parsed token. + if ( rRes.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER) ) + fValue = rRes.Value; + if ( rRes.TokenType & KParseType::IDENTNAME ) + aName = aText.Copy( nPos, rRes.EndPos - nPos ); + else if ( rRes.TokenType & KParseType::SINGLE_QUOTE_NAME ) + aName = rRes.DequotedNameOrString; + else if ( rRes.TokenType & KParseType::DOUBLE_QUOTE_STRING ) + aString = rRes.DequotedNameOrString; + else if ( rRes.TokenType & KParseType::BOOLEAN ) + aSymbol = aText.Copy( nPos, rRes.EndPos - nPos ); + else if ( rRes.TokenType & KParseType::ONE_SINGLE_CHAR ) + aSymbol = aText.Copy( nPos, rRes.EndPos - nPos ); + </listing> + */ + + ParseResult parseAnyToken( + [in] string aText, + [in] long nPos, + [in] com::sun::star::lang::Locale aLocale, + [in] long nStartCharFlags, + [in] string aUserDefinedCharactersStart, + [in] long nContCharFlags, + [in] string aUserDefinedCharactersCont + ); + + //------------------------------------------------------------------------ + /** + Parse a string for a token of type <em>nTokenType</em> starting + at position <em>nPos</em>. + + <p> Other parameters are the same as in + <member>parseAnyToken</member>. If the actual token does not + match the passed <em>nTokenType</em> a + <member>ParseResult::TokenType</member> set to <b>0</b> (zero) + is returned. </p> + + @param nTokenType + One or more of the <type>KParseType</type> constants. + + @example:C++ + <listing> + // Determine if a given name is a valid name (not quoted) and contains + // only allowed characters. + using namespace ::com::sun::star::i18n; + // First character of an identifier may be any alphanumeric or underscore. + sal_Int32 nStartFlags = KParseTokens::ANY_ALNUM | KParseTokens::ASC_UNDERSCORE; + // No further characters assumed to be contained in an identifier start. + String aEmptyString; + // Continuing characters may be any alphanumeric or underscore. + sal_Int32 nContFlags = nStartFlags; + // Additionally, continuing characters may contain a blank. + String aContChars( RTL_CONSTASCII_USTRINGPARAM(" ") ); + // Parse predefined (must be an IDENTNAME) token. + ParseResult rRes = xCC->parsePredefinedToken( KParseType::IDENTNAME, rName, 0, aLocale, + nStartFlags, aEmptyString, nContFlags, aContChars ); + // Test if it is an identifier name and if it only is one + // and no more else is following it. + bValid = (rRes.TokenType & KParseType::IDENTNAME) && rRes.EndPos == rName.Len(); + </listing> + */ + + ParseResult parsePredefinedToken( + [in] long nTokenType, + [in] string aText, + [in] long nPos, + [in] com::sun::star::lang::Locale aLocale, + [in] long nStartCharFlags, + [in] string aUserDefinedCharactersStart, + [in] long nContCharFlags, + [in] string aUserDefinedCharactersCont + ); +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XCollator.idl b/offapi/com/sun/star/i18n/XCollator.idl new file mode 100644 index 000000000000..72d32886c299 --- /dev/null +++ b/offapi/com/sun/star/i18n/XCollator.idl @@ -0,0 +1,174 @@ +/************************************************************************* + * + * 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_XCollator_idl__ +#define __com_sun_star_i18n_XCollator_idl__ + +#include <com/sun/star/uno/Exception.idl> +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/Locale.idl> +//============================================================================= + +module com { module sun { module star { module i18n { + +/** provides locale-sensitive collation algorithms for string comparison. + +*/ +published interface XCollator: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + /** Compare 2 substrings in specific locale and algorithm. + + @param aStr1 + First string. + + @param nOff1 + Offset (from 0) of the first string. + + @param nLen1 + Length (from offset) of the first substring. + + @param aStr2 + Second string + + @param nOff2 + Offset (from 0) of the second string. + + @param nLen2 + Length (from offset) of the second substring. + + @returns + 1 if the first string is greater than the second string <br/> + 0 if the first string is equal to the second string <br/> + -1 if the first string is less than the second string + */ + long compareSubstring( [in] string aStr1, [in] long nOff1, [in] long nLen1, + [in] string aStr2, [in] long nOff2, [in] long nLen2 ); + + //------------------------------------------------------------------------- + /** Compare 2 strings in specific locale and algorithm. + + @param aStr1 + First string. + + @param aStr2 + Second string. + + @returns + 1 if the first string is greater than the second string <br/> + 0 if the first string is equal to the second string <br/> + -1 if the first string is less than the second string + */ + long compareString( [in] string aStr1, [in] string aStr2 ); + + //------------------------------------------------------------------------- + /** Load the collator with default algorithm defined in + locale data. + + @param aLocale + The locale for this collator. + + @param nCollatorOptions + A mask of <type>CollatorOptions</type>. + + @returns + Returns 0 when loading was successful, + otherwise throws runtime exception. In fact the return value + should be ignored and the exception be caught instead. + */ + long loadDefaultCollator( [in] ::com::sun::star::lang::Locale aLocale, + [in] long nCollatorOptions ); + + //------------------------------------------------------------------------- + /** Load a particular collator algorithm for the locale. + + @param aAlgorithmName + The algorithm to load. + + @param aLocale + The locale for this collator. + + @param nCollatorOptions + A mask of <type>CollatorOptions</type>. + + @returns + Returns 0 when loading was successful, + otherwise throws runtime exception. + */ + long loadCollatorAlgorithm( [in] string aAlgorithmName, + [in] ::com::sun::star::lang::Locale aLocale, + [in] long nCollatorOptions ); + + //------------------------------------------------------------------------- + /** List all collator algorithms for a given locale. + + @param aLocale + The locale for which to list algorithms. + + @returns + A sequence of algorithm names. + */ + sequence <string> listCollatorAlgorithms( + [in] ::com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------- + /** Load a collator algorithm with options chosen by end user. + + @param aAlgorithmName + The algorithm name to load. + + @param aLocale + The locale for this collator. + + @param aCollatorOptions + A sequence of end user collator options like those returned + by <member>XCollator::listCollatorOptions()</member>. + */ + void loadCollatorAlgorithmWithEndUserOption( + [in] string aAlgorithmName, + [in] ::com::sun::star::lang::Locale aLocale, + [in] sequence<long> aCollatorOptions ); + + //------------------------------------------------------------------------- + /** List all end user collator options for a given algorithm. + + @param aAlgorithmName + The algorithm name for this collator. + + @returns + An array of end user options available for the algorithm. + */ + sequence <long> listCollatorOptions( [in] string aAlgorithmName ); + +}; + +//============================================================================= + +}; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/i18n/XExtendedCalendar.idl b/offapi/com/sun/star/i18n/XExtendedCalendar.idl new file mode 100644 index 000000000000..b8b6d9ed9936 --- /dev/null +++ b/offapi/com/sun/star/i18n/XExtendedCalendar.idl @@ -0,0 +1,85 @@ +/************************************************************************* + * + * 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_XExtendedCalendar_idl__ +#define __com_sun_star_i18n_XExtendedCalendar_idl__ + +#include <com/sun/star/i18n/XCalendar.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + + +/** + This interface provides access to locale specific calendar + systems. + + <p> It is derived from + <type scope="::com::sun::star::i18n">XCalendar</type> and provides + additional functionality to display parts of the date currently + set at the calendar. </p> + + @since OOo 1.1.2 + */ +published interface XExtendedCalendar : ::com::sun::star::i18n::XCalendar +{ + //------------------------------------------------------------------------- + /** + Returns a string (number or name to display) matching the + given code constant. + + <p> Note that the string returned depends completely on the + locale's calendar. It is not predictable if the string will be + numeric or a name, or if in case it retuns a numeric string + how many digits that will have. For example, a short year + display string will normally be two digits with a Gregorian + calendar, but with a Jewish calendar it will have three + digits. <p/> + + @param nCalendarDisplayCode + One of <type>CalendarDisplayCode</type> + + @param nNativeNumberMode + One of <type>NativeNumberMode</type>. <br/> + This argument designates the basic transliteration mode as + if specified for the year representation. However, depending + on the locale, different conversions for year and month, for + example, may be chosen internally. This is beyond the user's + control and depends on locale specific conventions of how a + date is assembled. + */ + string getDisplayString( [in] long nCalendarDisplayCode, [in] short nNativeNumberMode ); + +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XExtendedIndexEntrySupplier.idl b/offapi/com/sun/star/i18n/XExtendedIndexEntrySupplier.idl new file mode 100644 index 000000000000..0e03605669fd --- /dev/null +++ b/offapi/com/sun/star/i18n/XExtendedIndexEntrySupplier.idl @@ -0,0 +1,157 @@ +/************************************************************************* + * + * 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_XExtendedIndexEntrySupplier_idl__ +#define __com_sun_star_i18n_XExtendedIndexEntrySupplier_idl__ + +#include <com/sun/star/i18n/XIndexEntrySupplier.idl> +#include <com/sun/star/lang/Locale.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + + +/** + This interface provides information for creating "Table of Index" + + <p> It is derived from + <type scope="::com::sun::star::i18n">XIndexEntrySupplier</type> and + provides following additional functionalities.</p> + <ul> + <li>Provide supported language/locale list. + <li>Provide supported algorithm list. + <li>Provide phonetic entry support for CJK languge. + <li>Provide method to compare index entry. + </ul> + + @since OOo 1.1.2 + */ +published interface XExtendedIndexEntrySupplier : ::com::sun::star::i18n::XIndexEntrySupplier +{ + //------------------------------------------------------------------------- + /** + Returns locale list for which the IndexEntrySupplier provides service. + */ + sequence < com::sun::star::lang::Locale > getLocaleList(); + + //------------------------------------------------------------------------- + /** + Returns index algorithm list for specific locale + */ + sequence < string > getAlgorithmList( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------- + /** + Checks if Phonetic Entry should be used for the locale. + */ + boolean usePhoneticEntry( [in] com::sun::star::lang::Locale aLocale); + + //------------------------------------------------------------------------- + /** + Returns phonetic candidate for index entry for the locale. + */ + string getPhoneticCandidate( [in] string aIndexEntry, + [in] com::sun::star::lang::Locale aLocale); + + //------------------------------------------------------------------------- + /** + Loads index algorithm for the locale. + + @param aIndexAlgorithm + Index algorithm to be loaded. + + @param nCollatorOptions + Sorting option of <type + scope="::com::sun::star::i18n">CollatorOptions</type> for + comparing index entries + + @return + <TRUE/> if algorithm successfully loaded, + <FALSE/> else. + */ + boolean loadAlgorithm( [in] com::sun::star::lang::Locale aLocale, + [in] string aIndexAlgorithm, + [in] long nCollatorOptions ); + + //------------------------------------------------------------------------- + /** + Returns index key. + + <p> Note that loadAlgorithm should be called before calling + this function. </p> + + @param aIndexEntry + Index entry + + @param aPhoneticEntry + Phonetic entry + + @param aLocale + Language attribute for index and phonetic entry. <br/> + aLocale and the locale in loadAlgorithm may be different. + In the case they are different, phonetic entry will not + be used in the index key generation. + */ + string getIndexKey( [in] string aIndexEntry, [in] string aPhoneticEntry, + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------- + /** + Compares index entries + + <p> Note that loadAlgorithm should be called before calling + this function. </p> + + @param aIndexEntry1 + @param aIndexEntry2 + Index entries to be compared + + @param aPhoneticEntry1 + @param aPhoneticEntry2 + Phonetic entries to be compared + + @param aLocale1 + @param aLocale2 + Language attribute for index and phonetic entry. <br/> + aLocale and the locale in loadAlgorithm may be different. + In the case they are different, phonetic entry will not + be used in the index key generation. + */ + short compareIndexEntry( [in] string aIndexEntry1, [in] string aPhoneticEntry1, + [in] com::sun::star::lang::Locale aLocale1, + [in] string aIndexEntry2, [in] string aPhoneticEntry2, + [in] com::sun::star::lang::Locale aLocale2 ); +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XExtendedInputSequenceChecker.idl b/offapi/com/sun/star/i18n/XExtendedInputSequenceChecker.idl new file mode 100644 index 000000000000..50ed96871610 --- /dev/null +++ b/offapi/com/sun/star/i18n/XExtendedInputSequenceChecker.idl @@ -0,0 +1,64 @@ +/************************************************************************* + * + * 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_XExtendedInputCSequencehecker_idl__ +#define __com_sun_star_i18n_XExtendedInputSequenceChecker_idl__ + +#include <com/sun/star/i18n/XInputSequenceChecker.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + + +/** + This interface perform input sequence correction for the languages like Thai and Hindi + + <p> It is derived from + <type scope="::com::sun::star::i18n">XInputSequenceChecker</type> and + provides additional functionality to correct input sequence.</p> + + @since OOo 2.0.1 + */ +published interface XExtendedInputSequenceChecker : ::com::sun::star::i18n::XInputSequenceChecker +{ + /** @returns + Next nPos, or length of aText if nothing is corrected. + + @param nInputCheckMode + One of <type>InputSequenceCheckMode</type> constants. + */ + long correctInputSequence( [inout] string aText, [in] long nPos, + [in] char cInputChar, [in] short nInputCheckMode ); +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XExtendedTextConversion.idl b/offapi/com/sun/star/i18n/XExtendedTextConversion.idl new file mode 100644 index 000000000000..9c6c5ee43fce --- /dev/null +++ b/offapi/com/sun/star/i18n/XExtendedTextConversion.idl @@ -0,0 +1,82 @@ +/************************************************************************* + * + * 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_XExtendedTextConversion_idl__ +#define __com_sun_star_i18n_XExtendedTextConversion_idl__ + +#include <com/sun/star/i18n/XTextConversion.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + + +/** + This interface provides Text Conversion service. + + <p> It is derived from + <type scope="::com::sun::star::i18n">XTextConversion</type> and provides + a new conversion function containing position map (offset) between original + and conveted string. </p> + + @since OOo 2.0 + */ +published interface XExtendedTextConversion : ::com::sun::star::i18n::XTextConversion +{ + //------------------------------------------------------------------------- + /** + The functionality of this method is same as + <member scope="::com::sun::star::i18n">XTextConversion::getConversion()</member>, + except an additional output parameter rOffset. + + @param rOffset + To find the grapheme of input string corresponding to the + grapheme of output string, rOffset provides the offset array + whose index is the offset of output string, the element + containing the position within the input string. + When the graphemes of input and output strings are simple + one to one mapping, to improve the performance, returned + rOffset will be a zero length array. + */ + string getConversionWithOffset( + [in] string aText, + [in] long nStartPos, + [in] long nLength, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nTextConversionType, + [in] long nTextConversionOptions, + [out] sequence <long> rOffset ) + raises( com::sun::star::lang::IllegalArgumentException, + com::sun::star::lang::NoSupportException ); +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XExtendedTransliteration.idl b/offapi/com/sun/star/i18n/XExtendedTransliteration.idl new file mode 100644 index 000000000000..d7c852e772ea --- /dev/null +++ b/offapi/com/sun/star/i18n/XExtendedTransliteration.idl @@ -0,0 +1,105 @@ +/************************************************************************* + * + * 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_XExtendedTransliteration_idl__ +#define __com_sun_star_i18n_XExtendedTransliteration_idl__ + +#include <com/sun/star/i18n/XTransliteration.idl> +#include <MultipleCharsOutputException.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + + +/** + This interface provides character conversions like case folding or + Hiragana to Katakana. + + <p> It is derived from + <type scope="::com::sun::star::i18n">XTransliteration</type> and provides + additional functionality for character to character and + string to string without offset parameter transliteration. These + should be used for performance reason if their full-blown + counterparts aren't neded. </p> + + @since OOo 1.1.2 + */ +published interface XExtendedTransliteration : ::com::sun::star::i18n::XTransliteration +{ + //------------------------------------------------------------------------ + /** Transliterate a substring. The functionality is the same as + <member scope="::com::sun::star::i18n">XTransliteration::transliterate()</member> + but omits the offset prameter to improve performance. + + @param aStr + The input string. + + @param nStartPos + Start position within aStr from where transliteration starts. + + @param nCount + Number of codepoints to be transliterated. + + */ + string transliterateString2String( [in] string aStr, + [in] long nStartPos, [in] long nCount ); + + + //------------------------------------------------------------------------ + /** Transliterate a character to a string. + + @param cChar + The input character. + */ + string transliterateChar2String( [in] char cChar ); + + //------------------------------------------------------------------------ + /** Transliterate a character to a character. + + <p> If the output contains multiple characters, for example when + transliterating German sharp 's' (the one that looks like a + Greek Beta) to upper case "SS", MultipleCharsOutputException + will be thrown, the caller must catch the exception and then + call + <method>XTransliteration::transliterateChar2String()</method> to + obtain the correct result. </p> + + @param cChar + The input character. + */ + char transliterateChar2Char( [in] char cChar ) + raises( MultipleCharsOutputException ); + +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XForbiddenCharacters.idl b/offapi/com/sun/star/i18n/XForbiddenCharacters.idl new file mode 100644 index 000000000000..6b107c02bec5 --- /dev/null +++ b/offapi/com/sun/star/i18n/XForbiddenCharacters.idl @@ -0,0 +1,86 @@ +/************************************************************************* + * + * 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_XForbiddenCharacters_idl__ +#define __com_sun_star_i18n_XForbiddenCharacters_idl__ + +#include <com/sun/star/i18n/ForbiddenCharacters.idl> + +#ifndef __com_sun_star_lang_Locale_idl__ +#include <com/sun/star/lang/Locale.idl> +#endif +#ifndef __com_sun_star_container_NoSuchElementException_idl__ +#include <com/sun/star/container/NoSuchElementException.idl> +#endif + + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + provides access to forbidden character settings in a document. + + <p> In some languages, particular characters are not allowed to be + placed at the beginning or at the end of a text line. </p> + */ + +published interface XForbiddenCharacters : com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------ + /** returns the forbidden characters for a given locale. + */ + ForbiddenCharacters getForbiddenCharacters( + [in] com::sun::star::lang::Locale aLocale ) + raises( com::sun::star::container::NoSuchElementException ); + + //------------------------------------------------------------------------ + /** determines if forbidden characters are set for a given locale. + */ + boolean hasForbiddenCharacters( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** sets the forbidden characters for a given Locale. + */ + void setForbiddenCharacters( + [in] com::sun::star::lang::Locale aLocale, + [in] ForbiddenCharacters aForbiddenCharacters ); + + //------------------------------------------------------------------------ + /** removes the setting of forbidden characters for a given locale. + */ + void removeForbiddenCharacters( + [in] com::sun::star::lang::Locale aLocale ); +}; + +//============================================================================ +}; }; }; }; + +#endif + diff --git a/offapi/com/sun/star/i18n/XIndexEntrySupplier.idl b/offapi/com/sun/star/i18n/XIndexEntrySupplier.idl new file mode 100644 index 000000000000..14244be6264f --- /dev/null +++ b/offapi/com/sun/star/i18n/XIndexEntrySupplier.idl @@ -0,0 +1,78 @@ +/************************************************************************* + * + * 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_XIndexEntrySupplier_idl__ +#define __com_sun_star_i18n_XIndexEntrySupplier_idl__ + +#ifndef __com_sun_star_lang_Locale_idl__ +#include <com/sun/star/lang/Locale.idl> +#endif + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + supplies information on index entries to generate a "table of + alphabetical index" for a given locale. +*/ + +published interface XIndexEntrySupplier : com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------ + /** + returns the capital index key for sorting a table of indexes, to + a given index entry, to a given <type + scope="com::sun::star::lang">Locale</type> and to a given sort + algorithm. + + <p> For example, in English locale it returns <b>"K"</b> for + "keyboard" + */ + string getIndexCharacter( [in] string aIndexEntry, [in] + com::sun::star::lang::Locale aLocale, [in] string aSortAlgorithm ); + + //------------------------------------------------------------------------ + /** + returns the page number word of an index entry, where one page + or more pages are combined to one page number entry, for a given + <type scope="com::sun::star::lang">Locale</type>. + + <p> For example, in English locale it returns <br/> + <b>"p."</b> for <em>bMorePages</em> == <FALSE/> <br/> + <b>"pp."</b> for <em>bMorePages</em> == <TRUE/> </p> + */ + string getIndexFollowPageWord( [in] boolean bMorePages, + [in] com::sun::star::lang::Locale aLocale ); +}; + +//============================================================================ +};};};}; + +#endif + diff --git a/offapi/com/sun/star/i18n/XInputSequenceChecker.idl b/offapi/com/sun/star/i18n/XInputSequenceChecker.idl new file mode 100644 index 000000000000..74380bb73fe5 --- /dev/null +++ b/offapi/com/sun/star/i18n/XInputSequenceChecker.idl @@ -0,0 +1,60 @@ +/************************************************************************* + * + * 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_XInputSequenceChecker_idl__ +#define __com_sun_star_i18n_XInputSequenceChecker_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +//-------------------------------------------------------------------------- +/** + contains the routine to check Thai input sequence checking + + @since OOo 1.1.2 +*/ +published interface XInputSequenceChecker : ::com::sun::star::uno::XInterface +{ + + /** @returns true/false for the input check + + @param nInputCheckMode + One of <type>InputSequenceCheckMode</type> constants. + */ + boolean checkInputSequence( [in] string aText, [in] long nPos, + [in] char cInputChar, [in] short nInputCheckMode ); +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XLocaleData.idl b/offapi/com/sun/star/i18n/XLocaleData.idl new file mode 100644 index 000000000000..d71a2a937c82 --- /dev/null +++ b/offapi/com/sun/star/i18n/XLocaleData.idl @@ -0,0 +1,137 @@ +/************************************************************************* + * + * 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_XLocaleData_idl__ +#define __com_sun_star_i18n_XLocaleData_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/Locale.idl> +#include <com/sun/star/i18n/LanguageCountryInfo.idl> +#include <com/sun/star/i18n/Currency.idl> +#include <com/sun/star/i18n/Calendar.idl> +#include <com/sun/star/i18n/LocaleDataItem.idl> +#include <com/sun/star/i18n/ForbiddenCharacters.idl> +#include <com/sun/star/i18n/FormatElement.idl> +#include <com/sun/star/i18n/Implementation.idl> + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Access locale specific data as it is defined in XML locale data + files compiled into the binary data libraries liblocaledata*.so + respectively localedata*.dll. + + <p> For XML locale data files definitions see <a + href="http://l10n.openoffice.org/source/browse/l10n/i18npool/source/localedata/data/locale.dtd"> + the DTD file </a> (or the <a + href="http://l10n.openoffice.org/source/browse/l10n/i18npool/source/localedata_ascii/Attic/locale.dtd"> + old Attic version </a> for OOo1.0/SO6.0). </p> + */ + +published interface XLocaleData: com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------ + /** returns the LC_INFO locale information. + */ + LanguageCountryInfo getLanguageCountryInfo( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** returns LC_CTYPE separators and markers. + */ + LocaleDataItem getLocaleItem( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** returns all LC_CALENDAR calendars for a locale. + */ + sequence<Calendar> getAllCalendars( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** returns all LC_CURRENCY currencies for a locale. + */ + sequence<Currency> getAllCurrencies( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** returns all LC_FORMAT format elements for a locale. + */ + sequence<FormatElement> getAllFormats( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** returns all LC_COLLATION collators for a locale. + */ + sequence<Implementation> getCollatorImplementations( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** returns all LC_SEARCH search options for a locale. + */ + sequence<string> getSearchOptions( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** returns all LC_COLLATION collation options for a locale. + */ + sequence<string> getCollationOptions( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** returns all LC_TRANSLITERATION transliterations for a locale. + */ + sequence<string> getTransliterations( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** returns all LC_MISC forbidden charatcers for a locale. + */ + ForbiddenCharacters getForbiddenCharacters ( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** returns all LC_MISC reserved words for a locale. + + @see reservedWords + */ + sequence<string> getReservedWord( + [in] com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** returns all available locales. + */ + sequence<com::sun::star::lang::Locale> getAllInstalledLocaleNames(); +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XLocaleData2.idl b/offapi/com/sun/star/i18n/XLocaleData2.idl new file mode 100644 index 000000000000..9b06ef159e55 --- /dev/null +++ b/offapi/com/sun/star/i18n/XLocaleData2.idl @@ -0,0 +1,62 @@ +/************************************************************************* + * + * 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_XLocaleData2_idl__ +#define __com_sun_star_i18n_XLocaleData2_idl__ + +#include <com/sun/star/i18n/XLocaleData.idl> +#include <com/sun/star/i18n/Currency2.idl> + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Access locale specific data. + + <p> Derived from + <type scope="::com::sun::star::i18n">XLocaleData</type> and provides + an additional method to return a sequence of all + <type scope="::com::sun::star::i18n">Currency2</type> elements + available for that locale. + + @since OOo 2.0.3 + */ + +published interface XLocaleData2 : com::sun::star::i18n::XLocaleData +{ + /** returns all LC_CURRENCY currencies for a locale. + */ + sequence< Currency2 > getAllCurrencies2( + [in] com::sun::star::lang::Locale aLocale ); +}; + +//============================================================================ +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XNativeNumberSupplier.idl b/offapi/com/sun/star/i18n/XNativeNumberSupplier.idl new file mode 100644 index 000000000000..a11ad7a9c84c --- /dev/null +++ b/offapi/com/sun/star/i18n/XNativeNumberSupplier.idl @@ -0,0 +1,95 @@ +/************************************************************************* + * + * 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_XNativeNumberSupplier_idl__ +#define __com_sun_star_i18n_XNativeNumberSupplier_idl__ + +#include <com/sun/star/lang/Locale.idl> +#include <NativeNumberXmlAttributes.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Methods to convert between strings of ASCII Arabic digits and native + numeral strings. + + @since OOo 1.1.2 + */ + +published interface XNativeNumberSupplier : ::com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------- + /** Returns native number string for given number string. + + @param nNativeNumberMode + One of <type>NativeNumberMode</type> values. + */ + + string getNativeNumberString( [in] string aNumberString, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nNativeNumberMode ); + + //------------------------------------------------------------------------- + /** Check if the NatNum is valid for the given locale. + + @param nNativeNumberMode + One of <type>NativeNumberMode</type> values. + */ + + boolean isValidNatNum( [in] ::com::sun::star::lang::Locale aLocale, + [in] short nNativeNumberMode ); + + //------------------------------------------------------------------------- + /** Convert a specific NatNum/Locale combination to attributes used + in the XML file format. + + @param nNativeNumberMode + One of <type>NativeNumberMode</type> values. + */ + + NativeNumberXmlAttributes convertToXmlAttributes( + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nNativeNumberMode ); + + //------------------------------------------------------------------------- + /** Convert XML attributes to a NatNum value. + + @returns + One of <type>NativeNumberMode</type> + */ + + short convertFromXmlAttributes( [in] NativeNumberXmlAttributes aAttr ); + +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XNumberFormatCode.idl b/offapi/com/sun/star/i18n/XNumberFormatCode.idl new file mode 100644 index 000000000000..662657ff3ee4 --- /dev/null +++ b/offapi/com/sun/star/i18n/XNumberFormatCode.idl @@ -0,0 +1,97 @@ +/************************************************************************* + * + * 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_XNumberFormatCode_idl__ +#define __com_sun_star_i18n_XNumberFormatCode_idl__ + +#ifndef __com_sun_star_lang_Locale_idl__ +#include <com/sun/star/lang/Locale.idl> +#endif +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/i18n/NumberFormatCode.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Access number format codes defined in locale data. + */ + +published interface XNumberFormatCode : com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------ + /** + returns the default number format code of a specific category + (usage group) for a given locale and format length type. + + @param nFormatType + one of the constants listed in <type>KNumberFormatType</type> + + @param nFormatUsage + one of <type>KNumberFormatUsage</type> values + */ + NumberFormatCode getDefault( [in] short nFormatType, + [in] short nFormatUsage, + [in] com::sun::star::lang::Locale rLocale ); + + //------------------------------------------------------------------------ + /** + returns the number format pointed to by <em>nFormatIndex</em> for + a given locale. + + @param nFormatIndex + one of <type>NumberFormatIndex</type> values + */ + NumberFormatCode getFormatCode( [in] short nFormatIndex, + [in] com::sun::star::lang::Locale rLocale ); + + //------------------------------------------------------------------------ + /** + returns all format codes for a given <em>nFormatUsage</em> and locale. + + @param nFormatUsage + one of <type>KNumberFormatUsage</type> values + */ + sequence< NumberFormatCode > getAllFormatCode( + [in] short nFormatUsage, + [in] com::sun::star::lang::Locale rLocale ); + + //------------------------------------------------------------------------ + /** + returns all format codes for a given locale. + */ + sequence< NumberFormatCode > getAllFormatCodes( + [in] com::sun::star::lang::Locale rLocale ); + +}; + +//============================================================================= +}; }; }; }; +#endif diff --git a/offapi/com/sun/star/i18n/XOrdinalSuffix.idl b/offapi/com/sun/star/i18n/XOrdinalSuffix.idl new file mode 100644 index 000000000000..7da294782791 --- /dev/null +++ b/offapi/com/sun/star/i18n/XOrdinalSuffix.idl @@ -0,0 +1,70 @@ +/************************************************************************* + * + * 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 INCLUDED_com_sun_star_i18n_XOrdinalSuffix_idl +#define INCLUDED_com_sun_star_i18n_XOrdinalSuffix_idl + +#include <com/sun/star/lang/Locale.idl> + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** provides access to locale specific ordinal suffix systems. + + @since OOo2.2 + + @internal + + ATTENTION: This interface is marked <em>internal</em> and does not + have the <em>published</em> flag, which means it is subject to + change without notice and should not be used outside the OOo core. + The current version is a draft and works only for English language + locales. Future enhancements adding functionality for other locales + should use the 'ordinal' RuleBasedNumberFormat of the ICU if + possible, see + http://icu.sourceforge.net/apiref/icu4c/classRuleBasedNumberFormat.html + which might make it necessary to change the interface. + */ + +interface XOrdinalSuffix : com::sun::star::uno::XInterface +{ + //------------------------------------------------------------------------ + /** Returns the ordinal suffix for the number, for example, + "<b>st</b>", "<b>nd</b>", "<b>rd</b>", "<b>th</b>" + in an English locale. + */ + string getOrdinalSuffix( [in] long nNumber, [in] com::sun::star::lang::Locale aLocale ); +}; + +//============================================================================ +}; }; }; }; +//============================================================================ + +#endif diff --git a/offapi/com/sun/star/i18n/XScriptTypeDetector.idl b/offapi/com/sun/star/i18n/XScriptTypeDetector.idl new file mode 100644 index 000000000000..9ce7efb1f830 --- /dev/null +++ b/offapi/com/sun/star/i18n/XScriptTypeDetector.idl @@ -0,0 +1,91 @@ +/************************************************************************* + * + * 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_XScriptTypeDetector_idl__ +#define __com_sun_star_i18n_XScriptTypeDetector_idl__ + +#include <com/sun/star/uno/XInterface.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +//-------------------------------------------------------------------------- +/** + contains the help routines for layouting complex text + + <p> Assumption - StartPos is inclusive and EndPos is exclusive. </p> + + <p> The <em>nScriptDirection</em> parameters are of type + <type>ScriptDirection</type></p> + + @since OOo 1.1.2 +*/ + +published interface XScriptTypeDetector : ::com::sun::star::uno::XInterface +{ + + /** @returns the position where the specified Script Direction starts. + */ + long beginOfScriptDirection( [in] string aText, [in] long nPos, + [in] short nScriptDirection ); + + //-------------------------------------------------------------------------- + /** @returns the position where the specified Script Direction ends. + */ + long endOfScriptDirection( [in] string aText, [in] long nPos, + [in] short nScriptDirection ); + + //-------------------------------------------------------------------------- + /** @returns the Script Direction of the current position. + */ + short getScriptDirection ([in] string aText, [in] long nPos, + [in] short nDefaultScriptDirection ); + + //-------------------------------------------------------------------------- + /** @returns the position where the specified CTL Script Type starts. + */ + long beginOfCTLScriptType( [in] string aText, [in] long nPos); + + //-------------------------------------------------------------------------- + /** @returns the position where the specified CTL Script Type ends. + */ + long endOfCTLScriptType( [in] string aText, [in] long nPos); + + //-------------------------------------------------------------------------- + /** @returns the CTL script type of the current position. <br/> + One of <type>CTLScriptType</type> constants. + */ + short getCTLScriptType ([in] string aText, [in] long nPos); +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XTextConversion.idl b/offapi/com/sun/star/i18n/XTextConversion.idl new file mode 100644 index 000000000000..0e22052ff93e --- /dev/null +++ b/offapi/com/sun/star/i18n/XTextConversion.idl @@ -0,0 +1,161 @@ +/************************************************************************* + * + * 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_XTextConversion_idl__ +#define __com_sun_star_i18n_XTextConversion_idl__ + +#ifndef __com_sun_star_uno_XInterface_idl__ +#include <com/sun/star/uno/XInterface.idl> +#endif + +#ifndef __com_sun_star_lang_Locale_idl__ +#include <com/sun/star/lang/Locale.idl> +#endif + +#ifndef __com_sun_star_i18n_TextConversionResult_idl__ +#include <com/sun/star/i18n/TextConversionResult.idl> +#endif + +#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ +#include <com/sun/star/lang/IllegalArgumentException.idl> +#endif + +#ifndef __com_sun_star_lang_NoSupportException_idl__ +#include <com/sun/star/lang/NoSupportException.idl> +#endif + + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Method to convert text from one type to another + + @since OOo 1.1.2 +*/ +published interface XTextConversion : ::com::sun::star::uno::XInterface +{ + //--------------------------------------------------------------------- + /** Method to search dictionaries for the conversion candidates. + + @param aText + Text string to be converted. + @param nStartPos + The start position in aText for the conversion + @param nLength + The length of the partion in aText for the conversion + @param aLocal + Locale the conversion is referring to. + @param nTextConversionType + One of <type>TextConversionType</type> values. + @param nTextConversionOptions + Combination of <type>TextConversionOption</type> values. + @returns + <type>TextConversionResult</type> + + @throws NoSupportException + when <var>nConversionDictionaryType</var> is not known by the implementation, + or when the locale is not supported. + */ + TextConversionResult getConversions( + [in] string aText, + [in] long nStartPos, + [in] long nLength, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nTextConversionType, + [in] long nTextConversionOptions ) + raises( com::sun::star::lang::IllegalArgumentException, + com::sun::star::lang::NoSupportException ); + + //--------------------------------------------------------------------- + /** Method to search dictionaries for the conversion candidate, if there + are multiple candidates, it will return first one. This is for the + conversion in non-interactive mode. + + @param aText + Text string to be converted. + @param nStartPos + The start position in aText for the conversion + @param nLength + The length of the partion in aText for the conversion + @param aLocal + Locale the conversion is referring to. + @param nTextConversionType + One of <type>TextConversionType</type> values. + @param nTextConversionOptions + Combination of <type>TextConversionOption</type> values. + @returns + Converted text + + @throws NoSupportException + when <var>nConversionDictionaryType</var> is not known by the implementation, + or when the locale is not supported. + */ + string getConversion( + [in] string aText, + [in] long nStartPos, + [in] long nLength, + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nTextConversionType, + [in] long nTextConversionOptions ) + raises( com::sun::star::lang::IllegalArgumentException, + com::sun::star::lang::NoSupportException ); + + //--------------------------------------------------------------------- + /** Method to query if the conversion type should be interactive or + non-interactive mode. + + @param aLocal + Locale the conversion is referring to. + @param nTextConversionType + One of <type>TextConversionType</type> values. + @param nTextConversionOptions + Combination of <type>TextConversionOption</type> values. + @returns + <TRUE/> if the entry is a valid entry for the dictionary + <FALSE/> otherwise. + + @throws NoSupportException + when <var>nConversionDictionaryType</var> is not known by the implementation, + or when the locale is not supported. + */ + boolean interactiveConversion( + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nTextConversionType, + [in] long nTextConversionOptions ) + raises( com::sun::star::lang::IllegalArgumentException, + com::sun::star::lang::NoSupportException ); +}; + + +//============================================================================= + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/XTransliteration.idl b/offapi/com/sun/star/i18n/XTransliteration.idl new file mode 100644 index 000000000000..aa003604eadf --- /dev/null +++ b/offapi/com/sun/star/i18n/XTransliteration.idl @@ -0,0 +1,331 @@ +/************************************************************************* + * + * 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_XTransliteration_idl__ +#define __com_sun_star_i18n_XTransliteration_idl__ + +#include <com/sun/star/lang/Locale.idl> +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/i18n/TransliterationModules.idl> +#include <com/sun/star/i18n/TransliterationModulesNew.idl> + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** + Character conversions like case folding or Hiragana to Katakana. + + <p> Transliteration is a character to character conversion but it is + not always a one to one mapping between characters. Transliteration + modules are primarily used by collation, and search and replace + modules to perform approximate search. It can also be used to format + the numbers in different numbering systems. <p/> + + <p> In order to select transliteration modules for different + purposes, they are classified with attributes of + <type>TransliterationType</type>. <p/> + + <p> For Western languages there would be three transliteration + modules available to compare two mixed case strings: upper to lower, + lower to upper, and ignore case. </p> + + <p> A typical calling sequence of transliteration is + <ol> + <li> getAvailableModules() </li> + <li> loadModulesByImplNames() </li> + <li> equals() </li> + </ol> + or another one is + <ol> + <li> loadModule() </li> + <li> transliterate() </li> + </ol> + </p> + +*/ + +/* comment: + * 0. + * All the IGNORE-type functionalities (Range, equals) are based on mapping. + * except equals() method in IGNORE_CASE, which is based on Locale-independent + * casefolding + * ( This second assumption is very complicated and may cause confusion of use) + * + * 1. + * We are assuming Upper to Lower mapping as one of transliteration. + * The mapping depends on Locale. + * Upper <-> Lower methods are just wrappers to provide equals() and Range() + * + * 2. + * equals() in IGNORE_CASE module is locale-independent and + * we don't provide locale-sensitive ones. + * The reason we provided locale-independent ones is that IGNORE_CASE is mainly + * dedicated to StarOffice internal code. + * + * 3. + * TransliterationModules is used just for convenience without calling + * getAvailableModule. + * + * 4. + * Implementation name in the methods below is not the same as + * the true implemenation name registered. + * In particular, for generic modules:"UPPERCASE_LOWERCASE", + * "LOWERCASE_UPPERCASE", "IGNORE_CASE", there is no registered name. + */ + + +published interface XTransliteration: com::sun::star::uno::XInterface +{ + + //------------------------------------------------------------------------ + /** Unique ASCII name to identify a module. This name is used + to get its localized name for menus, dialogs etc. The behavior + is undefined for <const>TransliterationType::CASCADE</const> + modules. + */ + string getName(); + + //------------------------------------------------------------------------ + /** Return the attribute(s) associated with this transliterator + object, as defined in <type>TransliterationType</type>. The + value is determined by the transliteration modules. For example, + for UPPERCASE_LOWERCASE, a ONE_TO_ONE is returned, for + IGNORE_CASE, IGNORE is returned. + */ + short getType(); + + //------------------------------------------------------------------------ + /** Load instance of predefined module - old style method. + */ + void loadModule( [in] TransliterationModules eModType, + [in] ::com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** Load a sequence of instances of predefined modules - supersedes + method <member>XTransliteration::loadModule()</member>. + */ + void loadModuleNew( [in] sequence <TransliterationModulesNew> aModType, + [in] ::com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** Load instance of UNO registered module. + + <p> Each transliteration module is registered under a different + service name. The convention for the service name is + com.sun.star.i18n.Transliteration.l10n.{implName}. The + {implName} is a unique name used to identify a module. The + implName is used to get a localized name for the transliteration + module. The implName is used in locale data to list the + available transliteration modules for the locale. There are some + transliteration modules that are always available. The names of + those modules are listed as enum + <type>TransliterationModules</type> names. For modules not + listed there it is possible to load them directly by their + implName. + + @param aImplName + The module's {implName} under which it is registered with + com.sun.star.i18n.Transliteration.l10n.{implName}. + */ + void loadModuleByImplName( [in] string aImplName, + [in] ::com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** Load a sequence of instances of transliteration modules. + Output of one module is feeded as input to the next module in + the sequence. The object created by this call has + <type>TransliterationType</type> CASCADE and IGNORE types. + + @param aImplNameList + Only IGNORE type modules can be specified. + */ + void loadModulesByImplNames( [in] sequence <string> aImplNameList, + [in] ::com::sun::star::lang::Locale aLocale ); + + //------------------------------------------------------------------------ + /** List the available transliteration modules for a given locale. + It can be filtered based on its type. + + @param nType + A bitmask field of values defined in + <type>TransliterationType</type> + */ + sequence<string> getAvailableModules( + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nType ); + + + //------------------------------------------------------------------------ + /** Transliterate a substring. This method can be called if the + object doesn't have <type>TransliterationType</type> IGNORE + attribute. + + @param aStr + The input string. + + @param nStartPos + Start position within aStr from where transliteration starts. + + @param nCount + Number of codepoints to be transliterated. + + @param rOffset + To find the grapheme of input string corresponding to the + grapheme of output string, rOffset provides the offset array + whose index is the offset of output string, the element + containing the position within the input string before + transliteration. + */ + string transliterate( [in] string aInStr, [in] long nStartPos, + [in] long nCount, [out] sequence <long> rOffset ); + + //------------------------------------------------------------------------ + /** @deprecated + For internal use, this method is supported to get the + "transliteration", which equals() is based on. + */ + string folding( [in] string aInStr, [in] long nStartPos, + [in] long nCount, [out] sequence <long> rOffset ); + + //------------------------------------------------------------------------ + /** Match two substrings and find if they are equivalent as per this + transliteration. + + <p> This method can be called if the object has + <type>TransliterationType</type> IGNORE attribute. </p> + + <p> Returns the number of matched code points in any case, even if + strings are not equal, for example: <br/> + equals( "a", 0, 1, nMatch1, "aaa", 0, 3, nMatch2 ) <br/> + returns <FALSE/> and nMatch:=1 and nMatch2:=1 <br/> + equals( "aab", 0, 3, nMatch1, "aaa", 0, 3, nMatch2 ) <br/> + returns <FALSE/> and nMatch:=2 and nMatch2:=2 <br/> </p> + + @param aStr1 + First string to match. + + @param nPos1 + Start position within aStr1. + + @param nCount1 + Number of code points to use of aStr1. + + @param rMatch1 + Returns number of matched code points in aStr1. + + @param aStr2 + Second string to match. + + @param nPos2 + Start position within aStr2. + + @param nCount2 + Number of code points to use of aStr2. + + @param rMatch2 + Returns number of matched code points in aStr2. + + @returns + <TRUE/> if the substrings are equal per this + transliteration <br/> + <FALSE/> else. + */ + + boolean equals( [in] string aStr1, [in] long nPos1, [in] long nCount1, + [out] long rMatch1, + [in] string aStr2, [in] long nPos2, [in] long nCount2, + [out] long rMatch2 ); + + //------------------------------------------------------------------------ + /** Transliterate one set of characters to another. + + <p> This method is intended for getting corresponding ranges and + can be called if the object has <type>TransliterationType</type> + IGNORE attribute. </p> + + <p> For example: generic CASE_IGNORE transliterateRange( "a", "i" ) + returns {"A","I","a","i"}, transliterateRange( "a", "a" ) + returns {"A","A","a","a"}. </p> + + <p> Use this transliteration to create regular expresssions like + [a-i] --> [A-Ia-i]. </p> + + @returns + String sequence containing corresponding transliterated + pairs of characters to represent a range. + */ + sequence <string> transliterateRange( [in] string aStr1, [in] string aStr2 ); + + //------------------------------------------------------------------------ + /** Compare 2 substrings as per this transliteration. It translates both + substrings before comparing them. + + @param aStr1 + First string. + + @param nOff1 + Offset (from 0) of the first substring. + + @param nLen1 + Length (from offset) of the first substring. + + @param aStr2 + Second string. + + @param nOff2 + Offset (from 0) of the second substring. + + @param nLen2 + Length (from offset) of the second substring. + + @returns + 1 if the first substring is greater than the second substring <br/> + 0 if the first substring is equal to the second substring <br/> + -1 if the first substring is less than the second substring + */ + long compareSubstring( [in] string aStr1, [in] long nOff1, [in] long nLen1, + [in] string aStr2, [in] long nOff2, [in] long nLen2 ); + + //------------------------------------------------------------------------ + /** Compare 2 strings as per this transliteration. It translates both + strings before comparing them. + + @returns + 1 if the first string is greater than the second string <br/> + 0 if the first string is equal to the second string <br/> + -1 if the first string is less than the second string + */ + long compareString( [in] string aStr1, [in] string aStr2 ); + +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/makefile.mk b/offapi/com/sun/star/i18n/makefile.mk new file mode 100644 index 000000000000..7d861fa1436d --- /dev/null +++ b/offapi/com/sun/star/i18n/makefile.mk @@ -0,0 +1,129 @@ +#************************************************************************* +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/..$/.. + +PRJNAME=offapi + +TARGET=cssi18n +PACKAGE=com$/sun$/star$/i18n + +# --- Settings ----------------------------------------------------- +.INCLUDE : $(PRJ)$/util$/makefile.pmk + +# ------------------------------------------------------------------------ + +IDLFILES=\ + AmPmValue.idl \ + Boundary.idl \ + BreakIterator.idl \ + BreakType.idl \ + CTLScriptType.idl \ + Calendar.idl \ + CalendarDisplayCode.idl \ + CalendarDisplayIndex.idl \ + CalendarFieldIndex.idl \ + CalendarItem.idl \ + ChapterCollator.idl \ + CharType.idl \ + CharacterClassification.idl \ + CharacterIteratorMode.idl \ + Collator.idl \ + CollatorOptions.idl \ + Currency.idl \ + Currency2.idl \ + DirectionProperty.idl \ + ForbiddenCharacters.idl \ + FormatElement.idl \ + Implementation.idl \ + IndexEntrySupplier.idl \ + InputSequenceChecker.idl \ + InputSequenceCheckMode.idl \ + KCharacterType.idl \ + KNumberFormatType.idl \ + KNumberFormatUsage.idl \ + KParseTokens.idl \ + KParseType.idl \ + LanguageCountryInfo.idl \ + LineBreakHyphenationOptions.idl \ + LineBreakResults.idl \ + LineBreakUserOptions.idl \ + LocaleCalendar.idl \ + LocaleData.idl \ + LocaleDataItem.idl \ + LocaleItem.idl \ + Months.idl \ + MultipleCharsOutputException.idl \ + NativeNumberMode.idl \ + NativeNumberSupplier.idl \ + NativeNumberXmlAttributes.idl \ + NumberFormatCode.idl \ + NumberFormatIndex.idl \ + NumberFormatMapper.idl \ + ParseResult.idl \ + ScriptDirection.idl \ + ScriptType.idl \ + TextConversion.idl \ + TextConversionOption.idl \ + TextConversionResult.idl \ + TextConversionType.idl \ + Transliteration.idl \ + TransliterationModules.idl \ + TransliterationModulesNew.idl \ + TransliterationModulesExtra.idl \ + TransliterationType.idl \ + UnicodeScript.idl \ + UnicodeType.idl \ + Weekdays.idl \ + WordType.idl \ + XBreakIterator.idl \ + XCalendar.idl \ + XCharacterClassification.idl \ + XCollator.idl \ + XExtendedCalendar.idl \ + XExtendedIndexEntrySupplier.idl \ + XExtendedTransliteration.idl \ + XForbiddenCharacters.idl \ + XIndexEntrySupplier.idl \ + XInputSequenceChecker.idl \ + XExtendedInputSequenceChecker.idl \ + XLocaleData.idl \ + XLocaleData2.idl \ + XNativeNumberSupplier.idl \ + XNumberFormatCode.idl \ + XTextConversion.idl \ + XExtendedTextConversion.idl \ + XScriptTypeDetector.idl \ + XTransliteration.idl \ + reservedWords.idl \ + XOrdinalSuffix.idl \ + OrdinalSuffix.idl + +# ------------------------------------------------------------------ + +.INCLUDE : target.mk +.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/offapi/com/sun/star/i18n/reservedWords.idl b/offapi/com/sun/star/i18n/reservedWords.idl new file mode 100644 index 000000000000..846a85df1613 --- /dev/null +++ b/offapi/com/sun/star/i18n/reservedWords.idl @@ -0,0 +1,80 @@ +/************************************************************************* + * + * 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_reservedWords_idl__ +#define __com_sun_star_i18n_reservedWords_idl__ + +//============================================================================ + +module com { module sun { module star { module i18n { + +//============================================================================ + +/** + Offsets into the sequence of strings returned by + <member>XLocaleData::getReservedWord()</member>. + + @see XLocaleData + for links to DTD of XML locale data files. + */ + +published constants reservedWords +{ + /// "true" + const short TRUE_WORD = 0; + /// "false" + const short FALSE_WORD = 1; + /// "1st quarter" + const short QUARTER1_WORD = 2; + /// "2nd quarter" + const short QUARTER2_WORD = 3; + /// "3rd quarter" + const short QUARTER3_WORD = 4; + /// "4th quarter" + const short QUARTER4_WORD = 5; + /// "above" + const short ABOVE_WORD = 6; + /// "below" + const short BELOW_WORD = 7; + /// "Q1" + const short QUARTER1_ABBREVIATION = 8; + /// "Q2" + const short QUARTER2_ABBREVIATION = 9; + /// "Q3" + const short QUARTER3_ABBREVIATION = 10; + /// "Q4" + const short QUARTER4_ABBREVIATION = 11; + + //! Yes, this must be the count of known reserved words and one more than + //! the maximum number used above! + /// Count of known reserved words. + const short COUNT = 12; +}; + +//============================================================================ +}; }; }; }; + +#endif |