1/**************************************************************
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
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
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.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_i18n_XExtendedTransliteration_idl__
25#define __com_sun_star_i18n_XExtendedTransliteration_idl__
26
27#include <com/sun/star/i18n/XTransliteration.idl>
28#include <MultipleCharsOutputException.idl>
29
30//=============================================================================
31
32module com { module sun { module star { module i18n {
33
34//=============================================================================
35
36
37/**
38    This interface provides character conversions like case folding or
39    Hiragana to Katakana.
40
41    <p> It is derived from
42    <type scope="::com::sun::star::i18n">XTransliteration</type> and provides
43    additional functionality for character to character and
44    string to string without offset parameter transliteration. These
45    should be used for performance reason if their full-blown
46    counterparts aren't neded.  </p>
47
48	 @since OpenOffice 1.1.2
49 */
50published interface XExtendedTransliteration : ::com::sun::star::i18n::XTransliteration
51{
52    //------------------------------------------------------------------------
53    /** Transliterate a substring. The functionality is the same as
54        <member scope="::com::sun::star::i18n">XTransliteration::transliterate()</member>
55        but omits the offset prameter to improve performance.
56
57        @param aStr
58            The input string.
59
60        @param nStartPos
61            Start position within aStr from where transliteration starts.
62
63        @param nCount
64            Number of codepoints to be transliterated.
65
66     */
67    string  transliterateString2String( [in] string aStr,
68            [in] long nStartPos, [in] long nCount );
69
70
71    //------------------------------------------------------------------------
72    /** Transliterate a character to a string.
73
74        @param cChar
75            The input character.
76     */
77    string  transliterateChar2String( [in] char cChar );
78
79    //------------------------------------------------------------------------
80    /** Transliterate a character to a character.
81
82        <p> If the output contains multiple characters, for example when
83        transliterating German sharp 's' (the one that looks like a
84        Greek Beta) to upper case "SS", MultipleCharsOutputException
85        will be thrown, the caller must catch the exception and then
86        call
87        <method>XTransliteration::transliterateChar2String()</method> to
88        obtain the correct result. </p>
89
90        @param cChar
91            The input character.
92     */
93    char    transliterateChar2Char( [in] char cChar )
94                raises( MultipleCharsOutputException );
95
96};
97
98//=============================================================================
99}; }; }; };
100
101#endif
102