XTransliteration.idl (d1766043) | XTransliteration.idl (90ed883b) |
---|---|
1/************************************************************** | 1/************************************************************** |
2 * | 2 * |
3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at | 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at |
10 * | 10 * |
11 * http://www.apache.org/licenses/LICENSE-2.0 | 11 * http://www.apache.org/licenses/LICENSE-2.0 |
12 * | 12 * |
13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. | 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. |
19 * | 19 * |
20 *************************************************************/ 21 22 | 20 *************************************************************/ 21 22 |
23 |
|
23#ifndef __com_sun_star_i18n_XTransliteration_idl__ 24#define __com_sun_star_i18n_XTransliteration_idl__ 25 26#include <com/sun/star/lang/Locale.idl> 27#include <com/sun/star/uno/XInterface.idl> 28#include <com/sun/star/i18n/TransliterationModules.idl> 29#include <com/sun/star/i18n/TransliterationModulesNew.idl> 30 --- 35 unchanged lines hidden (view full) --- 66 67*/ 68 69/* comment: 70 * 0. 71 * All the IGNORE-type functionalities (Range, equals) are based on mapping. 72 * except equals() method in IGNORE_CASE, which is based on Locale-independent 73 * casefolding | 24#ifndef __com_sun_star_i18n_XTransliteration_idl__ 25#define __com_sun_star_i18n_XTransliteration_idl__ 26 27#include <com/sun/star/lang/Locale.idl> 28#include <com/sun/star/uno/XInterface.idl> 29#include <com/sun/star/i18n/TransliterationModules.idl> 30#include <com/sun/star/i18n/TransliterationModulesNew.idl> 31 --- 35 unchanged lines hidden (view full) --- 67 68*/ 69 70/* comment: 71 * 0. 72 * All the IGNORE-type functionalities (Range, equals) are based on mapping. 73 * except equals() method in IGNORE_CASE, which is based on Locale-independent 74 * casefolding |
74 * ( This second assumption is very complicated and may cause confusion of use) | 75 * (This second assumption is very complicated and may cause confusion of use) |
75 * 76 * 1. 77 * We are assuming Upper to Lower mapping as one of transliteration. 78 * The mapping depends on Locale. 79 * Upper <-> Lower methods are just wrappers to provide equals() and Range() 80 * 81 * 2. 82 * equals() in IGNORE_CASE module is locale-independent and 83 * we don't provide locale-sensitive ones. 84 * The reason we provided locale-independent ones is that IGNORE_CASE is mainly 85 * dedicated to StarOffice internal code. 86 * 87 * 3. 88 * TransliterationModules is used just for convenience without calling 89 * getAvailableModule. 90 * 91 * 4. 92 * Implementation name in the methods below is not the same as | 76 * 77 * 1. 78 * We are assuming Upper to Lower mapping as one of transliteration. 79 * The mapping depends on Locale. 80 * Upper <-> Lower methods are just wrappers to provide equals() and Range() 81 * 82 * 2. 83 * equals() in IGNORE_CASE module is locale-independent and 84 * we don't provide locale-sensitive ones. 85 * The reason we provided locale-independent ones is that IGNORE_CASE is mainly 86 * dedicated to StarOffice internal code. 87 * 88 * 3. 89 * TransliterationModules is used just for convenience without calling 90 * getAvailableModule. 91 * 92 * 4. 93 * Implementation name in the methods below is not the same as |
93 * the true implemenation name registered. | 94 * the true implementation name registered. |
94 * In particular, for generic modules:"UPPERCASE_LOWERCASE", 95 * "LOWERCASE_UPPERCASE", "IGNORE_CASE", there is no registered name. 96 */ 97 98 99published interface XTransliteration: com::sun::star::uno::XInterface 100{ 101 --- 59 unchanged lines hidden (view full) --- 161 @param aImplNameList 162 Only IGNORE type modules can be specified. 163 */ 164 void loadModulesByImplNames( [in] sequence <string> aImplNameList, 165 [in] ::com::sun::star::lang::Locale aLocale ); 166 167 //------------------------------------------------------------------------ 168 /** List the available transliteration modules for a given locale. | 95 * In particular, for generic modules:"UPPERCASE_LOWERCASE", 96 * "LOWERCASE_UPPERCASE", "IGNORE_CASE", there is no registered name. 97 */ 98 99 100published interface XTransliteration: com::sun::star::uno::XInterface 101{ 102 --- 59 unchanged lines hidden (view full) --- 162 @param aImplNameList 163 Only IGNORE type modules can be specified. 164 */ 165 void loadModulesByImplNames( [in] sequence <string> aImplNameList, 166 [in] ::com::sun::star::lang::Locale aLocale ); 167 168 //------------------------------------------------------------------------ 169 /** List the available transliteration modules for a given locale. |
169 It can be filtered based on its type. | 170 It can be filtered based on its type. |
170 171 @param nType 172 A bitmask field of values defined in 173 <type>TransliterationType</type> 174 */ 175 sequence<string> getAvailableModules( 176 [in] ::com::sun::star::lang::Locale aLocale, 177 [in] short nType ); --- 4 unchanged lines hidden (view full) --- 182 object doesn't have <type>TransliterationType</type> IGNORE 183 attribute. 184 185 @param aStr 186 The input string. 187 188 @param nStartPos 189 Start position within aStr from where transliteration starts. | 171 172 @param nType 173 A bitmask field of values defined in 174 <type>TransliterationType</type> 175 */ 176 sequence<string> getAvailableModules( 177 [in] ::com::sun::star::lang::Locale aLocale, 178 [in] short nType ); --- 4 unchanged lines hidden (view full) --- 183 object doesn't have <type>TransliterationType</type> IGNORE 184 attribute. 185 186 @param aStr 187 The input string. 188 189 @param nStartPos 190 Start position within aStr from where transliteration starts. |
190 | 191 |
191 @param nCount 192 Number of codepoints to be transliterated. 193 194 @param rOffset 195 To find the grapheme of input string corresponding to the 196 grapheme of output string, rOffset provides the offset array 197 whose index is the offset of output string, the element 198 containing the position within the input string before --- 8 unchanged lines hidden (view full) --- 207 "transliteration", which equals() is based on. 208 */ 209 string folding( [in] string aInStr, [in] long nStartPos, 210 [in] long nCount, [out] sequence <long> rOffset ); 211 212 //------------------------------------------------------------------------ 213 /** Match two substrings and find if they are equivalent as per this 214 transliteration. | 192 @param nCount 193 Number of codepoints to be transliterated. 194 195 @param rOffset 196 To find the grapheme of input string corresponding to the 197 grapheme of output string, rOffset provides the offset array 198 whose index is the offset of output string, the element 199 containing the position within the input string before --- 8 unchanged lines hidden (view full) --- 208 "transliteration", which equals() is based on. 209 */ 210 string folding( [in] string aInStr, [in] long nStartPos, 211 [in] long nCount, [out] sequence <long> rOffset ); 212 213 //------------------------------------------------------------------------ 214 /** Match two substrings and find if they are equivalent as per this 215 transliteration. |
215 | 216 |
216 <p> This method can be called if the object has 217 <type>TransliterationType</type> IGNORE attribute. </p> 218 219 <p> Returns the number of matched code points in any case, even if 220 strings are not equal, for example: <br/> 221 equals( "a", 0, 1, nMatch1, "aaa", 0, 3, nMatch2 ) <br/> 222 returns <FALSE/> and nMatch:=1 and nMatch2:=1 <br/> 223 equals( "aab", 0, 3, nMatch1, "aaa", 0, 3, nMatch2 ) <br/> --- 24 unchanged lines hidden (view full) --- 248 Returns number of matched code points in aStr2. 249 250 @returns 251 <TRUE/> if the substrings are equal per this 252 transliteration <br/> 253 <FALSE/> else. 254 */ 255 | 217 <p> This method can be called if the object has 218 <type>TransliterationType</type> IGNORE attribute. </p> 219 220 <p> Returns the number of matched code points in any case, even if 221 strings are not equal, for example: <br/> 222 equals( "a", 0, 1, nMatch1, "aaa", 0, 3, nMatch2 ) <br/> 223 returns <FALSE/> and nMatch:=1 and nMatch2:=1 <br/> 224 equals( "aab", 0, 3, nMatch1, "aaa", 0, 3, nMatch2 ) <br/> --- 24 unchanged lines hidden (view full) --- 249 Returns number of matched code points in aStr2. 250 251 @returns 252 <TRUE/> if the substrings are equal per this 253 transliteration <br/> 254 <FALSE/> else. 255 */ 256 |
256 boolean equals( [in] string aStr1, [in] long nPos1, [in] long nCount1, | 257 boolean equals( [in] string aStr1, [in] long nPos1, [in] long nCount1, |
257 [out] long rMatch1, 258 [in] string aStr2, [in] long nPos2, [in] long nCount2, 259 [out] long rMatch2 ); 260 261 //------------------------------------------------------------------------ 262 /** Transliterate one set of characters to another. | 258 [out] long rMatch1, 259 [in] string aStr2, [in] long nPos2, [in] long nCount2, 260 [out] long rMatch2 ); 261 262 //------------------------------------------------------------------------ 263 /** Transliterate one set of characters to another. |
263 | 264 |
264 <p> This method is intended for getting corresponding ranges and 265 can be called if the object has <type>TransliterationType</type> 266 IGNORE attribute. </p> | 265 <p> This method is intended for getting corresponding ranges and 266 can be called if the object has <type>TransliterationType</type> 267 IGNORE attribute. </p> |
267 | 268 |
268 <p> For example: generic CASE_IGNORE transliterateRange( "a", "i" ) 269 returns {"A","I","a","i"}, transliterateRange( "a", "a" ) 270 returns {"A","A","a","a"}. </p> | 269 <p> For example: generic CASE_IGNORE transliterateRange( "a", "i" ) 270 returns {"A","I","a","i"}, transliterateRange( "a", "a" ) 271 returns {"A","A","a","a"}. </p> |
271 272 <p> Use this transliteration to create regular expresssions like | 272 273 <p> Use this transliteration to create regular expressions like |
273 [a-i] --> [A-Ia-i]. </p> | 274 [a-i] --> [A-Ia-i]. </p> |
274 | 275 |
275 @returns 276 String sequence containing corresponding transliterated 277 pairs of characters to represent a range. 278 */ 279 sequence <string> transliterateRange( [in] string aStr1, [in] string aStr2 ); 280 281 //------------------------------------------------------------------------ | 276 @returns 277 String sequence containing corresponding transliterated 278 pairs of characters to represent a range. 279 */ 280 sequence <string> transliterateRange( [in] string aStr1, [in] string aStr2 ); 281 282 //------------------------------------------------------------------------ |
282 /** Compare 2 substrings as per this transliteration. It translates both | 283 /** Compare 2 substrings as per this transliteration. It translates both |
283 substrings before comparing them. 284 285 @param aStr1 286 First string. 287 288 @param nOff1 289 Offset (from 0) of the first substring. 290 --- 26 unchanged lines hidden (view full) --- 317 0 if the first string is equal to the second string <br/> 318 -1 if the first string is less than the second string 319 */ 320 long compareString( [in] string aStr1, [in] string aStr2 ); 321 322}; 323 324//============================================================================= | 284 substrings before comparing them. 285 286 @param aStr1 287 First string. 288 289 @param nOff1 290 Offset (from 0) of the first substring. 291 --- 26 unchanged lines hidden (view full) --- 318 0 if the first string is equal to the second string <br/> 319 -1 if the first string is less than the second string 320 */ 321 long compareString( [in] string aStr1, [in] string aStr2 ); 322 323}; 324 325//============================================================================= |
326 |
|
325}; }; }; }; 326 327#endif | 327}; }; }; }; 328 329#endif |