merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / i18n / XTextConversion.idl
blob0e22052ff93e08657cc3e4888c8f27da06c1c054
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef __com_sun_star_i18n_XTextConversion_idl__
29 #define __com_sun_star_i18n_XTextConversion_idl__
31 #ifndef __com_sun_star_uno_XInterface_idl__
32 #include <com/sun/star/uno/XInterface.idl>
33 #endif
35 #ifndef __com_sun_star_lang_Locale_idl__
36 #include <com/sun/star/lang/Locale.idl>
37 #endif
39 #ifndef __com_sun_star_i18n_TextConversionResult_idl__
40 #include <com/sun/star/i18n/TextConversionResult.idl>
41 #endif
43 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
44 #include <com/sun/star/lang/IllegalArgumentException.idl>
45 #endif
47 #ifndef __com_sun_star_lang_NoSupportException_idl__
48 #include <com/sun/star/lang/NoSupportException.idl>
49 #endif
52 //=============================================================================
54 module com { module sun { module star { module i18n {
56 //=============================================================================
58 /** Method to convert text from one type to another
60 @since OOo 1.1.2
62 published interface XTextConversion : ::com::sun::star::uno::XInterface
64 //---------------------------------------------------------------------
65 /** Method to search dictionaries for the conversion candidates.
67 @param aText
68 Text string to be converted.
69 @param nStartPos
70 The start position in aText for the conversion
71 @param nLength
72 The length of the partion in aText for the conversion
73 @param aLocal
74 Locale the conversion is referring to.
75 @param nTextConversionType
76 One of <type>TextConversionType</type> values.
77 @param nTextConversionOptions
78 Combination of <type>TextConversionOption</type> values.
79 @returns
80 <type>TextConversionResult</type>
82 @throws NoSupportException
83 when <var>nConversionDictionaryType</var> is not known by the implementation,
84 or when the locale is not supported.
86 TextConversionResult getConversions(
87 [in] string aText,
88 [in] long nStartPos,
89 [in] long nLength,
90 [in] ::com::sun::star::lang::Locale aLocale,
91 [in] short nTextConversionType,
92 [in] long nTextConversionOptions )
93 raises( com::sun::star::lang::IllegalArgumentException,
94 com::sun::star::lang::NoSupportException );
96 //---------------------------------------------------------------------
97 /** Method to search dictionaries for the conversion candidate, if there
98 are multiple candidates, it will return first one. This is for the
99 conversion in non-interactive mode.
101 @param aText
102 Text string to be converted.
103 @param nStartPos
104 The start position in aText for the conversion
105 @param nLength
106 The length of the partion in aText for the conversion
107 @param aLocal
108 Locale the conversion is referring to.
109 @param nTextConversionType
110 One of <type>TextConversionType</type> values.
111 @param nTextConversionOptions
112 Combination of <type>TextConversionOption</type> values.
113 @returns
114 Converted text
116 @throws NoSupportException
117 when <var>nConversionDictionaryType</var> is not known by the implementation,
118 or when the locale is not supported.
120 string getConversion(
121 [in] string aText,
122 [in] long nStartPos,
123 [in] long nLength,
124 [in] ::com::sun::star::lang::Locale aLocale,
125 [in] short nTextConversionType,
126 [in] long nTextConversionOptions )
127 raises( com::sun::star::lang::IllegalArgumentException,
128 com::sun::star::lang::NoSupportException );
130 //---------------------------------------------------------------------
131 /** Method to query if the conversion type should be interactive or
132 non-interactive mode.
134 @param aLocal
135 Locale the conversion is referring to.
136 @param nTextConversionType
137 One of <type>TextConversionType</type> values.
138 @param nTextConversionOptions
139 Combination of <type>TextConversionOption</type> values.
140 @returns
141 <TRUE/> if the entry is a valid entry for the dictionary
142 <FALSE/> otherwise.
144 @throws NoSupportException
145 when <var>nConversionDictionaryType</var> is not known by the implementation,
146 or when the locale is not supported.
148 boolean interactiveConversion(
149 [in] ::com::sun::star::lang::Locale aLocale,
150 [in] short nTextConversionType,
151 [in] long nTextConversionOptions )
152 raises( com::sun::star::lang::IllegalArgumentException,
153 com::sun::star::lang::NoSupportException );
157 //=============================================================================
159 }; }; }; };
161 #endif