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_XExtendedTextConversion_idl__
25#define __com_sun_star_i18n_XExtendedTextConversion_idl__
26
27#include <com/sun/star/i18n/XTextConversion.idl>
28
29//=============================================================================
30
31module com { module sun { module star { module i18n {
32
33//=============================================================================
34
35
36/**
37    This interface provides Text Conversion service.
38
39    <p> It is derived from
40    <type scope="::com::sun::star::i18n">XTextConversion</type> and provides
41    a new conversion function containing position map (offset) between original
42    and conveted string. </p>
43
44	 @since OpenOffice 2.0
45 */
46published interface XExtendedTextConversion : ::com::sun::star::i18n::XTextConversion
47{
48    //-------------------------------------------------------------------------
49    /**
50        The functionality of this method is same as
51        <member scope="::com::sun::star::i18n">XTextConversion::getConversion()</member>,
52        except an additional output parameter rOffset.
53
54        @param rOffset
55            To find the grapheme of input string corresponding to the
56            grapheme of output string, rOffset provides the offset array
57            whose index is the offset of output string, the element
58            containing the position within the input string.
59            When the graphemes of input and output strings are simple
60            one to one mapping, to improve the performance, returned
61            rOffset will be a zero length array.
62     */
63	string getConversionWithOffset(
64            [in] string aText,
65            [in] long nStartPos,
66            [in] long nLength,
67            [in] ::com::sun::star::lang::Locale aLocale,
68            [in] short nTextConversionType,
69            [in] long nTextConversionOptions,
70            [out] sequence <long> rOffset )
71        raises( com::sun::star::lang::IllegalArgumentException,
72                com::sun::star::lang::NoSupportException );
73};
74
75//=============================================================================
76}; }; }; };
77
78#endif
79