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.
+
+
These text conversion options are usually selected by end users.
+ The options can be combined and may be related to
+ TextConversionType.
+
+ @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
+
+
+
+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.
+
+ If there is no convertible word found in the text, startPos
+ and endPos 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
+#include
+
+
+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..cb13f601d
--- /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.
+
+ Use with XTransliteration::loadModule() and
+ com::sun::star::util::SearchOptions::transliterateFlags()
+
+ Note that values >=0x100 are logically or'ed with other values!
+ */
+
+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..5a67714ba
--- /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
+ TranslationModuleExtra 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..970eae54b
--- /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.
+
+ Non-IGNORE type modules provide
+ XTransliteration::transliterate().
+ IGNORE type modules provide
+ XTransliteration::equals() and
+ XTransliteration::transliterateRange().
+ */
+
+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..af7045c88
--- /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,
+ k_CJKUnifiedIdeographsExtensionA,
+ 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.
+
+ used with XCalendar::getFirstDayOfWeek(),
+ XCalendar::setFirstDayOfWeek() and
+ XCalendar::getDisplayName()
+ */
+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.
+
+ Used with XBreakIterator::nextWord(),
+ XBreakIterator::previousWord(),
+ XBreakIterator::getWordBoundary(),
+ XBreakIterator::getWordType(),
+ XBreakIterator::isBeginWord(),
+ XBreakIterator::isEndWord()
+*/
+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
+#include
+#include
+#include
+#include
+
+
+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.
+
+ Assumption: StartPos is inclusive and EndPos is exclusive.
+ */
+
+published interface XBreakIterator: com::sun::star::uno::XInterface
+{
+ /** Traverses specified number of characters/cells in Text from
+ nStartPos 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 nStartPos.
+
+ @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
+ nStartPos 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 nStartPos.
+
+ @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 nStartPos forwards.
+
+ @param aText
+ The input text.
+
+ @param nStartPos
+ The start index in aText.
+
+ @param aLocale
+ The locale of the character preceding nStartPos.
+
+ @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 nStartPos backwards.
+
+ @param aText
+ The input text.
+
+ @param nStartPos
+ The start index in aText.
+
+ @param aLocale
+ The locale of the character preceding nStartPos.
+
+ If the previous character is a space character and
+ nWordType 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 aLocale
+ referring to the Asian character, which is then the previous
+ character of the space character where nStartPos
+ points to.
+
+ Note 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.
+
+ @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.
+
+ If nPos 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 bPreferForward flag is used. If bPreferForward ==
+ `FALSE`, nPos is considered to be the end of the word
+ and we look backwards for beginning of word, otherwise
+ nPos is considered to be the start of the next word and
+ we look forwards for the end of the word.
+
+ @param aText
+ The input text.
+
+ @param nPos
+ The start index in aText.
+
+ @param aLocale
+ The locale of the character preceding nStartPos.
+
+ @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 nPos.
+
+ 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.
+
+ */
+ short getWordType( [in] string aText, [in] long nPos,
+ [in] ::com::sun::star::lang::Locale aLocale);
+
+ /** If a word starts at position nPos.
+
+ It is possible that both of this method
+ and following method isEndWord all return
+ `TRUE`, since StartPos of a word is inclusive
+ while EndPos of a word is exclusive.
+
+
+ */
+ boolean isBeginWord( [in] string aText, [in] long nPos,
+ [in] ::com::sun::star::lang::Locale aLocale,
+ [in] short nWordType);
+
+ /** If a word ends at position nPos.
+ */
+ boolean isEndWord( [in] string aText, [in] long nPos,
+ [in] ::com::sun::star::lang::Locale aLocale,
+ [in] short nWordType);
+
+ /** Traverses in Text from nStartPos 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 nStartPos.
+
+ @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 nStartPos 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 nStartPos.
+
+ @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
+ nStartPos.
+
+ @param aText
+ The input text.
+
+ @param nStartPos
+ The start index in aText.
+
+ @param aLocale
+ The locale of the character preceding nStartPos.
+
+ @param nMinBreakPos
+ Defines a minimum break position for hyphenated line break.
+ When the position for hyphenated line break is less than
+ nMinBreakPos, 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 nStartPos 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 nStartPos 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 nStartPos 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 nStartPos 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 nPos.
+
+ @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 nStartPos 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 nStartPos.
+
+ @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 nStartPos 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 nStartPos.
+
+ @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 nStartPos 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 nStartPos.
+
+ @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 nStartPos 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 nStartPos.
+
+ @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
+#include
+#include
+
+
+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,
+ "Gregorian"
+ */
+ 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. 12
+ short getNumberOfMonthsInYear();
+
+ /// returns the number of days in a week, e.g. 7
+ 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 nCalendarDisplayIndex type:
+
+ - CalendarDisplayIndex::AM_PM
+ - one of AmPmValue
+ - CalendarDisplayIndex::DAY
+ - one of Weekdays or a number used as
+ an offset into the corresponding
+ Calendar::Days sequence
+ - CalendarDisplayIndex::MONTH
+ - one of Months or a number used as
+ an offset into the corresponding
+ Calendar::Months sequence
+ - CalendarDisplayIndex::YEAR
+ - not used, empty string returned
+ - CalendarDisplayIndex::ERA
+ - a number used as an offset into the
+ corresponding Calendar:Eras
+ sequence
+ - CalendarDisplayIndex::GENITIVE_MONTH
+ - a number used as an offset into the
+ corresponding Calendar2:GenitiveMonth
+ sequence
+
+
+ The value should be obtained by a previous call to
+ XCalendar::getValue() with an appropriate
+ CalendarFieldIndex argument.
+
+ @param nNameType
+ A value indicating whether to return the abbreviated or the
+ full name, or the narrow name for some
+ CalendarDisplayIndex values.
+
+ - 0
+ - abbreviated name, e.g. "Jan"
+ - 1
+ - full name, e.g. "January"
+ - 2
+ - narrow name, e.g. "J"
+ Valid only for CalendarDisplayIndex::DAY,
+ CalendarDisplayIndex::MONTH and
+ CalendarDisplayIndex::GENITIVE_MONTH
+ @since LibreOffice 3.5
+
+
+ This parameter is not used if the
+ nCalendarDisplayIndex argument equals
+ CalendarDisplayIndex::AM_PM
+ */
+
+ 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
+#include
+
+
+module com { module sun { module star { module i18n {
+
+
+
+/**
+ This interface provides access to locale specific calendar
+ systems.
+
+ 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...
+
+ @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
+
+
+module com { module sun { module star { module i18n {
+
+
+
+/** This interface provides access to locale specific calendar
+ systems.
+
+ It is derived from ::com::sun::star::i18n::XCalendar3 and
+ provides additional methods to set and get the local time.
+
+ @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
+#include
+#include
+
+
+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=
+GRPSEP=
+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 nPos for nCount 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 nPos for nCount 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 nPos for nCount 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 nPos.
+ short getType( [in] string aText, [in] long nPos );
+
+ /** Get DirectionProperty of character at position
+ nPos.
+ */
+ short getCharacterDirection( [in] string aText, [in] long nPos );
+
+ /// Get UnicodeScript of character at position nPos.
+ short getScript( [in] string aText, [in] long nPos );
+
+ /// Get KCharacterType of character at position nPos.
+ long getCharacterType( [in] string aText, [in] long nPos,
+ [in] com::sun::star::lang::Locale aLocale );
+
+ /** Get accumulated KCharacterTypes of string starting
+ at position nPos of length nCount 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 nPos.
+
+ A name or identifier must match the
+ KParseTokens criteria passed in
+ nStartCharFlags and nContCharFlags and may
+ additionally contain characters of
+ aUserDefinedCharactersStart and/or
+ aUserDefinedCharactersCont.
+
+
+ @returns
+ A filled ParseResult structure. If no
+ unambiguous token could be parsed,
+ ParseResult::TokenType will be set to
+ 0 (zero), other fields will contain the values parsed
+ so far.
+
+ 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 nTokenType starting
+ at position nPos.
+
+
Other parameters are the same as in
+ parseAnyToken(). If the actual token does not
+ match the passed nTokenType a
+ ParseResult::TokenType set to 0 (zero)
+ is returned.
+
+ @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
+#include
+#include
+
+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
+ 0 if the first string is equal to the second string
+ -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
+ 0 if the first string is equal to the second string
+ -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 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 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 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
+
+
+module com { module sun { module star { module i18n {
+
+
+
+/**
+ This interface provides access to locale specific calendar
+ systems.
+
+ It is derived from
+ ::com::sun::star::i18n::XCalendar and provides
+ additional functionality to display parts of the date currently
+ set at the calendar.
+
+ @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.
+
+ 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.
+
+ @param nCalendarDisplayCode
+ One of CalendarDisplayCode
+
+ @param nNativeNumberMode
+ One of NativeNumberMode.
+ 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
+#include
+
+
+module com { module sun { module star { module i18n {
+
+
+
+/**
+ This interface provides information for creating "Table of Index"
+
+ It is derived from
+ ::com::sun::star::i18n::XIndexEntrySupplier and
+ provides following additional functionalities.
+
+ - Provide supported language/locale list.
+
- Provide supported algorithm list.
+
- Provide phonetic entry support for CJK language.
+
- Provide method to compare index entry.
+
+
+ @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.
+
+ Note that loadAlgorithm should be called before calling
+ this function.
+
+ @param aIndexEntry
+ Index entry
+
+ @param aPhoneticEntry
+ Phonetic entry
+
+ @param aLocale
+ Language attribute for index and phonetic entry.
+ 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
+
+ Note that loadAlgorithm should be called before calling
+ this function.
+
+ @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.
+ 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
+
+
+module com { module sun { module star { module i18n {
+
+
+
+/**
+ This interface perform input sequence correction for the languages like Thai and Hindi
+
+ It is derived from
+ ::com::sun::star::i18n::XInputSequenceChecker and
+ provides additional functionality to correct input sequence.
+
+ @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
+
+
+module com { module sun { module star { module i18n {
+
+
+
+/**
+ This interface provides Text Conversion service.
+
+ It is derived from
+ ::com::sun::star::i18n::XTextConversion and provides
+ a new conversion function containing position map (offset) between original
+ and converted string.
+
+ @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 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
+#include
+
+
+module com { module sun { module star { module i18n {
+
+
+
+/**
+ This interface provides character conversions like case folding or
+ Hiragana to Katakana.
+
+ 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.
+
+ @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.
+
+ 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.
+
+ @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
+#include
+#include
+
+
+
+module com { module sun { module star { module i18n {
+
+
+/**
+ provides access to forbidden character settings in a document.
+
+ In some languages, particular characters are not allowed to be
+ placed at the beginning or at the end of a text line.
+ */
+
+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
+
+
+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.
+
+ For example, in English locale it returns "K" 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.
+
+
For example, in English locale it returns
+ "p." for bMorePages == `FALSE`
+ "pp." for bMorePages == `TRUE`
+ */
+ 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
+
+
+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
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+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.
+
+ For XML locale data files definitions see
+ the DTD file.
+ */
+
+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 getAllCalendars(
+ [in] com::sun::star::lang::Locale aLocale );
+
+ /** returns all LC_CURRENCY currencies for a locale.
+ */
+ sequence getAllCurrencies(
+ [in] com::sun::star::lang::Locale aLocale );
+
+ /** returns all LC_FORMAT format elements for a locale.
+ */
+ sequence getAllFormats(
+ [in] com::sun::star::lang::Locale aLocale );
+
+ /** returns all LC_COLLATION collators for a locale.
+ */
+ sequence getCollatorImplementations(
+ [in] com::sun::star::lang::Locale aLocale );
+
+ /** returns all LC_SEARCH search options for a locale.
+ */
+ sequence getSearchOptions(
+ [in] com::sun::star::lang::Locale aLocale );
+
+ /** returns all LC_COLLATION collation options for a locale.
+ */
+ sequence getCollationOptions(
+ [in] com::sun::star::lang::Locale aLocale );
+
+ /** returns all LC_TRANSLITERATION transliterations for a locale.
+ */
+ sequence 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 getReservedWord(
+ [in] com::sun::star::lang::Locale aLocale );
+
+ /** returns all available locales.
+ */
+ sequence 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
+#include
+
+
+module com { module sun { module star { module i18n {
+
+
+/**
+ Access locale specific data.
+
+ 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
+#include
+
+
+module com { module sun { module star { module i18n {
+
+
+/**
+ Access locale specific data.
+
+ 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
+
+
+module com { module sun { module star { module i18n {
+
+
+/**
+ Access locale specific data.
+
+ 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
+
+
Patterns with input combinations that are accepted as
+ incomplete date input, such as M/D or D.M.
+ */
+ 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
+
+
+module com { module sun { module star { module i18n {
+
+
+/**
+ Access locale specific data.
+
+ 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
+#include
+
+
+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
+
+
+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 internal and does not
+ have the published 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
+#include
+#include
+
+
+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 nFormatIndex 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 nFormatUsage 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
+
+
+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 internal and does not
+ have the published 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 "st", "nd", "rd",
+ "th" 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 st in
+ English, but er and re 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
+
+
+module com { module sun { module star { module i18n {
+
+
+/**
+ contains the help routines for layouting complex text
+
+ Assumption - StartPos is inclusive and EndPos is exclusive.
+
+ The nScriptDirection parameters are of type
+ ScriptDirection
+
+ @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.
+ 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
+#include
+#include
+#include
+#include
+
+
+
+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 nConversionDictionaryType 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 nConversionDictionaryType 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 nConversionDictionaryType 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
+#include
+#include
+#include
+
+
+module com { module sun { module star { module i18n {
+
+
+/**
+ Character conversions like case folding or Hiragana to Katakana.
+
+ 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.
+
+ In order to select transliteration modules for different
+ purposes, they are classified with attributes of
+ TransliterationType.
+
+ 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.
+
+ A typical calling sequence of transliteration is
+
+ - getAvailableModules()
+ - loadModulesByImplNames()
+ - equals()
+
+ or another one is
+
+ - loadModule()
+ - transliterate()
+
+
+
+*/
+
+/* 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 aModType,
+ [in] ::com::sun::star::lang::Locale aLocale );
+
+ /** Load instance of UNO registered module.
+
+ 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 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 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 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 rOffset );
+
+ /** Match two substrings and find if they are equivalent as per this
+ transliteration.
+
+ This method can be called if the object has
+ TransliterationType IGNORE attribute.
+
+ Returns the number of matched code points in any case, even if
+ strings are not equal, for example:
+ equals( "a", 0, 1, nMatch1, "aaa", 0, 3, nMatch2 )
+ returns `FALSE` and nMatch:=1 and nMatch2:=1
+ equals( "aab", 0, 3, nMatch1, "aaa", 0, 3, nMatch2 )
+ returns `FALSE` and nMatch:=2 and nMatch2:=2
+
+ @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
+ `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.
+
+ This method is intended for getting corresponding ranges and
+ can be called if the object has TransliterationType
+ IGNORE attribute.
+
+ For example: generic CASE_IGNORE transliterateRange( "a", "i" )
+ returns {"A","I","a","i"}, transliterateRange( "a", "a" )
+ returns {"A","A","a","a"}.
+
+ Use this transliteration to create regular expressions like
+ [a-i] --> [A-Ia-i].
+
+ @returns
+ String sequence containing corresponding transliterated
+ pairs of characters to represent a range.
+ */
+ sequence 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
+ 0 if the first substring is equal to the second substring
+ -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
+ 0 if the first string is equal to the second string
+ -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: */
--
cgit v1.2.3