diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /offapi/com/sun/star/i18n | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'offapi/com/sun/star/i18n')
97 files changed, 7704 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 000000000..9e0967bb6 --- /dev/null +++ b/offapi/com/sun/star/i18n/AmPmValue.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 XCalendar::getDisplayName(). + */ +published constants AmPmValue +{ + /// get display name string for AM + const short AM = 0; + /// get display name string for PM + const short PM = 1; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/Boundary.idl b/offapi/com/sun/star/i18n/Boundary.idl new file mode 100644 index 000000000..ecf1d130a --- /dev/null +++ b/offapi/com/sun/star/i18n/Boundary.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/BreakIterator.idl b/offapi/com/sun/star/i18n/BreakIterator.idl new file mode 100644 index 000000000..765bd6b02 --- /dev/null +++ b/offapi/com/sun/star/i18n/BreakIterator.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_i18n_BreakIterator_idl__ +#define __com_sun_star_i18n_BreakIterator_idl__ + +#include <com/sun/star/i18n/XBreakIterator.idl> + + + 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 : com::sun::star::i18n::XBreakIterator; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/BreakType.idl b/offapi/com/sun/star/i18n/BreakType.idl new file mode 100644 index 000000000..44e5cb6d2 --- /dev/null +++ b/offapi/com/sun/star/i18n/BreakType.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + LineBreakResults::breakType(). + */ + +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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/CTLScriptType.idl b/offapi/com/sun/star/i18n/CTLScriptType.idl new file mode 100644 index 000000000..dae5956f3 --- /dev/null +++ b/offapi/com/sun/star/i18n/CTLScriptType.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_CTLScriptType_idl__ +#define __com_sun_star_i18n_CTLScriptType_idl__ + + + +module com { module sun { module star { module i18n { + + +/** CTL script type constants for layout engine, returned by + XScriptTypeDetector::getCTLScriptType() + + @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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/Calendar.idl b/offapi/com/sun/star/i18n/Calendar.idl new file mode 100644 index 000000000..ea03af8f7 --- /dev/null +++ b/offapi/com/sun/star/i18n/Calendar.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + XLocaleData::getAllCalendars(). + + @see XLocaleData + for links to DTD of XML locale data files. + */ + +published struct Calendar +{ + /// the days of the week, see also CalendarItem. + sequence< CalendarItem > Days; + /// the months of the year, see also CalendarItem. + sequence< CalendarItem > Months; + /// the possible eras, see also CalendarItem. + 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/Calendar2.idl b/offapi/com/sun/star/i18n/Calendar2.idl new file mode 100644 index 000000000..25a3cfd00 --- /dev/null +++ b/offapi/com/sun/star/i18n/Calendar2.idl @@ -0,0 +1,77 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_i18n_Calendar2_idl__ +#define __com_sun_star_i18n_Calendar2_idl__ + +#include <com/sun/star/i18n/CalendarItem2.idl> + + +module com { module sun { module star { module i18n { + + +/** + Calendar items as returned in a sequence by + XLocaleData3::getAllCalendars2(). + + <p> Similar to + ::com::sun::star::i18n::Calendar this provides + additional members with a sequence of possessive (genitive case) and + partitive case month names for locales that use them, for example + Slavic locales. If a locale does not provide the possessive form in + #GenitiveMonths, the names are identical to the + nominative case nouns in Calendar::Months. If a + locale does not provide the partitive case in + #PartitiveMonths, the names are identical to + #GenitiveMonths. </p> + + <p> The sequences are of type + com::sun::star::i18n::CalendarItem2 instead of + com::sun::star::i18n::CalendarItem, with the + additional NarrowName member. + + @see XLocaleData + for links to DTD of XML locale data files. + + @since LibreOffice 3.5 + */ + +published struct Calendar2 +{ + /// The days of the week. + sequence< CalendarItem2 > Days; + + /// The months of the year. + sequence< CalendarItem2 > Months; + + /// The months of the year in possessive genitive case. + sequence< CalendarItem2 > GenitiveMonths; + + /// The months of the year in partitive case. + sequence< CalendarItem2 > PartitiveMonths; + + /// The possible eras. + sequence< CalendarItem2 > 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 000000000..b499f01a1 --- /dev/null +++ b/offapi/com/sun/star/i18n/CalendarDisplayCode.idl @@ -0,0 +1,122 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 XExtendedCalendar::getDisplayString(). + + <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; + /// Abbreviated month name. + const long SHORT_MONTH_NAME = 7; + /// Full month name. + const long LONG_MONTH_NAME = 8; + + /// Year, two digits. + const long SHORT_YEAR = 9; + /// Year, four digits. + const long LONG_YEAR = 10; + /// Abbreviated era name, for example, BC or AD. + const long SHORT_ERA = 11; + /// Full era name, for example, "Before Christ" or "Anno Dominus". + 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; + + /** Abbreviated possessive genitive case month name. + @since LibreOffice 3.5 + */ + const long SHORT_GENITIVE_MONTH_NAME = 17; + + /** Full possessive genitive case month name. + @since LibreOffice 3.5 + */ + const long LONG_GENITIVE_MONTH_NAME = 18; + + /** Narrow possessive genitive case month name. + @since LibreOffice 3.5 + */ + const long NARROW_GENITIVE_MONTH_NAME = 19; + + /** Abbreviated partitive case month name. + @since LibreOffice 3.5 + */ + const long SHORT_PARTITIVE_MONTH_NAME = 20; + + /** Full partitive case month name. + @since LibreOffice 3.5 + */ + const long LONG_PARTITIVE_MONTH_NAME = 21; + + /** Narrow partitive case month name. + @since LibreOffice 3.5 + */ + const long NARROW_PARTITIVE_MONTH_NAME = 22; + + /** Day of week, narrow name. + @since LibreOffice 3.5 + */ + const long NARROW_DAY_NAME = 23; + + /** Narrow month name. + @since LibreOffice 3.5 + */ + const long NARROW_MONTH_NAME = 24; + +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/CalendarDisplayIndex.idl b/offapi/com/sun/star/i18n/CalendarDisplayIndex.idl new file mode 100644 index 000000000..4c9b358a5 --- /dev/null +++ b/offapi/com/sun/star/i18n/CalendarDisplayIndex.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 XCalendar::getDisplayName(). + */ +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; + + /** name of a possessive genitive case month + @since LibreOffice 3.5 + */ + const short GENITIVE_MONTH = 5; + + /** name of a partitive case month + @since LibreOffice 3.5 + */ + const short PARTITIVE_MONTH = 6; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/CalendarFieldIndex.idl b/offapi/com/sun/star/i18n/CalendarFieldIndex.idl new file mode 100644 index 000000000..d1a511c8d --- /dev/null +++ b/offapi/com/sun/star/i18n/CalendarFieldIndex.idl @@ -0,0 +1,128 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 XCalendar 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 AmPmValue. + 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/CalendarItem.idl b/offapi/com/sun/star/i18n/CalendarItem.idl new file mode 100644 index 000000000..4f6159012 --- /dev/null +++ b/offapi/com/sun/star/i18n/CalendarItem.idl @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + Calendar::Days, Calendar::Months, + Calendar::Eras </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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/CalendarItem2.idl b/offapi/com/sun/star/i18n/CalendarItem2.idl new file mode 100644 index 000000000..ae5251a58 --- /dev/null +++ b/offapi/com/sun/star/i18n/CalendarItem2.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_i18n_CalendarItem2_idl__ +#define __com_sun_star_i18n_CalendarItem2_idl__ + +#include <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> Derived from com::sun::star::i18n::CalendarItem + this provides an additional member for narrow names. </p> + + @since LibreOffice 3.5 + */ + +published struct CalendarItem2 : com::sun::star::i18n::CalendarItem +{ + /** The narrow name, for example, <b>"S"</b> for Sunday or + <b>"J"</b> for January. + */ + string NarrowName; +}; + +}; }; }; }; + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/ChapterCollator.idl b/offapi/com/sun/star/i18n/ChapterCollator.idl new file mode 100644 index 000000000..6fced5b79 --- /dev/null +++ b/offapi/com/sun/star/i18n/ChapterCollator.idl @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_i18n_ChapterCollator_idl__ +#define __com_sun_star_i18n_ChapterCollator_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 : com::sun::star::i18n::XCollator; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/CharType.idl b/offapi/com/sun/star/i18n/CharType.idl new file mode 100644 index 000000000..137b29fc4 --- /dev/null +++ b/offapi/com/sun/star/i18n/CharType.idl @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 UnicodeType + + <p> Used with XBreakIterator::beginOfCharBlock(), + XBreakIterator::endOfCharBlock(), + XBreakIterator::nextCharBlock(), + XBreakIterator::previousCharBlock() </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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/CharacterClassification.idl b/offapi/com/sun/star/i18n/CharacterClassification.idl new file mode 100644 index 000000000..927ea3791 --- /dev/null +++ b/offapi/com/sun/star/i18n/CharacterClassification.idl @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_CharacterClassification_idl__ +#define __com_sun_star_i18n_CharacterClassification_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 : com::sun::star::i18n::XCharacterClassification; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/CharacterIteratorMode.idl b/offapi/com/sun/star/i18n/CharacterIteratorMode.idl new file mode 100644 index 000000000..42ec68f49 --- /dev/null +++ b/offapi/com/sun/star/i18n/CharacterIteratorMode.idl @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 XBreakIterator::nextCharacters() and + XBreakIterator::previousCharacters() </p> + */ +published constants CharacterIteratorMode +{ + /// skip characters + const short SKIPCHARACTER = 0; + + /// skip cells + const short SKIPCELL = 1; + + /// skip control characters + const short SKIPCONTROLCHARACTER = 2; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/Collator.idl b/offapi/com/sun/star/i18n/Collator.idl new file mode 100644 index 000000000..9917cd2f5 --- /dev/null +++ b/offapi/com/sun/star/i18n/Collator.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_i18n_Collator_idl__ +#define __com_sun_star_i18n_Collator_idl__ + +#include <com/sun/star/i18n/XCollator.idl> + + + module com { module sun { module star { module i18n { + + +/** + Access collation algorithms of different locales. + */ + +published service Collator : com::sun::star::i18n::XCollator; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/CollatorOptions.idl b/offapi/com/sun/star/i18n/CollatorOptions.idl new file mode 100644 index 000000000..50694c486 --- /dev/null +++ b/offapi/com/sun/star/i18n/CollatorOptions.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 XCollator 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/Currency.idl b/offapi/com/sun/star/i18n/Currency.idl new file mode 100644 index 000000000..8425173fd --- /dev/null +++ b/offapi/com/sun/star/i18n/Currency.idl @@ -0,0 +1,75 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 XLocaleData::getAllCurrencies(). + + @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 + #ID, 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 + FormatElement::formatIndex() 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/Currency2.idl b/offapi/com/sun/star/i18n/Currency2.idl new file mode 100644 index 000000000..68aba05ca --- /dev/null +++ b/offapi/com/sun/star/i18n/Currency2.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_Currency2_idl__ +#define __com_sun_star_i18n_Currency2_idl__ + +#include <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 XLocaleData2::getAllCurrencies2(). + + <p> It is derived from + ::com::sun::star::i18n::Currency 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/DirectionProperty.idl b/offapi/com/sun/star/i18n/DirectionProperty.idl new file mode 100644 index 000000000..61e2427fa --- /dev/null +++ b/offapi/com/sun/star/i18n/DirectionProperty.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XCharacterClassification::getCharacterDirection(). + */ + +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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/ForbiddenCharacters.idl b/offapi/com/sun/star/i18n/ForbiddenCharacters.idl new file mode 100644 index 000000000..5f0c100a7 --- /dev/null +++ b/offapi/com/sun/star/i18n/ForbiddenCharacters.idl @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XLocaleData::getForbiddenCharacters() and used with + XForbiddenCharacters 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/FormatElement.idl b/offapi/com/sun/star/i18n/FormatElement.idl new file mode 100644 index 000000000..b3c28b429 --- /dev/null +++ b/offapi/com/sun/star/i18n/FormatElement.idl @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XLocaleData::getAllFormats(). + + <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 KNumberFormatUsage values. */ + string formatUsage; + + /** The index used by the number formatter, predefined values + corresponding with NumberFormatIndex values. */ + short formatIndex; + + /** If a format code is the default code of a <em>formatType</em> + group. */ + boolean isDefault; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/Implementation.idl b/offapi/com/sun/star/i18n/Implementation.idl new file mode 100644 index 000000000..f5d8e284b --- /dev/null +++ b/offapi/com/sun/star/i18n/Implementation.idl @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XLocaleData::getCollatorImplementations(). + + @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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/IndexEntrySupplier.idl b/offapi/com/sun/star/i18n/IndexEntrySupplier.idl new file mode 100644 index 000000000..fa7814f6d --- /dev/null +++ b/offapi/com/sun/star/i18n/IndexEntrySupplier.idl @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_IndexEntrySupplier_idl__ +#define __com_sun_star_i18n_IndexEntrySupplier_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 : XExtendedIndexEntrySupplier; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/InputSequenceCheckMode.idl b/offapi/com/sun/star/i18n/InputSequenceCheckMode.idl new file mode 100644 index 000000000..09a809bf6 --- /dev/null +++ b/offapi/com/sun/star/i18n/InputSequenceCheckMode.idl @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + XInputSequenceChecker::checkInputSequence() + + @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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/InputSequenceChecker.idl b/offapi/com/sun/star/i18n/InputSequenceChecker.idl new file mode 100644 index 000000000..cb46e1624 --- /dev/null +++ b/offapi/com/sun/star/i18n/InputSequenceChecker.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_InputSequenceChecker_idl__ +#define __com_sun_star_i18n_InputSequenceChecker_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 : XExtendedInputSequenceChecker; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/KCharacterType.idl b/offapi/com/sun/star/i18n/KCharacterType.idl new file mode 100644 index 000000000..8f3df93f0 --- /dev/null +++ b/offapi/com/sun/star/i18n/KCharacterType.idl @@ -0,0 +1,69 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XCharacterClassification::getCharacterType() and + XCharacterClassification::getStringType() </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 UnicodeType::..._LETTER. + Note that a LETTER must not necessarily be ALPHA */ + const long LETTER = 0x00000080; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/KNumberFormatType.idl b/offapi/com/sun/star/i18n/KNumberFormatType.idl new file mode 100644 index 000000000..c1b0c1cec --- /dev/null +++ b/offapi/com/sun/star/i18n/KNumberFormatType.idl @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/KNumberFormatUsage.idl b/offapi/com/sun/star/i18n/KNumberFormatUsage.idl new file mode 100644 index 000000000..2af0bbdd5 --- /dev/null +++ b/offapi/com/sun/star/i18n/KNumberFormatUsage.idl @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/KParseTokens.idl b/offapi/com/sun/star/i18n/KParseTokens.idl new file mode 100644 index 000000000..accc42566 --- /dev/null +++ b/offapi/com/sun/star/i18n/KParseTokens.idl @@ -0,0 +1,191 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XCharacterClassification::parseAnyToken() and + XCharacterClassification::parsePredefinedToken(). + They are also set in the ParseResult::StartFlags + and ParseResult::ContFlags. </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 + ParseResult. */ + const long ASC_ANY_BUT_CONTROL = 0x00000400; + + /** Additional flag set in ParseResult::StartFlags + or ParseResult::ContFlags. 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, the + locale's group separator characters in numbers are accepted and + ignored/skipped. Else a group separator in a number ends the + current token. A leading group separator is never accepted. If + an accepted group separator was encountered in a number + (ParseResult::TokenType is KParseType::ASC_NUMBER or + KParseType::UNI_NUMBER) this bit is also set in + ParseResult::ContFlags. + + <p> <strong>NOTE:</strong> absence of this bit in + <em>nContCharFlags</em> changes the default behaviour that in + prior releases accepted numbers with group separators but lead + to unexpected results when parsing formula expressions where the + user entered a (wrong) separator that happened to be the group + separator instead of an intended decimal separator. Usually + inline numbers in a formula expression do not contain group + separators. + + @since LibreOffice 6.2 + */ + const long GROUP_SEPARATOR_IN_NUMBER = 0x08000000; + + /** 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 ParseResult::StartFlags + or ParseResult::ContFlags. 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 + CharacterClassification::parseAnyToken() and + CharacterClassification::parsePredefinedToken(), + ignored on <em>nContCharFlags</em> parameter. + <strong>Not</strong> set in ParseResult. */ + 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/KParseType.idl b/offapi/com/sun/star/i18n/KParseType.idl new file mode 100644 index 000000000..c679fb593 --- /dev/null +++ b/offapi/com/sun/star/i18n/KParseType.idl @@ -0,0 +1,83 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XCharacterClassification::parseAnyToken() and + XCharacterClassification::parsePredefinedToken() in + ParseResult::TokenType. </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 ParseResult::DequotedNameOrString ( na'me )." */ + const long SINGLE_QUOTE_NAME = 0x00000008; + + /** A double-quoted string ( "str\"i""ng" ). Dequoted string in + ParseResult::DequotedNameOrString ( str"i"ng ). */ + const long DOUBLE_QUOTE_STRING = 0x00000010; + + /** A number where all digits are ASCII characters. + Numerical value in ParseResult::Value. */ + const long ASC_NUMBER = 0x00000020; + + /** A number where at least some digits are Unicode (and maybe + ASCII) characters. Numerical value inKParseType + ParseResult::Value. */ + 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/LanguageCountryInfo.idl b/offapi/com/sun/star/i18n/LanguageCountryInfo.idl new file mode 100644 index 000000000..dd803674d --- /dev/null +++ b/offapi/com/sun/star/i18n/LanguageCountryInfo.idl @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + XLocaleData::getLanguageCountryInfo(). + + @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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/LineBreakHyphenationOptions.idl b/offapi/com/sun/star/i18n/LineBreakHyphenationOptions.idl new file mode 100644 index 000000000..2f4f832fa --- /dev/null +++ b/offapi/com/sun/star/i18n/LineBreakHyphenationOptions.idl @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_i18n_LineBreakHyphenationOptions_idl__ +#define __com_sun_star_i18n_LineBreakHyphenationOptions_idl__ + +#include <com/sun/star/linguistic2/XHyphenator.idl> + + +module com { module sun { module star { module i18n { + + +/** Hyphenation options passed in calls to XBreakIterator::getLineBreak(). + */ +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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/LineBreakResults.idl b/offapi/com/sun/star/i18n/LineBreakResults.idl new file mode 100644 index 000000000..c904efdee --- /dev/null +++ b/offapi/com/sun/star/i18n/LineBreakResults.idl @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_i18n_LineBreakResults_idl__ +#define __com_sun_star_i18n_LineBreakResults_idl__ + +#include <com/sun/star/linguistic2/XHyphenatedWord.idl> + + +module com { module sun { module star { module i18n { + + +/** Results of method XBreakIterator::getLineBreak(). + */ +published struct LineBreakResults +{ + /// Type of line break, see BreakType. + short breakType; + + /// Position of the calculated line break. + long breakIndex; + + /// Return value of the hyphenator. + ::com::sun::star::linguistic2::XHyphenatedWord rHyphenatedWord; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/LineBreakUserOptions.idl b/offapi/com/sun/star/i18n/LineBreakUserOptions.idl new file mode 100644 index 000000000..490baec77 --- /dev/null +++ b/offapi/com/sun/star/i18n/LineBreakUserOptions.idl @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 XBreakIterator::getLineBreak(). + */ +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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/LocaleCalendar.idl b/offapi/com/sun/star/i18n/LocaleCalendar.idl new file mode 100644 index 000000000..db4c3545a --- /dev/null +++ b/offapi/com/sun/star/i18n/LocaleCalendar.idl @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_LocaleCalendar_idl__ +#define __com_sun_star_i18n_LocaleCalendar_idl__ + +#include <com/sun/star/i18n/XCalendar3.idl> + + +module com { module sun { module star { module i18n { + + +/// Access a locale specific calendar. +published service LocaleCalendar : XCalendar3; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/LocaleCalendar2.idl b/offapi/com/sun/star/i18n/LocaleCalendar2.idl new file mode 100644 index 000000000..79bc8f7e4 --- /dev/null +++ b/offapi/com/sun/star/i18n/LocaleCalendar2.idl @@ -0,0 +1,27 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_i18n_LocaleCalendar2_idl__ +#define __com_sun_star_i18n_LocaleCalendar2_idl__ + +#include <com/sun/star/i18n/XCalendar4.idl> + +module com { module sun { module star { module i18n { + +/** Access a locale specific calendar. + + @since LibreOffice 5.0 + */ +service LocaleCalendar2 : XCalendar4; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/LocaleData.idl b/offapi/com/sun/star/i18n/LocaleData.idl new file mode 100644 index 000000000..ad0dd283a --- /dev/null +++ b/offapi/com/sun/star/i18n/LocaleData.idl @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_LocaleData_idl__ +#define __com_sun_star_i18n_LocaleData_idl__ + +#include <com/sun/star/i18n/XLocaleData4.idl> + + +module com { module sun { module star { module i18n { + + +/// Access locale specific data. +published service LocaleData : com::sun::star::i18n::XLocaleData4; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/LocaleData2.idl b/offapi/com/sun/star/i18n/LocaleData2.idl new file mode 100644 index 000000000..7fe53bb09 --- /dev/null +++ b/offapi/com/sun/star/i18n/LocaleData2.idl @@ -0,0 +1,29 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_i18n_LocaleData2_idl__ +#define __com_sun_star_i18n_LocaleData2_idl__ + +#include <com/sun/star/i18n/XLocaleData5.idl> + +module com { module sun { module star { module i18n { + +/** Access locale specific data. + + Supersedes service com::sun::star::i18n::LocaleData + + @since LibreOffice 6.0 + */ +service LocaleData2 : XLocaleData5; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/offapi/com/sun/star/i18n/LocaleDataItem.idl b/offapi/com/sun/star/i18n/LocaleDataItem.idl new file mode 100644 index 000000000..07899b5d6 --- /dev/null +++ b/offapi/com/sun/star/i18n/LocaleDataItem.idl @@ -0,0 +1,77 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/LocaleDataItem2.idl b/offapi/com/sun/star/i18n/LocaleDataItem2.idl new file mode 100644 index 000000000..f2565213f --- /dev/null +++ b/offapi/com/sun/star/i18n/LocaleDataItem2.idl @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_i18n_LocaleDataItem2_idl__ +#define __com_sun_star_i18n_LocaleDataItem2_idl__ + +#include <com/sun/star/i18n/LocaleDataItem.idl> + +module com { module sun { module star { module i18n { + +/** + Locale specific data, derived from LocaleDataItem adding an + alternative input decimal separator. + + @since LibreOffice 6.0 + */ + +struct LocaleDataItem2 : LocaleDataItem +{ + /** Alternative input decimal separator, for example, <b>"."</b> if + the regular locale dependent separator usually is not present on + keyboards used with that locale. + + <p> This separator is optional, an empty string denotes no + alternative decimal separator shall be used. + */ + string decimalSeparatorAlternative; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/offapi/com/sun/star/i18n/LocaleItem.idl b/offapi/com/sun/star/i18n/LocaleItem.idl new file mode 100644 index 000000000..6c3af39f9 --- /dev/null +++ b/offapi/com/sun/star/i18n/LocaleItem.idl @@ -0,0 +1,97 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 LocaleDataItem 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; + + /// count of items available + const short COUNT = 17; + + /// @see com::sun::star::i18n::LocaleDataItem2::decimalSeparatorAlternative + const short DECIMAL_SEPARATOR_ALTERNATIVE = 17; + + /// count of items available + const short COUNT2 = 18; + + //! New values may be appended here if locale data provides them. + //! Do not forget to introduce a new COUNTx value. +}; + + + +}; }; }; }; + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/Months.idl b/offapi/com/sun/star/i18n/Months.idl new file mode 100644 index 000000000..af6a50243 --- /dev/null +++ b/offapi/com/sun/star/i18n/Months.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 XCalendar::getDisplayName(). + */ + +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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/MultipleCharsOutputException.idl b/offapi/com/sun/star/i18n/MultipleCharsOutputException.idl new file mode 100644 index 000000000..7bd6293d4 --- /dev/null +++ b/offapi/com/sun/star/i18n/MultipleCharsOutputException.idl @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_MultipleCharsOutputException_idl__ +#define __com_sun_star_i18n_MultipleCharsOutputException_idl__ + +#include <com/sun/star/uno/Exception.idl> + + +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 + XExtendedTransliteration::transliterateChar2Char() + </p> + + @since OOo 1.1.2 + */ +published exception MultipleCharsOutputException : ::com::sun::star::uno::Exception +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/NativeNumberMode.idl b/offapi/com/sun/star/i18n/NativeNumberMode.idl new file mode 100644 index 000000000..8fbf058f3 --- /dev/null +++ b/offapi/com/sun/star/i18n/NativeNumberMode.idl @@ -0,0 +1,161 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + XExtendedCalendar::getDisplayString() and the + XNativeNumberSupplier methods. + + <p> The constants have different meanings if used with different + locales. However, NATNUM1 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/> + Hebrew: Hebrew characters <br/> + Arabic: Arabic-Indic characters <br/> + Thai: Thai characters <br/> + Hindi: Indic-Devanagari characters <br/> + Odia: Odia (Oriya) characters<br/> + Marathi: Indic-Devanagari characters<br/> + Bengali: Bengali characters<br/> + Punjabi: Punjabi (Gurmukhi) characters<br/> + Gujarati: Gujarati characters<br/> + Tamil: Tamil characters<br/> + Telugu: Telugu characters<br/> + Kannada: Kannada characters<br/> + Malayalam: Malayalam characters<br/> + Lao: Lao characters<br/> + Tibetan: Tibetan characters<br/> + Burmese: Burmese (Myanmar) characters<br/> + Khmer: Khmer (Cambodian) characters<br/> + Mongolian: Mongolian characters<br/> + Nepali: Indic-Devanagari characters<br/> + Dzongkha: Tibetan characters<br/> + Farsi: East Arabic-Indic characters<br/> + Church Slavic: Cyrillic 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] <br/> + Hebrew: Hebrew numbering + */ + 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; + + /** Transliteration to cardinal number names (one, two, three, ...), + ordinal number names (first, second, third, ...), + ordinal indicators (1st, 2nd, 3rd, ...), etc. + Uses NatNum params string + */ + const short NATNUM12 = 12; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/NativeNumberSupplier.idl b/offapi/com/sun/star/i18n/NativeNumberSupplier.idl new file mode 100644 index 000000000..47cdcbcfa --- /dev/null +++ b/offapi/com/sun/star/i18n/NativeNumberSupplier.idl @@ -0,0 +1,39 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_NativeNumberSupplier_idl__ +#define __com_sun_star_i18n_NativeNumberSupplier_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 : com::sun::star::i18n::XNativeNumberSupplier; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/NativeNumberSupplier2.idl b/offapi/com/sun/star/i18n/NativeNumberSupplier2.idl new file mode 100644 index 000000000..721c1642a --- /dev/null +++ b/offapi/com/sun/star/i18n/NativeNumberSupplier2.idl @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_NativeNumberSupplier2_idl__ +#define __com_sun_star_i18n_NativeNumberSupplier2_idl__ + +#include <com/sun/star/i18n/XNativeNumberSupplier2.idl> + + +module com { module sun { module star { module i18n { + + +/** Supplier for transliteration of numerals (native number strings). + + @since LibreOffice 6.1 + + @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 LibreOffice core. +*/ +service NativeNumberSupplier2 : com::sun::star::i18n::XNativeNumberSupplier2; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/NativeNumberXmlAttributes.idl b/offapi/com/sun/star/i18n/NativeNumberXmlAttributes.idl new file mode 100644 index 000000000..9dc28e0ed --- /dev/null +++ b/offapi/com/sun/star/i18n/NativeNumberXmlAttributes.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + XNativeNumberSupplier::convertToXmlAttributes() and + XNativeNumberSupplier::convertFromXmlAttributes() + </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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/NativeNumberXmlAttributes2.idl b/offapi/com/sun/star/i18n/NativeNumberXmlAttributes2.idl new file mode 100644 index 000000000..d8c8fb225 --- /dev/null +++ b/offapi/com/sun/star/i18n/NativeNumberXmlAttributes2.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_NativeNumberXmlAttributes_idl__ +#define __com_sun_star_i18n_NativeNumberXmlAttributes_idl__ + +#include <com/sun/star/i18n/NativeNumberXmlAttributes.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 later with + XNativeNumberSupplier2::convertToXmlAttributes() and + XNativeNumberSupplier2::convertFromXmlAttributes() + </p> + + @since LibreOffice 6.1 + + @internal + + ATTENTION: This struct 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 LibreOffice core. + */ + +struct NativeNumberXmlAttributes2 : com::sun::star::i18n::NativeNumberXmlAttributes +{ + /** The format of the number string, for example, "cardinal", + "ordinal" or "ordinal-number". */ + string Spellout; + +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/NumberFormatCode.idl b/offapi/com/sun/star/i18n/NumberFormatCode.idl new file mode 100644 index 000000000..594c7dc4c --- /dev/null +++ b/offapi/com/sun/star/i18n/NumberFormatCode.idl @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XNumberFormatCode methods. + */ + +published struct NumberFormatCode +{ + /// One of KNumberFormatType values. + short Type; + /// One of KNumberFormatUsage 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 NumberFormatIndex. + short Index; + /// If this format is the default format of the <em>Usage</em> group. + boolean Default; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/NumberFormatIndex.idl b/offapi/com/sun/star/i18n/NumberFormatIndex.idl new file mode 100644 index 000000000..f99454439 --- /dev/null +++ b/offapi/com/sun/star/i18n/NumberFormatIndex.idl @@ -0,0 +1,275 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + XNumberFormatCode::getFormatCode() + or + ::com::sun::star::util::XNumberFormatTypes::getFormatIndex(). + + <p> Each locale can support up to about 5000 arbitrary format + codes. But for backward compatibility 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 FormatElement::formatIndex()). + + 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 (Deutsches Institut für Normung, formerly Deutsche Industrie-Norm) </li> + <li> EN 28601 (European Norm) </li> + <li> ISO 8601 (International Standards Organization) </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 <br/> formatindex="0" + const short NUMBER_STANDARD = NUMBER_START; + /// 0 <br/>Integer number <br/> formatindex="1" + const short NUMBER_INT = NUMBER_START+1; + /// 0.00 <br/>Decimal number with 2 decimals <br/> formatindex="2" + const short NUMBER_DEC2 = NUMBER_START+2; + /// #,##0 <br/>Integer number with group separator <br/> formatindex="3" + const short NUMBER_1000INT = NUMBER_START+3; + /// #,##0.00 <br/>Decimal number with group separator <br/> formatindex="4" + const short NUMBER_1000DEC2 = NUMBER_START+4; + /// #,##0.00 <br/> In SO5/Win this format was retrieved from the Regional Settings <br/> formatindex="5" + 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 <br/> formatindex="6" + const short SCIENTIFIC_000E000 = SCIENTIFIC_START; + /// 0.00E+00 <br/>Number in scientific notation with exponent in 2 digit placeholders <br/> formatindex="7" + 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 <br/> formatindex="8" + const short PERCENT_INT = PERCENT_START; + /// 0.00% <br/>Percentage format, rounded to 2 decimals <br/> formatindex="9" + 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 <br/> formatindex="10" + const short FRACTION_1 = FRACTION_START; + /// # ??/?? <br/>Number with decimal in fraction in 2 digit placeholders <br/> formatindex="11" + 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 <br/> formatindex="12" + const short CURRENCY_1000INT = CURRENCY_START; + /// #,##0.00 DM <br/>Decimal currency format with group separator <br/> formatindex="13" + const short CURRENCY_1000DEC2 = CURRENCY_START+1; + /// #,##0 DM <br/>Integer currency format with negative in red <br/> formatindex="14" + const short CURRENCY_1000INT_RED = CURRENCY_START+2; + /// #,##0.00 DM <br/>Decimal currency format with negative in red <br/> formatindex="15" + const short CURRENCY_1000DEC2_RED = CURRENCY_START+3; + /// #,##0.00 DEM <br/>Currency in ISO-4217 abbreviation format <br/> formatindex="16" + const short CURRENCY_1000DEC2_CCC = CURRENCY_START+4; + /// #,##0.-- DM <br/>Currency format with dash representing 0 in decimals <br/> formatindex="17" + 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> <br/> formatindex="18" + const short DATE_SYSTEM_SHORT = DATE_START; + /** Wednesday, 8. October 1997 <br/> see also DATE_SYSTEM_... <a href="#SYSTEM">explanation</a> + <br/> formatindex="19" */ + const short DATE_SYSTEM_LONG = DATE_START+1; + /// 08.10.97 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a> <br/> formatindex="20" + 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. + <br/> formatindex="21" */ + const short DATE_SYS_DDMMYYYY = DATE_START+3; + /// 8. Oct 97 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a> <br/> formatindex="22" + const short DATE_SYS_DMMMYY = DATE_START+4; + /// 8. Oct 1997 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a> <br/> formatindex="23" + const short DATE_SYS_DMMMYYYY = DATE_START+5; + /// 8. Oct. 1997 <br/> DIN/EN <br/> formatindex="24" + const short DATE_DIN_DMMMYYYY = DATE_START+6; + /// 8. October 1997 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a> <br/> formatindex="25" + const short DATE_SYS_DMMMMYYYY = DATE_START+7; + /// 8. October 1997 <br/> DIN/EN <br/> formatindex="26" + const short DATE_DIN_DMMMMYYYY = DATE_START+8; + /// Wed, 8. Oct 97 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a> <br/> formatindex="27" + const short DATE_SYS_NNDMMMYY = DATE_START+9; + /// Wed 08.Oct 97 <br/> see also DATE_DEF_... <a href="#DEF">explanation</a> <br/> formatindex="28" + const short DATE_DEF_NNDDMMMYY = DATE_START+10; + /// Wed, 8. October 1997 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a> <br/> formatindex="29" + const short DATE_SYS_NNDMMMMYYYY = DATE_START+11; + /// Wednesday, 8. October 1997 <br/> formatindex="30" + const short DATE_SYS_NNNNDMMMMYYYY = DATE_START+12; + /// 10-08 <br/> DIN/EN <br/> formatindex="31" + const short DATE_DIN_MMDD = DATE_START+13; + /// 97-10-08 <br/> DIN/EN <br/> formatindex="32" + const short DATE_DIN_YYMMDD = DATE_START+14; + /// 1997-10-08 <br/> DIN/EN/ISO <br/> formatindex="33" + const short DATE_DIN_YYYYMMDD = DATE_START+15; + /// 10.97 <br/> see also DATE_SYS_... <a href="#SYS">explanation</a> <br/> formatindex="34" + const short DATE_SYS_MMYY = DATE_START+16; + /// 08.Oct <br/> see also DATE_SYS_... <a href="#SYS">explanation</a> <br/> formatindex="35" + const short DATE_SYS_DDMMM = DATE_START+17; + /// October <br/> formatindex="36" + const short DATE_MMMM = DATE_START+18; + /// 4th quarter 97 <br/> formatindex="37" + const short DATE_QQJJ = DATE_START+19; + /// week of year <br/> formatindex="38" + 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 <br/> formatindex="39" + const short TIME_HHMM = TIME_START; + /// HH:MM:SS <br/>Time format with hour, minute and second <br/> formatindex="40" + const short TIME_HHMMSS = TIME_START+1; + /// HH:MM AM/PM <br/>Time format with hour, minute and morning/afternoon notation <br/> formatindex="41" + const short TIME_HHMMAMPM = TIME_START+2; + /// HH:MM:SS AM/PM <br/>Time format with hour, minute, second and morning/afternoon notation <br/> formatindex="42" + const short TIME_HHMMSSAMPM = TIME_START+3; + /// [HH]:MM:SS <br/>Time format with amount of hours <br/> formatindex="43" + const short TIME_HH_MMSS = TIME_START+4; + /// MM:SS,00 <br/>Time format with second in fraction <br/> formatindex="44" + const short TIME_MMSS00 = TIME_START+5; + /// [HH]:MM:SS,00 <br/>Time format with amount of hours and seconds with fraction <br/> formatindex="45" + 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 <br/> formatindex="46" + 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. + <br/> formatindex="47" */ + 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 com::sun::star::util::XNumberFormatTypes::getFormatIndex() + instead of XNumberFormatCode::getFormatCode(). + <br/> reserved formatindex="48" + */ + 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 com::sun::star::util::XNumberFormatTypes::getFormatIndex() + instead of XNumberFormatCode::getFormatCode() + <br/> reserved formatindex="49" + */ + const short TEXT = BOOLEAN+1; + + /// count of built-in format codes. + const short INDEX_TABLE_ENTRIES = TEXT+1; +}; + + +}; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/NumberFormatMapper.idl b/offapi/com/sun/star/i18n/NumberFormatMapper.idl new file mode 100644 index 000000000..4e7325a84 --- /dev/null +++ b/offapi/com/sun/star/i18n/NumberFormatMapper.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_NumberFormatMapper_idl__ +#define __com_sun_star_i18n_NumberFormatMapper_idl__ + +#include <com/sun/star/i18n/XNumberFormatCode.idl> + + +module com { module sun { module star { module i18n { + + +/** Access locale data number format codes to use with the + number formatter +*/ + +published service NumberFormatMapper : com::sun::star::i18n::XNumberFormatCode; + +}; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/OrdinalSuffix.idl b/offapi/com/sun/star/i18n/OrdinalSuffix.idl new file mode 100644 index 000000000..6f629cb31 --- /dev/null +++ b/offapi/com/sun/star/i18n/OrdinalSuffix.idl @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_OrdinalSuffix_idl__ +#define __com_sun_star_i18n_OrdinalSuffix_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 OOo 2.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 : com::sun::star::i18n::XOrdinalSuffix; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/ParseResult.idl b/offapi/com/sun/star/i18n/ParseResult.idl new file mode 100644 index 000000000..22b2ccb70 --- /dev/null +++ b/offapi/com/sun/star/i18n/ParseResult.idl @@ -0,0 +1,74 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XCharacterClassification::parseAnyToken() and + XCharacterClassification::parsePredefinedToken(). + */ + +published struct ParseResult +{ + /** Count of ignored leading whitespace, in UTF-16 code units, not + Unicode code points. */ + long LeadingWhiteSpace; + + /** UTF-16 code unit index of first unprocessed character. */ + long EndPos; + + /** Number of code points (not UTF-16 code units) of the parsed token, + not including leading whitespace. */ + long CharLen; + + /** Value of token in case of numeric. */ + double Value; + + /** KParseType token type like + KParseType::IDENTNAME. */ + long TokenType; + + /** KParseTokens flags of first character of actual + token matched. If <em>TokenType</em> is a + KParseType::SINGLE_QUOTE_NAME or a + KParseType::DOUBLE_QUOTE_STRING the first + character is the first character inside the quotes, not the + quote itself. */ + long StartFlags; + + /** KParseTokens 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/ScriptDirection.idl b/offapi/com/sun/star/i18n/ScriptDirection.idl new file mode 100644 index 000000000..958f87a3c --- /dev/null +++ b/offapi/com/sun/star/i18n/ScriptDirection.idl @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + XScriptTypeDetector 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/ScriptType.idl b/offapi/com/sun/star/i18n/ScriptType.idl new file mode 100644 index 000000000..6b9bba1d6 --- /dev/null +++ b/offapi/com/sun/star/i18n/ScriptType.idl @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 XBreakIterator::beginOfScript(), + XBreakIterator::endOfScript(), + XBreakIterator::nextScript(), + XBreakIterator::previousScript() </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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/TextConversion.idl b/offapi/com/sun/star/i18n/TextConversion.idl new file mode 100644 index 000000000..312dd7071 --- /dev/null +++ b/offapi/com/sun/star/i18n/TextConversion.idl @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_i18n_TextConversion_idl__ +#define __com_sun_star_i18n_TextConversion_idl__ + +#include <com/sun/star/i18n/XExtendedTextConversion.idl> + + +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 instantiated. + + @since OOo 1.1.2 +*/ +published service TextConversion : XExtendedTextConversion; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/TextConversionOption.idl b/offapi/com/sun/star/i18n/TextConversionOption.idl new file mode 100644 index 000000000..29f446cf6 --- /dev/null +++ b/offapi/com/sun/star/i18n/TextConversionOption.idl @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 XTextConversion. + + <p>These text conversion options are usually selected by end users. + The options can be combined and may be related to + TextConversionType. </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 Traditional Chinese conversion + + @since OOo 2.0 + */ + const long USE_CHARACTER_VARIANTS = 2; // (1 << 1) +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/TextConversionResult.idl b/offapi/com/sun/star/i18n/TextConversionResult.idl new file mode 100644 index 000000000..9df551b9a --- /dev/null +++ b/offapi/com/sun/star/i18n/TextConversionResult.idl @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_TextConversionResult_idl__ +#define __com_sun_star_i18n_TextConversionResult_idl__ + + +#include <com/sun/star/i18n/Boundary.idl> + + + +module com { module sun { module star { module i18n { + + +/** Text conversion result to be used with XTextConversion. + + @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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/TextConversionType.idl b/offapi/com/sun/star/i18n/TextConversionType.idl new file mode 100644 index 000000000..128256862 --- /dev/null +++ b/offapi/com/sun/star/i18n/TextConversionType.idl @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_TextConversionType_idl__ +#define __com_sun_star_i18n_TextConversionType_idl__ + + + +module com { module sun { module star { module i18n { + + +/** These constants specify the conversion type to be used with + XTextConversion. + + @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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/Transliteration.idl b/offapi/com/sun/star/i18n/Transliteration.idl new file mode 100644 index 000000000..7e598f617 --- /dev/null +++ b/offapi/com/sun/star/i18n/Transliteration.idl @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_Transliteration_idl__ +#define __com_sun_star_i18n_Transliteration_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 : XExtendedTransliteration; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/TransliterationModules.idl b/offapi/com/sun/star/i18n/TransliterationModules.idl new file mode 100644 index 000000000..31936cb75 --- /dev/null +++ b/offapi/com/sun/star/i18n/TransliterationModules.idl @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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. + + <p> Use with XTransliteration::loadModule() and + com::sun::star::util::SearchOptions::transliterateFlags() </p> + + <p> Note that values >=0x100 are logically or'ed with other values! </p> + */ + +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 Hiragana 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 + /// 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl b/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl new file mode 100644 index 000000000..baaa14c13 --- /dev/null +++ b/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl @@ -0,0 +1,73 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XTransliteration::loadModule() + + The values used in this group need to be different from the ones in + TransliterationModules and TransliterationModulesNew! + */ + + +// 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; + + /** Ignore diacritics. Despite the _CTL name suffix this is not only + about CTL/Arabic diacritic characters, though these are handled + as well, but the transliteration decomposes and removes any + diacritic from characters. + + Because we cannot extend the TransliterationModules enum we use + TransliterationModulesExtra and it will act the same way. + */ + const long IGNORE_DIACRITICS_CTL = 0x40000000; + + /** Ignore Kashida mark. */ + const long IGNORE_KASHIDA_CTL = 0x00000800; + + const long END_OF_MODULE = 0; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/TransliterationModulesNew.idl b/offapi/com/sun/star/i18n/TransliterationModulesNew.idl new file mode 100644 index 000000000..7e1769790 --- /dev/null +++ b/offapi/com/sun/star/i18n/TransliterationModulesNew.idl @@ -0,0 +1,166 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XTransliteration::loadModuleNew() + */ + +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 Hiragana 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 (spellout) to ASCII number string + TextToNumLower_zh_CN = 47, + /// Transliterate a Simplified Chinese upper case number string (spellout) to ASCII number string + TextToNumUpper_zh_CN = 48, + /// Transliterate a Traditional Chinese lower case number string (spellout) to ASCII number string + TextToNumLower_zh_TW = 49, + /// Transliterate a Traditional Chinese upper case number string (spellout) to ASCII number string + TextToNumUpper_zh_TW = 50, + /// Transliterate a Korean formal Hangul number string (spellout) to ASCII number string + TextToNumFormalHangul_ko = 51, + /// Transliterate a Korean formal Hanja lower case number string (spellout) to ASCII number string + TextToNumFormalLower_ko = 52, + /// Transliterate a Korean formal Hanja upper case number string (spellout) to ASCII number string + TextToNumFormalUpper_ko = 53, + /// Transliterate a Korean informal Hangul number string (spellout) to ASCII number string + TextToNumInformalHangul_ko = 54, + /// Transliterate a Korean informal Hanja lower case number string (spellout) to ASCII number string + TextToNumInformalLower_ko = 55, + /// Transliterate a Korean informal Hanja upper case number string (spellout) 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/TransliterationType.idl b/offapi/com/sun/star/i18n/TransliterationType.idl new file mode 100644 index 000000000..a6bc47c2e --- /dev/null +++ b/offapi/com/sun/star/i18n/TransliterationType.idl @@ -0,0 +1,72 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XTransliteration::getType() and + XTransliteration::getAvailableModules() methods. + + <p> Non-IGNORE type modules provide + XTransliteration::transliterate(). <br/> + IGNORE type modules provide + XTransliteration::equals() and + XTransliteration::transliterateRange(). </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 + transliterates 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 transliteration 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/UnicodeScript.idl b/offapi/com/sun/star/i18n/UnicodeScript.idl new file mode 100644 index 000000000..61d11ab82 --- /dev/null +++ b/offapi/com/sun/star/i18n/UnicodeScript.idl @@ -0,0 +1,127 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XCharacterClassification::getScript() + */ + +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, + kCJKUnifiedIdeographsExtensionA, + kCJKUnifiedIdeograph, + kYiSyllables, + kYiRadicals, + kHangulSyllable, + kHighSurrogate, + kHighPrivateUseSurrogate, + kLowSurrogate, + kPrivateUse, + kCJKCompatibilityIdeograph, + kAlphabeticPresentation, + kArabicPresentationA, + kCombiningHalfMark, + kCJKCompatibilityForm, + kSmallFormVariant, + kArabicPresentationB, + kNoScript, + kHalfwidthFullwidthForm, + kScriptCount +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/UnicodeType.idl b/offapi/com/sun/star/i18n/UnicodeType.idl new file mode 100644 index 000000000..7d5d08de2 --- /dev/null +++ b/offapi/com/sun/star/i18n/UnicodeType.idl @@ -0,0 +1,70 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XCharacterClassification::getType() + */ + +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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/Weekdays.idl b/offapi/com/sun/star/i18n/Weekdays.idl new file mode 100644 index 000000000..3599b71c7 --- /dev/null +++ b/offapi/com/sun/star/i18n/Weekdays.idl @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 XCalendar::getFirstDayOfWeek(), + XCalendar::setFirstDayOfWeek() and + XCalendar::getDisplayName() </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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/WordType.idl b/offapi/com/sun/star/i18n/WordType.idl new file mode 100644 index 000000000..5bba2312d --- /dev/null +++ b/offapi/com/sun/star/i18n/WordType.idl @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 XBreakIterator::nextWord(), + XBreakIterator::previousWord(), + XBreakIterator::getWordBoundary(), + XBreakIterator::getWordType(), + XBreakIterator::isBeginWord(), + XBreakIterator::isEndWord() </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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XBreakIterator.idl b/offapi/com/sun/star/i18n/XBreakIterator.idl new file mode 100644 index 000000000..f4536b33e --- /dev/null +++ b/offapi/com/sun/star/i18n/XBreakIterator.idl @@ -0,0 +1,487 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_i18n_XBreakIterator_idl__ +#define __com_sun_star_i18n_XBreakIterator_idl__ + +#include <com/sun/star/lang/Locale.idl> +#include <com/sun/star/i18n/LineBreakUserOptions.idl> +#include <com/sun/star/i18n/LineBreakHyphenationOptions.idl> +#include <com/sun/star/i18n/LineBreakResults.idl> +#include <com/sun/star/i18n/Boundary.idl> + + +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. + CharacterIteratorMode can be cell based or + character based. A cell is made of more than one character. + + @param aText + The input text. + + @param nStartPos + The start index in aText. + + @param aLocale + The locale of the character preceding <em>nStartPos</em>. + + @param nCharacterIteratorMode + A constant from CharacterIteratorMode + + @param nCount + Number of characters to traverse, it should not be less than 0. + If you want to traverse in the opposite direction use + XBreakIterator::previousCharacters() instead. + + @param nDone + Out parameter to receive the number of cells/Unicode characters + traversed. + */ + 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. + CharacterIteratorMode can be cell based or + character based. A cell is made of more than one character. + + @param aText + The input text. + + @param nStartPos + The start index in aText. + + @param aLocale + The locale of the character preceding <em>nStartPos</em>. + + @param nCharacterIteratorMode + A constant from CharacterIteratorMode + + @param nCount + Number of characters to traverse, it should not be less than 0. + If you want to traverse in the opposite direction use + XBreakIterator::nextCharacters() instead. + + @param nDone + Out parameter to receive the number of cells/Unicode characters + traversed. + + */ + 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 aText + The input text. + + @param nStartPos + The start index in aText. + + @param aLocale + The locale of the character preceding <em>nStartPos</em>. + + @param nWordType + One of WordType, specifies the type of + traveling. + + @returns + The Boundary 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 aText + The input text. + + @param nStartPos + The start index in aText. + + @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 + Boundary::endPos() and the position after the + Asian character (i.e. the space character) in + Boundary::startPos(). 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 WordType, specifies the type of + traveling. + + @returns + The Boundary 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 aText + The input text. + + @param nPos + The start index in aText. + + @param aLocale + The locale of the character preceding <em>nStartPos</em>. + + @param nWordType + One of WordType. + + @param bPreferForward + If `TRUE`, nPos should be considered the start of the next + word and search proceeds forwards. + If `FALSE`, nPos should be considered the end of the + current word, and search proceeds backwards. + + @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 WordType of the word that starts at + position <em>nPos</em>. + + <p> This method is mis-defined, since WordType + is not an attribute of a word, but a way to break words, + like excluding or including tail spaces for spell checker + 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. + + @param aText + The input text. + + @param nStartPos + The start index in aText. + + @param aLocale + The locale of the character preceding <em>nStartPos</em>. + + @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. + + @param aText + The input text. + + @param nStartPos + The start index in aText. + + @param aLocale + The locale of the character preceding <em>nStartPos</em>. + + @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 aText + The input text. + + @param nStartPos + The start index in aText. + + @param aLocale + The locale of the character preceding <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 + LineBreakResults 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 LineBreakResults contain the break + position of the line, BreakType and + com::sun::star::linguistic2::XHyphenatedWord + */ + 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 aText + The input text. + + @param nStartPos + The start index in aText. + + @param nScriptType + One of ScriptType. + + @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 aText + The input text. + + @param nStartPos + The start index in aText. + + @param nScriptType + One of ScriptType. + + @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 aText + The input text. + + @param nStartPos + The start index in aText. + + @param nScriptType + One of ScriptType. + + @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 aText + The input text. + + @param nStartPos + The start index in aText. + + @param nScriptType + One of ScriptType. + + @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>. + + @param aText + The input text. + + @param nPos + The index in aText. + + @returns + One of ScriptType. + */ + short getScriptType( [in] string aText, [in] long nPos); + + /** Traverses in Text from <em>nStartPos</em> to the beginning of + the specified character type. + + @param aText + The input text. + + @param nStartPos + The start index in aText. + + @param aLocale + The locale of the character preceding <em>nStartPos</em>. + + @param nCharType + One of CharType + + @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 aText + The input text. + + @param nStartPos + The start index in aText. + + @param aLocale + The locale of the character preceding <em>nStartPos</em>. + + @param nCharType + One of CharType + + @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 aText + The input text. + + @param nStartPos + The start index in aText. + + @param aLocale + The locale of the character preceding <em>nStartPos</em>. + + @param nCharType + One of CharType + + @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 aText + The input text. + + @param nStartPos + The start index in aText. + + @param aLocale + The locale of the character preceding <em>nStartPos</em>. + + @param nCharType + One of CharType + + @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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XCalendar.idl b/offapi/com/sun/star/i18n/XCalendar.idl new file mode 100644 index 000000000..fd89a5273 --- /dev/null +++ b/offapi/com/sun/star/i18n/XCalendar.idl @@ -0,0 +1,211 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 Calendar. + 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 UTC 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 UTC 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 CalendarFieldIndex 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 CalendarFieldIndex values. + */ + short getValue( [in] short nCalendarFieldIndex ); + + /** + Verify if the date fields set by a combination of + XCalendar::setValue() 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 CalendarFieldIndex values. + + @param nAmount + The amount to add. + */ + void addValue( [in] short nCalendarFieldIndex, [in] long nAmount ); + + /** returns the first day of a week, one of Weekdays + values. + */ + short getFirstDayOfWeek(); + + /** Set the first day of a week, one of Weekdays + 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 CalendarItem describing the + month names. + */ + sequence< CalendarItem > getMonths(); + + /** returns a sequence of CalendarItem describing the + day names. + */ + sequence< CalendarItem > getDays(); + + /** + Returns a string (name to display) matching the given parameters. + + @param nCalendarDisplayIndex + One of CalendarDisplayIndex values + + @param nIdx + A value matching the <em>nCalendarDisplayIndex</em> type: + <dl> + <dt>CalendarDisplayIndex::AM_PM</dt> + <dd>one of AmPmValue</dd> + <dt>CalendarDisplayIndex::DAY</dt> + <dd>one of Weekdays or a number used as + an offset into the corresponding + Calendar::Days sequence</dd> + <dt>CalendarDisplayIndex::MONTH</dt> + <dd>one of Months or a number used as + an offset into the corresponding + Calendar::Months sequence</dd> + <dt>CalendarDisplayIndex::YEAR</dt> + <dd>not used, empty string returned</dd> + <dt>CalendarDisplayIndex::ERA</dt> + <dd>a number used as an offset into the + corresponding Calendar:Eras + sequence</dd> + <dt>CalendarDisplayIndex::GENITIVE_MONTH</dt> + <dd>a number used as an offset into the + corresponding Calendar2:GenitiveMonth + sequence</dd> + </dl> + + <p> The value should be obtained by a previous call to + XCalendar::getValue() with an appropriate + CalendarFieldIndex argument. </p> + + @param nNameType + A value indicating whether to return the abbreviated or the + full name, or the narrow name for some + CalendarDisplayIndex values. + <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> + <dt> 2 </dt> + <dd>narrow name, e.g. <b>"J"</b> <br> + Valid only for CalendarDisplayIndex::DAY, + CalendarDisplayIndex::MONTH and + CalendarDisplayIndex::GENITIVE_MONTH <br> + @since LibreOffice 3.5 + </dd> + + <p> This parameter is not used if the + <em>nCalendarDisplayIndex</em> argument equals + CalendarDisplayIndex::AM_PM </p> + */ + + string getDisplayName( [in] short nCalendarDisplayIndex, + [in] short nIdx, + [in] short nNameType ); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XCalendar3.idl b/offapi/com/sun/star/i18n/XCalendar3.idl new file mode 100644 index 000000000..16d5df5e7 --- /dev/null +++ b/offapi/com/sun/star/i18n/XCalendar3.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_i18n_XCalendar3_idl__ +#define __com_sun_star_i18n_XCalendar3_idl__ + +#include <com/sun/star/i18n/XExtendedCalendar.idl> +#include <com/sun/star/i18n/Calendar2.idl> + + +module com { module sun { module star { module i18n { + + + +/** + This interface provides access to locale specific calendar + systems. + + <p> It is derived from + ::com::sun::star::i18n::XExtendedCalendar and + provides additional methods to obtain Calendar2 items + that include the possessive genitive case month names and sequences + of CalendarItem2 items... </p> + + @since LibreOffice 3.5 + */ +published interface XCalendar3 : com::sun::star::i18n::XExtendedCalendar +{ + /// Get the currently loaded Calendar2. + Calendar2 getLoadedCalendar2(); + + /** returns a sequence of CalendarItem2 describing the + day names. + */ + sequence< CalendarItem2 > getDays2(); + + /** returns a sequence of CalendarItem2 describing the + month names. + */ + sequence< CalendarItem2 > getMonths2(); + + /** returns a sequence of CalendarItem2 describing the + genitive case month names. + */ + sequence< CalendarItem2 > getGenitiveMonths2(); + + /** returns a sequence of CalendarItem2 describing the + partitive case month names. + */ + sequence< CalendarItem2 > getPartitiveMonths2(); + +}; + +}; }; }; }; + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XCalendar4.idl b/offapi/com/sun/star/i18n/XCalendar4.idl new file mode 100644 index 000000000..7243cea65 --- /dev/null +++ b/offapi/com/sun/star/i18n/XCalendar4.idl @@ -0,0 +1,91 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_i18n_XCalendar4_idl__ +#define __com_sun_star_i18n_XCalendar4_idl__ + +#include <com/sun/star/i18n/Calendar3.idl> + + +module com { module sun { module star { module i18n { + + + +/** This interface provides access to locale specific calendar + systems. + + <p> It is derived from ::com::sun::star::i18n::XCalendar3 and + provides additional methods to set and get the local time. </p> + + @since LibreOffice 5.0 + */ +interface XCalendar4 : com::sun::star::i18n::XCalendar3 +{ + /** Set the local 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. + + The actual timezone and daylight saving time offsets effective + at the given date and time are considered and subtracted before + setting the UTC time at the calendar. + */ + void setLocalDateTime( [in] double TimeInDays ); + + /** Get the local 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. + + The actual timezone and daylight saving time offsets effective + at the given date and time are considered and added to the UTC + time at the calendar. + */ + double getLocalDateTime(); + + /** Load the default calendar for the given locale with a given time zone. + + @param rLocale + the locale for the calendar + @param TimeZone + If empty, the system's time zone is used. + Else specified as "Region/City" name like "Europe/Berlin", + or a custom time zone ID such as "UTC" or "GMT-8:00". + + @since LibreOffice 6.3 + */ + void loadDefaultCalendarTZ( [in] ::com::sun::star::lang::Locale rLocale, [in] string TimeZone ); + + /** Load a specific calendar for the given locale with a given time zone. + + @param uniqueID + the uniqueID for the calendar. + As of 2019-09-25, we can specify ROC, dangi, buddhist, gengou, + gregorian, hanja, hanja_yoil, hijri, jewish. + If the calendar for the specified uniqueID is not found, + gregorian is used. + @param rLocale + the locale for the calendar + @param TimeZone + If empty, the system's time zone is used. + Else specified as "Region/City" name like "Europe/Berlin", + or a custom time zone ID such as "UTC" or "GMT-8:00". + + @since LibreOffice 6.3 + */ + void loadCalendarTZ( [in] string uniqueID, + [in] ::com::sun::star::lang::Locale rLocale, + [in] string TimeZone ); + +}; + +}; }; }; }; + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XCharacterClassification.idl b/offapi/com/sun/star/i18n/XCharacterClassification.idl new file mode 100644 index 000000000..1bc8c7c2a --- /dev/null +++ b/offapi/com/sun/star/i18n/XCharacterClassification.idl @@ -0,0 +1,274 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_XCharacterClassification_idl__ +#define __com_sun_star_i18n_XCharacterClassification_idl__ + +#include <com/sun/star/i18n/ParseResult.idl> +#include <com/sun/star/lang/Locale.idl> +#include <com/sun/star/uno/XInterface.idl> + + +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 UnicodeType of character at position <em>nPos</em>. + short getType( [in] string aText, [in] long nPos ); + + /** Get DirectionProperty of character at position + <em>nPos</em>. + */ + short getCharacterDirection( [in] string aText, [in] long nPos ); + + /// Get UnicodeScript of character at position <em>nPos</em>. + short getScript( [in] string aText, [in] long nPos ); + + /// Get KCharacterType of character at position <em>nPos</em>. + long getCharacterType( [in] string aText, [in] long nPos, + [in] com::sun::star::lang::Locale aLocale ); + + /** Get accumulated KCharacterTypes 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 + KParseTokens 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 ParseResult structure. If no + unambiguous token could be parsed, + ParseResult::TokenType 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 + KParseType::ASC_NUM (or + KParseType::UNI_NUM) and + KParseType::IDENTNAME are set in + ParseResult::TokenType. + + @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 KParseTokens 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 KParseTokens 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. + + @code{.cpp} + 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 + OUString 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 ); + @endcode + */ + + 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 + parseAnyToken(). If the actual token does not + match the passed <em>nTokenType</em> a + ParseResult::TokenType set to <b>0</b> (zero) + is returned. </p> + + @param nTokenType + One or more of the KParseType constants. + + @param aText + See #parseAnyToken + @param nPos + See #parseAnyToken + @param aLocale + See #parseAnyToken + @param nStartCharFlags + See #parseAnyToken + @param aUserDefinedCharactersStart + See #parseAnyToken + @param nContCharFlags + See #parseAnyToken + @param aUserDefinedCharactersCont + See #parseAnyToken + + @code{.cpp} + // 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. + OUString aEmptyString; + // Continuing characters may be any alphanumeric or underscore. + sal_Int32 nContFlags = nStartFlags; + // Additionally, continuing characters may contain a blank. + OUString aContChars( " " ); + // 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(); + @endcode + */ + + 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XCollator.idl b/offapi/com/sun/star/i18n/XCollator.idl new file mode 100644 index 000000000..aa666b350 --- /dev/null +++ b/offapi/com/sun/star/i18n/XCollator.idl @@ -0,0 +1,158 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 CollatorOptions. + + @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 CollatorOptions. + + @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 XCollator::listCollatorOptions(). + */ + 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XExtendedCalendar.idl b/offapi/com/sun/star/i18n/XExtendedCalendar.idl new file mode 100644 index 000000000..07ae79174 --- /dev/null +++ b/offapi/com/sun/star/i18n/XExtendedCalendar.idl @@ -0,0 +1,75 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + ::com::sun::star::i18n::XCalendar 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 returns 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 CalendarDisplayCode + + @param nNativeNumberMode + One of NativeNumberMode. <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XExtendedIndexEntrySupplier.idl b/offapi/com/sun/star/i18n/XExtendedIndexEntrySupplier.idl new file mode 100644 index 000000000..e640fceda --- /dev/null +++ b/offapi/com/sun/star/i18n/XExtendedIndexEntrySupplier.idl @@ -0,0 +1,143 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + ::com::sun::star::i18n::XIndexEntrySupplier 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 language. + <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 aLocale + The locale. + + @param aIndexAlgorithm + Index algorithm to be loaded. + + @param nCollatorOptions + Sorting option of ::com::sun::star::i18n::CollatorOptions 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XExtendedInputSequenceChecker.idl b/offapi/com/sun/star/i18n/XExtendedInputSequenceChecker.idl new file mode 100644 index 000000000..af429a253 --- /dev/null +++ b/offapi/com/sun/star/i18n/XExtendedInputSequenceChecker.idl @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_XExtendedInputSequenceChecker_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 + ::com::sun::star::i18n::XInputSequenceChecker 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 aText + Text to be checked and corrected. + + @param nPos + Index in aText where checking starts. + + @param cInputChar + The input character. Or at least, a UTF16 code unit thereof. + It looks like this interface was not designed with non-BMP + characters in mind. Not sure if that is a problem. + + @param nInputCheckMode + One of InputSequenceCheckMode constants. + */ + long correctInputSequence( [inout] string aText, [in] long nPos, + [in] char cInputChar, [in] short nInputCheckMode ); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XExtendedTextConversion.idl b/offapi/com/sun/star/i18n/XExtendedTextConversion.idl new file mode 100644 index 000000000..2ef853aab --- /dev/null +++ b/offapi/com/sun/star/i18n/XExtendedTextConversion.idl @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + ::com::sun::star::i18n::XTextConversion and provides + a new conversion function containing position map (offset) between original + and converted string. </p> + + @since OOo 2.0 + */ +published interface XExtendedTextConversion : ::com::sun::star::i18n::XTextConversion +{ + /** + The functionality of this method is same as + ::com::sun::star::i18n::XTextConversion::getConversion(), + except an additional output parameter rOffset. + + @param aText + See ::com::sun::star::i18n::XTextConversion::getConversion() + @param nStartPos + See ::com::sun::star::i18n::XTextConversion::getConversion() + @param nLength + See ::com::sun::star::i18n::XTextConversion::getConversion() + @param aLocale + See ::com::sun::star::i18n::XTextConversion::getConversion() + @param nTextConversionType + See ::com::sun::star::i18n::XTextConversion::getConversion() + @param nTextConversionOptions + See ::com::sun::star::i18n::XTextConversion::getConversion() + + @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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XExtendedTransliteration.idl b/offapi/com/sun/star/i18n/XExtendedTransliteration.idl new file mode 100644 index 000000000..6edc2a09f --- /dev/null +++ b/offapi/com/sun/star/i18n/XExtendedTransliteration.idl @@ -0,0 +1,93 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_XExtendedTransliteration_idl__ +#define __com_sun_star_i18n_XExtendedTransliteration_idl__ + +#include <com/sun/star/i18n/XTransliteration.idl> +#include <com/sun/star/i18n/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 + ::com::sun::star::i18n::XTransliteration 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 needed. </p> + + @since OOo 1.1.2 + */ +published interface XExtendedTransliteration : ::com::sun::star::i18n::XTransliteration +{ + /** Transliterate a substring. The functionality is the same as + ::com::sun::star::i18n::XTransliteration::transliterate() + but omits the offset parameter to improve performance. + + @param aStr + The input string. + + @param nStartPos + Start position within aStr from where transliteration starts. + + @param nCount + Number of code points 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 + XTransliteration::transliterateChar2String() to + obtain the correct result. </p> + + @param cChar + The input character. + */ + char transliterateChar2Char( [in] char cChar ) + raises( MultipleCharsOutputException ); + +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XForbiddenCharacters.idl b/offapi/com/sun/star/i18n/XForbiddenCharacters.idl new file mode 100644 index 000000000..66f1afe39 --- /dev/null +++ b/offapi/com/sun/star/i18n/XForbiddenCharacters.idl @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_i18n_XForbiddenCharacters_idl__ +#define __com_sun_star_i18n_XForbiddenCharacters_idl__ + +#include <com/sun/star/i18n/ForbiddenCharacters.idl> +#include <com/sun/star/lang/Locale.idl> +#include <com/sun/star/container/NoSuchElementException.idl> + + + +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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XIndexEntrySupplier.idl b/offapi/com/sun/star/i18n/XIndexEntrySupplier.idl new file mode 100644 index 000000000..10c315043 --- /dev/null +++ b/offapi/com/sun/star/i18n/XIndexEntrySupplier.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_i18n_XIndexEntrySupplier_idl__ +#define __com_sun_star_i18n_XIndexEntrySupplier_idl__ + +#include <com/sun/star/lang/Locale.idl> + + +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 com::sun::star::lang::Locale 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 + com::sun::star::lang::Locale. + + <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XInputSequenceChecker.idl b/offapi/com/sun/star/i18n/XInputSequenceChecker.idl new file mode 100644 index 000000000..0e61ce936 --- /dev/null +++ b/offapi/com/sun/star/i18n/XInputSequenceChecker.idl @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 aText + Text to be checked. + + @param nPos + Index in aText where checking starts. + + @param cInputChar + The input character. Or at least, a UTF16 code unit thereof. + It looks like this interface was not designed with non-BMP + characters in mind. Not sure if that is a problem. + + @param nInputCheckMode + One of InputSequenceCheckMode constants. + */ + boolean checkInputSequence( [in] string aText, [in] long nPos, + [in] char cInputChar, [in] short nInputCheckMode ); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XLocaleData.idl b/offapi/com/sun/star/i18n/XLocaleData.idl new file mode 100644 index 000000000..012450eda --- /dev/null +++ b/offapi/com/sun/star/i18n/XLocaleData.idl @@ -0,0 +1,114 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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="https://cgit.freedesktop.org/libreoffice/core/tree/i18npool/source/localedata/data/locale.dtd"> + the DTD file</a>. </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 characters 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XLocaleData2.idl b/offapi/com/sun/star/i18n/XLocaleData2.idl new file mode 100644 index 000000000..bf93479c7 --- /dev/null +++ b/offapi/com/sun/star/i18n/XLocaleData2.idl @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + ::com::sun::star::i18n::XLocaleData and provides + an additional method to return a sequence of all + ::com::sun::star::i18n::Currency2 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XLocaleData3.idl b/offapi/com/sun/star/i18n/XLocaleData3.idl new file mode 100644 index 000000000..e8ab2f0df --- /dev/null +++ b/offapi/com/sun/star/i18n/XLocaleData3.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_i18n_XLocaleData3_idl__ +#define __com_sun_star_i18n_XLocaleData3_idl__ + +#include <com/sun/star/i18n/XLocaleData2.idl> +#include <com/sun/star/i18n/Calendar2.idl> + + +module com { module sun { module star { module i18n { + + +/** + Access locale specific data. + + <p> Derived from ::com::sun::star::i18n::XLocaleData2 this provides an + additional method to return a sequence of all + ::com::sun::star::i18n::Calendar2 elements available for that locale. + + @since LibreOffice 3.5 + */ + +published interface XLocaleData3 : com::sun::star::i18n::XLocaleData2 +{ + /** returns all LC_CALENDAR calendars for a locale. + */ + sequence< Calendar2 > getAllCalendars2( + [in] com::sun::star::lang::Locale aLocale ); +}; + +}; }; }; }; + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XLocaleData4.idl b/offapi/com/sun/star/i18n/XLocaleData4.idl new file mode 100644 index 000000000..d43630032 --- /dev/null +++ b/offapi/com/sun/star/i18n/XLocaleData4.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_i18n_XLocaleData4_idl__ +#define __com_sun_star_i18n_XLocaleData4_idl__ + +#include <com/sun/star/i18n/XLocaleData3.idl> + + +module com { module sun { module star { module i18n { + + +/** + Access locale specific data. + + <p> Derived from ::com::sun::star::i18n::XLocaleData3 + this provides an additional method to return a sequence of date + acceptance patterns for a locale. + + @since LibreOffice 3.6 + */ + +published interface XLocaleData4 : com::sun::star::i18n::XLocaleData3 +{ + /** returns a sequence of date acceptance patterns for a locale + + <p> Patterns with input combinations that are accepted as + incomplete date input, such as <b>M/D</b> or <b>D.M.</b> + */ + sequence< string > getDateAcceptancePatterns( + [in] com::sun::star::lang::Locale aLocale ); +}; + +}; }; }; }; + +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XLocaleData5.idl b/offapi/com/sun/star/i18n/XLocaleData5.idl new file mode 100644 index 000000000..5a1eeb9bc --- /dev/null +++ b/offapi/com/sun/star/i18n/XLocaleData5.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __com_sun_star_i18n_XLocaleData5_idl__ +#define __com_sun_star_i18n_XLocaleData5_idl__ + +#include <com/sun/star/i18n/XLocaleData4.idl> + + +module com { module sun { module star { module i18n { + + +/** + Access locale specific data. + + <p> Derived from ::com::sun::star::i18n::XLocaleData4 + this provides an additional method to return an instance of + com::sun::star::i18n::LocaleDataItem2 + + @since LibreOffice 6.0 + */ + +interface XLocaleData5 : com::sun::star::i18n::XLocaleData4 +{ + /** returns an instance of com::sun::star::i18n::LocaleDataItem2 for + a Locale. + */ + com::sun::star::i18n::LocaleDataItem2 getLocaleItem2( [in] com::sun::star::lang::Locale Locale ); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/offapi/com/sun/star/i18n/XNativeNumberSupplier.idl b/offapi/com/sun/star/i18n/XNativeNumberSupplier.idl new file mode 100644 index 000000000..a6a8a13c1 --- /dev/null +++ b/offapi/com/sun/star/i18n/XNativeNumberSupplier.idl @@ -0,0 +1,90 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_XNativeNumberSupplier_idl__ +#define __com_sun_star_i18n_XNativeNumberSupplier_idl__ + +#include <com/sun/star/lang/Locale.idl> +#include <com/sun/star/i18n/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 aNumberString + The input string. + + @param nNativeNumberMode + One of NativeNumberMode values. + + @param aLocale + The locale. + */ + 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 NativeNumberMode values. + + @param aLocale + The locale. + */ + 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 NativeNumberMode values. + + @param aLocale + The locale. + */ + NativeNumberXmlAttributes convertToXmlAttributes( + [in] ::com::sun::star::lang::Locale aLocale, + [in] short nNativeNumberMode ); + + /** Convert XML attributes to a NatNum value. + + @returns + One of NativeNumberMode + */ + short convertFromXmlAttributes( [in] NativeNumberXmlAttributes aAttr ); + +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XNativeNumberSupplier2.idl b/offapi/com/sun/star/i18n/XNativeNumberSupplier2.idl new file mode 100644 index 000000000..bd125d096 --- /dev/null +++ b/offapi/com/sun/star/i18n/XNativeNumberSupplier2.idl @@ -0,0 +1,69 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_XNativeNumberSupplier2_idl__ +#define __com_sun_star_i18n_XNativeNumberSupplier2_idl__ + +#include <com/sun/star/i18n/XNativeNumberSupplier.idl> + + +module com { module sun { module star { module i18n { + + +/** Methods to convert between strings of ASCII Arabic digits and native + numeral strings, using NatNum params. + + @since LibreOffice 6.1 + + @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 LibreOffice core. + */ + +interface XNativeNumberSupplier2 : ::com::sun::star::i18n::XNativeNumberSupplier +{ + /** Returns native number string for given number string, using NatNum params. + + @param NumberString + The input string. + + @param NativeNumberMode + One of NativeNumberMode values. + + @param Locale + The locale. + + @param NativeNumberParameters + The NatNum params (like "ordinal-digits" in [NatNum12 ordinal-digits]). + */ + string getNativeNumberStringParams( + [in] string NumberString, + [in] ::com::sun::star::lang::Locale Locale, + [in] short NativeNumberMode, + [in] string NativeNumberParameters ); + +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XNumberFormatCode.idl b/offapi/com/sun/star/i18n/XNumberFormatCode.idl new file mode 100644 index 000000000..31af781c5 --- /dev/null +++ b/offapi/com/sun/star/i18n/XNumberFormatCode.idl @@ -0,0 +1,94 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_XNumberFormatCode_idl__ +#define __com_sun_star_i18n_XNumberFormatCode_idl__ + +#include <com/sun/star/lang/Locale.idl> +#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 KNumberFormatType + + @param nFormatUsage + one of KNumberFormatUsage values + + @param rLocale + The locale for which the format code is requested. + */ + 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 NumberFormatIndex values + + @param rLocale + The locale for which the format code is requested. + */ + 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 KNumberFormatUsage values + + @param rLocale + The locale for which the format codes are requested. + */ + sequence< NumberFormatCode > getAllFormatCode( + [in] short nFormatUsage, + [in] com::sun::star::lang::Locale rLocale ); + + /** + returns all format codes for a given locale. + + @param rLocale + The locale for which the format codes are requested. + */ + sequence< NumberFormatCode > getAllFormatCodes( + [in] com::sun::star::lang::Locale rLocale ); + +}; + +}; }; }; }; +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XOrdinalSuffix.idl b/offapi/com/sun/star/i18n/XOrdinalSuffix.idl new file mode 100644 index 000000000..c5db13da7 --- /dev/null +++ b/offapi/com/sun/star/i18n/XOrdinalSuffix.idl @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_XOrdinalSuffix_idl__ +#define __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 OOo 2.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. + */ + +interface XOrdinalSuffix : com::sun::star::uno::XInterface +{ + /** Returns all the possible ordinal suffixes for the number. + + This method will provide "<b>st</b>", "<b>nd</b>", "<b>rd</b>", + "<b>th</b>" for an English locale, depending on the provided number. + In some locales like French, Italian or Spanish it ca return several + suffixes for one number. + + Examples: for the number '1', the values will be <b>st</b> in + English, but <b>er</b> and <b>re</b> in French. All these values + may depend on the underlying version of ICU. + + */ + sequence< string > getOrdinalSuffix( [in] long nNumber, [in] com::sun::star::lang::Locale aLocale ); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XScriptTypeDetector.idl b/offapi/com/sun/star/i18n/XScriptTypeDetector.idl new file mode 100644 index 000000000..d96f428c2 --- /dev/null +++ b/offapi/com/sun/star/i18n/XScriptTypeDetector.idl @@ -0,0 +1,76 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#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 + ScriptDirection</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 CTLScriptType constants. + */ + short getCTLScriptType ([in] string aText, [in] long nPos); +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XTextConversion.idl b/offapi/com/sun/star/i18n/XTextConversion.idl new file mode 100644 index 000000000..adfa7a3a5 --- /dev/null +++ b/offapi/com/sun/star/i18n/XTextConversion.idl @@ -0,0 +1,135 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_i18n_XTextConversion_idl__ +#define __com_sun_star_i18n_XTextConversion_idl__ + +#include <com/sun/star/uno/XInterface.idl> +#include <com/sun/star/lang/Locale.idl> +#include <com/sun/star/i18n/TextConversionResult.idl> +#include <com/sun/star/lang/IllegalArgumentException.idl> +#include <com/sun/star/lang/NoSupportException.idl> + + + +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 portion in aText for the conversion + @param Locale + Locale the conversion is referring to. + @param nTextConversionType + One of TextConversionType values. + @param nTextConversionOptions + Combination of TextConversionOption values. + @returns + TextConversionResult + + @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 Locale, + [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 portion in aText for the conversion + @param Locale + Locale the conversion is referring to. + @param nTextConversionType + One of TextConversionType values. + @param nTextConversionOptions + Combination of TextConversionOption 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 Locale, + [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 Locale + Locale the conversion is referring to. + @param nTextConversionType + One of TextConversionType values. + @param nTextConversionOptions + Combination of TextConversionOption 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 Locale, + [in] short nTextConversionType, + [in] long nTextConversionOptions ) + raises( com::sun::star::lang::IllegalArgumentException, + com::sun::star::lang::NoSupportException ); +}; + + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/XTransliteration.idl b/offapi/com/sun/star/i18n/XTransliteration.idl new file mode 100644 index 000000000..4c6144776 --- /dev/null +++ b/offapi/com/sun/star/i18n/XTransliteration.idl @@ -0,0 +1,315 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + TransliterationType. </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 + * case folding + * ( 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 implementation 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 TransliterationType::CASCADE + modules. + */ + string getName(); + + /** Return the attribute(s) associated with this transliteration + object, as defined in TransliterationType. 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 XTransliteration::loadModule(). + */ + 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 + TransliterationModules 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}. + @param aLocale + The locale for which the module is requested. + */ + 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 fed as input to the next module in + the sequence. The object created by this call has + TransliterationType CASCADE and IGNORE types. + + @param aImplNameList + Only IGNORE type modules can be specified. + @param aLocale + The locale for which the modules are requested. + */ + 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 + TransliterationType + @param aLocale + The locale for which the modules are requested. + */ + 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 TransliterationType IGNORE + attribute. + + @param aInStr + The input string. + + @param nStartPos + Start position within aInStr from where transliteration starts. + + @param nCount + Number of code points 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 + TransliterationType 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 TransliterationType + 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 expressions 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/i18n/reservedWords.idl b/offapi/com/sun/star/i18n/reservedWords.idl new file mode 100644 index 000000000..de4f2a3cb --- /dev/null +++ b/offapi/com/sun/star/i18n/reservedWords.idl @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#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 + XLocaleData::getReservedWord(). + + @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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |