Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / i18n / XTextConversion.idl
blobadfa7a3a5077f815a36a254910dbdcb9e53f36e6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_i18n_XTextConversion_idl__
21 #define __com_sun_star_i18n_XTextConversion_idl__
23 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/lang/Locale.idl>
25 #include <com/sun/star/i18n/TextConversionResult.idl>
26 #include <com/sun/star/lang/IllegalArgumentException.idl>
27 #include <com/sun/star/lang/NoSupportException.idl>
31 module com { module sun { module star { module i18n {
34 /** Method to convert text from one type to another
36 @since OOo 1.1.2
38 published interface XTextConversion : ::com::sun::star::uno::XInterface
40 /** Method to search dictionaries for the conversion candidates.
42 @param aText
43 Text string to be converted.
44 @param nStartPos
45 The start position in aText for the conversion
46 @param nLength
47 The length of the portion in aText for the conversion
48 @param Locale
49 Locale the conversion is referring to.
50 @param nTextConversionType
51 One of TextConversionType values.
52 @param nTextConversionOptions
53 Combination of TextConversionOption values.
54 @returns
55 TextConversionResult
57 @throws NoSupportException
58 when <var>nConversionDictionaryType</var> is not known by the implementation,
59 or when the locale is not supported.
61 TextConversionResult getConversions(
62 [in] string aText,
63 [in] long nStartPos,
64 [in] long nLength,
65 [in] ::com::sun::star::lang::Locale Locale,
66 [in] short nTextConversionType,
67 [in] long nTextConversionOptions )
68 raises( com::sun::star::lang::IllegalArgumentException,
69 com::sun::star::lang::NoSupportException );
71 /** Method to search dictionaries for the conversion candidate, if there
72 are multiple candidates, it will return first one. This is for the
73 conversion in non-interactive mode.
75 @param aText
76 Text string to be converted.
77 @param nStartPos
78 The start position in aText for the conversion
79 @param nLength
80 The length of the portion in aText for the conversion
81 @param Locale
82 Locale the conversion is referring to.
83 @param nTextConversionType
84 One of TextConversionType values.
85 @param nTextConversionOptions
86 Combination of TextConversionOption values.
87 @returns
88 Converted text
90 @throws NoSupportException
91 when <var>nConversionDictionaryType</var> is not known by the implementation,
92 or when the locale is not supported.
94 string getConversion(
95 [in] string aText,
96 [in] long nStartPos,
97 [in] long nLength,
98 [in] ::com::sun::star::lang::Locale Locale,
99 [in] short nTextConversionType,
100 [in] long nTextConversionOptions )
101 raises( com::sun::star::lang::IllegalArgumentException,
102 com::sun::star::lang::NoSupportException );
104 /** Method to query if the conversion type should be interactive or
105 non-interactive mode.
107 @param Locale
108 Locale the conversion is referring to.
109 @param nTextConversionType
110 One of TextConversionType values.
111 @param nTextConversionOptions
112 Combination of TextConversionOption values.
113 @returns
114 `TRUE` if the entry is a valid entry for the dictionary
115 `FALSE` otherwise.
117 @throws NoSupportException
118 when <var>nConversionDictionaryType</var> is not known by the implementation,
119 or when the locale is not supported.
121 boolean interactiveConversion(
122 [in] ::com::sun::star::lang::Locale Locale,
123 [in] short nTextConversionType,
124 [in] long nTextConversionOptions )
125 raises( com::sun::star::lang::IllegalArgumentException,
126 com::sun::star::lang::NoSupportException );
131 }; }; }; };
133 #endif
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */