1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_i18n_XExtendedTextConversion_idl__
29#define __com_sun_star_i18n_XExtendedTextConversion_idl__
30
31#include <com/sun/star/i18n/XTextConversion.idl>
32
33//=============================================================================
34
35module com { module sun { module star { module i18n {
36
37//=============================================================================
38
39
40/**
41    This interface provides Text Conversion service.
42
43    <p> It is derived from
44    <type scope="::com::sun::star::i18n">XTextConversion</type> and provides
45    a new conversion function containing position map (offset) between original
46    and conveted string. </p>
47
48	 @since OOo 2.0
49 */
50published interface XExtendedTextConversion : ::com::sun::star::i18n::XTextConversion
51{
52    //-------------------------------------------------------------------------
53    /**
54        The functionality of this method is same as
55        <member scope="::com::sun::star::i18n">XTextConversion::getConversion()</member>,
56        except an additional output parameter rOffset.
57
58        @param rOffset
59            To find the grapheme of input string corresponding to the
60            grapheme of output string, rOffset provides the offset array
61            whose index is the offset of output string, the element
62            containing the position within the input string.
63            When the graphemes of input and output strings are simple
64            one to one mapping, to improve the performance, returned
65            rOffset will be a zero length array.
66     */
67	string getConversionWithOffset(
68            [in] string aText,
69            [in] long nStartPos,
70            [in] long nLength,
71            [in] ::com::sun::star::lang::Locale aLocale,
72            [in] short nTextConversionType,
73            [in] long nTextConversionOptions,
74            [out] sequence <long> rOffset )
75        raises( com::sun::star::lang::IllegalArgumentException,
76                com::sun::star::lang::NoSupportException );
77};
78
79//=============================================================================
80}; }; }; };
81
82#endif
83