LibreOffice
LibreOffice 7.4 SDK API Reference
XTransliteration.idl
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef __com_sun_star_i18n_XTransliteration_idl__
20 #define __com_sun_star_i18n_XTransliteration_idl__
21 
26 
27 
28 module com { module sun { module star { module i18n {
29 
30 
63 /* comment:
64  * 0.
65  * All the IGNORE-type functionalities (Range, equals) are based on mapping.
66  * except equals() method in IGNORE_CASE, which is based on Locale-independent
67  * case folding
68  * ( This second assumption is very complicated and may cause confusion of use)
69  *
70  * 1.
71  * We are assuming Upper to Lower mapping as one of transliteration.
72  * The mapping depends on Locale.
73  * Upper <-> Lower methods are just wrappers to provide equals() and Range()
74  *
75  * 2.
76  * equals() in IGNORE_CASE module is locale-independent and
77  * we don't provide locale-sensitive ones.
78  * The reason we provided locale-independent ones is that IGNORE_CASE is mainly
79  * dedicated to StarOffice internal code.
80  *
81  * 3.
82  * TransliterationModules is used just for convenience without calling
83  * getAvailableModule.
84  *
85  * 4.
86  * Implementation name in the methods below is not the same as
87  * the true implementation name registered.
88  * In particular, for generic modules:"UPPERCASE_LOWERCASE",
89  * "LOWERCASE_UPPERCASE", "IGNORE_CASE", there is no registered name.
90  */
91 
92 
94 {
95 
101  string getName();
102 
109  short getType();
110 
113  void loadModule( [in] TransliterationModules eModType,
114  [in] ::com::sun::star::lang::Locale aLocale );
115 
119  void loadModuleNew( [in] sequence <TransliterationModulesNew> aModType,
120  [in] ::com::sun::star::lang::Locale aLocale );
121 
143  void loadModuleByImplName( [in] string aImplName,
144  [in] ::com::sun::star::lang::Locale aLocale );
145 
156  void loadModulesByImplNames( [in] sequence <string> aImplNameList,
157  [in] ::com::sun::star::lang::Locale aLocale );
158 
168  sequence<string> getAvailableModules(
169  [in] ::com::sun::star::lang::Locale aLocale,
170  [in] short nType );
171 
172 
193  string transliterate( [in] string aInStr, [in] long nStartPos,
194  [in] long nCount, [out] sequence <long> rOffset );
195 
200  string folding( [in] string aInStr, [in] long nStartPos,
201  [in] long nCount, [out] sequence <long> rOffset );
202 
246  boolean equals( [in] string aStr1, [in] long nPos1, [in] long nCount1,
247  [out] long rMatch1,
248  [in] string aStr2, [in] long nPos2, [in] long nCount2,
249  [out] long rMatch2 );
250 
268  sequence <string> transliterateRange( [in] string aStr1, [in] string aStr2 );
269 
296  long compareSubstring( [in] string aStr1, [in] long nOff1, [in] long nLen1,
297  [in] string aStr2, [in] long nOff2, [in] long nLen2 );
298 
307  long compareString( [in] string aStr1, [in] string aStr2 );
308 
309 };
310 
311 }; }; }; };
312 
313 #endif
314 
315 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Character conversions like case folding or Hiragana to Katakana.
Definition: XTransliteration.idl:94
sequence< string > getAvailableModules([in] ::com::sun::star::lang::Locale aLocale, [in] short nType)
List the available transliteration modules for a given locale.
string getName()
Unique ASCII name to identify a module.
void loadModuleNew([in] sequence< TransliterationModulesNew > aModType, [in] ::com::sun::star::lang::Locale aLocale)
Load a sequence of instances of predefined modules - supersedes method XTransliteration::loadModule()...
string transliterate([in] string aInStr, [in] long nStartPos, [in] long nCount, [out] sequence< long > rOffset)
Transliterate a substring.
void loadModulesByImplNames([in] sequence< string > aImplNameList, [in] ::com::sun::star::lang::Locale aLocale)
Load a sequence of instances of transliteration modules.
string folding([in] string aInStr, [in] long nStartPos, [in] long nCount, [out] sequence< long > rOffset)
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)
Match two substrings and find if they are equivalent as per this transliteration.
void loadModule([in] TransliterationModules eModType, [in] ::com::sun::star::lang::Locale aLocale)
Load instance of predefined module - old style method.
sequence< string > transliterateRange([in] string aStr1, [in] string aStr2)
Transliterate one set of characters to another.
long compareString([in] string aStr1, [in] string aStr2)
Compare 2 strings as per this transliteration.
long compareSubstring([in] string aStr1, [in] long nOff1, [in] long nLen1, [in] string aStr2, [in] long nOff2, [in] long nLen2)
Compare 2 substrings as per this transliteration.
void loadModuleByImplName([in] string aImplName, [in] ::com::sun::star::lang::Locale aLocale)
Load instance of UNO registered module.
short getType()
Return the attribute(s) associated with this transliteration object, as defined in TransliterationTyp...
base interface of all UNO interfaces
Definition: XInterface.idl:48
TransliterationModules
Old transliteration module enumeration.
Definition: TransliterationModules.idl:35
Definition: Ambiguous.idl:22
object represents a specific geographical, political, or cultural region.
Definition: Locale.idl:38