Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / i18n / XTextConversion.idl
blobb90412f67743d3d56f96f1ff09772bc95f7dcec6
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XTextConversion.idl,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_i18n_XTextConversion_idl__
32 #define __com_sun_star_i18n_XTextConversion_idl__
34 #ifndef __com_sun_star_uno_XInterface_idl__
35 #include <com/sun/star/uno/XInterface.idl>
36 #endif
38 #ifndef __com_sun_star_lang_Locale_idl__
39 #include <com/sun/star/lang/Locale.idl>
40 #endif
42 #ifndef __com_sun_star_i18n_TextConversionResult_idl__
43 #include <com/sun/star/i18n/TextConversionResult.idl>
44 #endif
46 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47 #include <com/sun/star/lang/IllegalArgumentException.idl>
48 #endif
50 #ifndef __com_sun_star_lang_NoSupportException_idl__
51 #include <com/sun/star/lang/NoSupportException.idl>
52 #endif
55 //=============================================================================
57 module com { module sun { module star { module i18n {
59 //=============================================================================
61 /** Method to convert text from one type to another
63 @since OOo 1.1.2
65 published interface XTextConversion : ::com::sun::star::uno::XInterface
67 //---------------------------------------------------------------------
68 /** Method to search dictionaries for the conversion candidates.
70 @param aText
71 Text string to be converted.
72 @param nStartPos
73 The start position in aText for the conversion
74 @param nLength
75 The length of the partion in aText for the conversion
76 @param aLocal
77 Locale the conversion is referring to.
78 @param nTextConversionType
79 One of <type>TextConversionType</type> values.
80 @param nTextConversionOptions
81 Combination of <type>TextConversionOption</type> values.
82 @returns
83 <type>TextConversionResult</type>
85 @throws NoSupportException
86 when <var>nConversionDictionaryType</var> is not known by the implementation,
87 or when the locale is not supported.
89 TextConversionResult getConversions(
90 [in] string aText,
91 [in] long nStartPos,
92 [in] long nLength,
93 [in] ::com::sun::star::lang::Locale aLocale,
94 [in] short nTextConversionType,
95 [in] long nTextConversionOptions )
96 raises( com::sun::star::lang::IllegalArgumentException,
97 com::sun::star::lang::NoSupportException );
99 //---------------------------------------------------------------------
100 /** Method to search dictionaries for the conversion candidate, if there
101 are multiple candidates, it will return first one. This is for the
102 conversion in non-interactive mode.
104 @param aText
105 Text string to be converted.
106 @param nStartPos
107 The start position in aText for the conversion
108 @param nLength
109 The length of the partion in aText for the conversion
110 @param aLocal
111 Locale the conversion is referring to.
112 @param nTextConversionType
113 One of <type>TextConversionType</type> values.
114 @param nTextConversionOptions
115 Combination of <type>TextConversionOption</type> values.
116 @returns
117 Converted text
119 @throws NoSupportException
120 when <var>nConversionDictionaryType</var> is not known by the implementation,
121 or when the locale is not supported.
123 string getConversion(
124 [in] string aText,
125 [in] long nStartPos,
126 [in] long nLength,
127 [in] ::com::sun::star::lang::Locale aLocale,
128 [in] short nTextConversionType,
129 [in] long nTextConversionOptions )
130 raises( com::sun::star::lang::IllegalArgumentException,
131 com::sun::star::lang::NoSupportException );
133 //---------------------------------------------------------------------
134 /** Method to query if the conversion type should be interactive or
135 non-interactive mode.
137 @param aLocal
138 Locale the conversion is referring to.
139 @param nTextConversionType
140 One of <type>TextConversionType</type> values.
141 @param nTextConversionOptions
142 Combination of <type>TextConversionOption</type> values.
143 @returns
144 <TRUE/> if the entry is a valid entry for the dictionary
145 <FALSE/> otherwise.
147 @throws NoSupportException
148 when <var>nConversionDictionaryType</var> is not known by the implementation,
149 or when the locale is not supported.
151 boolean interactiveConversion(
152 [in] ::com::sun::star::lang::Locale aLocale,
153 [in] short nTextConversionType,
154 [in] long nTextConversionOptions )
155 raises( com::sun::star::lang::IllegalArgumentException,
156 com::sun::star::lang::NoSupportException );
160 //=============================================================================
162 }; }; }; };
164 #endif