1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XConversionDictionaryList.idl,v $
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 ************************************************************************/
30 #ifndef __com_sun_star_linguistic2_XConversionDictionaryList_idl__
31 #define __com_sun_star_linguistic2_XConversionDictionaryList_idl__
34 #ifndef __com_sun_star_uno_XInterface_idl__
35 #include
<com
/sun
/star
/uno
/XInterface.idl
>
38 #ifndef __com_sun_star_container_XNameContainer_idl__
39 #include
<com
/sun
/star
/container
/XNameContainer.idl
>
42 #ifndef __com_sun_star_linguistic2_XConversionDictionary_idl__
43 #include
<com
/sun
/star
/linguistic2
/XConversionDictionary.idl
>
46 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
50 #ifndef __com_sun_star_lang_NoSupportException_idl__
51 #include
<com
/sun
/star
/lang
/NoSupportException.idl
>
54 #ifndef __com_sun_star_container_ElementExistException_idl__
55 #include
<com
/sun
/star
/container
/ElementExistException.idl
>
59 //=============================================================================
61 module com
{ module sun
{ module star
{ module linguistic2
{
63 //=============================================================================
64 /** is used to manage and maintain a list of conversion dictionaries.
66 <p>The dictionaries added to the list may or may not support the
67 <type scope="com::sun::star::util">XFlushable</type> interface.
68 If they do those dictionaries have to be flushed upon termination
69 of the dictionary list.</p>
73 published
interface XConversionDictionaryList
: com
::sun
::star
::uno
::XInterface
75 //-------------------------------------------------------------------------
78 the name container interface to the dictionaries in the list.
80 <p>The interface can be used to add, remove or retrieve dictionaries
81 from the list by specifying the name of the dictionary, and
82 (in case of inserting) the interface to the dictionary as second
85 <p>A dictionary to be added must support the
86 <type scope="com::sun::star::linguistic2">XConversionDictionary</type>
88 The dictionary to be added needs not necessarily be created by
91 <p>The <member scope="com::sun::star::container::XNameReplace">replaceByName</member>
92 function is implemented empty since renaming of dictionaries
95 com
::sun
::star
::container
::XNameContainer getDictionaryContainer
();
97 //-------------------------------------------------------------------------
98 /** creates a new dictionary and adds it to the dictionary list.
100 <p>The dictionary will be empty and active.</p>
103 an empty dictionary with the given name, locale and
108 is the name of the dictionary (should be unique).
111 defines the language of the dictionary.
113 @param nConversionDictionaryType
114 One of <type scope="com::sun::star::linguistic2">ConversionDictionaryType</type> values.
116 @throws NoSupportException
117 when <var>nConversionDictionaryType</var> is not known by the implementation.
119 @throws ElementExistException
120 when a dictionary with the specified name already exists.
122 com
::sun
::star
::linguistic2
::XConversionDictionary addNewDictionary
(
124 [in] com
::sun
::star
::lang
::Locale aLocale
,
125 [in] short nConversionDictionaryType
)
126 raises
( com
::sun
::star
::lang
::NoSupportException
,
127 com
::sun
::star
::container
::ElementExistException
);
129 //-------------------------------------------------------------------------
130 /** searches for entries that match the given text.
132 <p>All active dictionaries with matching locales and conversion
133 type will be searched
134 for entries matching the given text.</p>
136 <p>The exact string to be looked for is the substring from the
137 aText parameter that starts at position nStartPos and has the
141 the list of entries found. If no entry was found,
145 the text where the substring to be looked for will be taken from.
147 the starting pos of the substring to be looked for.
149 the length of the substring to be looked for.
153 Locale the conversion is refered to.
155 @param nConversionDictionaryType
156 specifies the type of conversion the dictionary
157 can be used for. It is one of
158 <type scope="com::sun::star::linguistic2">ConversionDictionaryType</type>.
160 @param eConversionDirection
161 specifies the direction of the conversion to look for.
163 <type scope="com::sun::star::linguistic2">ConversionDirection</type>.
165 @param nTextConversionOptions
166 Combination of <type scope="com::sun::star::i18n">TextConversionOption</type>
169 @throws com::sun::star::lang::IllegalArgumentException
170 if the nTextConversionOptions parameter is invalid for
173 @throws NoSupportException
174 when <var>nConversionDictionaryType</var> is not known by the implementation,
175 or when the locale is not supported (i.e. there are no dictionaries
176 for that locale available).
178 sequence
< string > queryConversions
(
182 [in] com
::sun
::star
::lang
::Locale aLocale
,
183 [in] short nConversionDictionaryType
,
184 [in] com
::sun
::star
::linguistic2
::ConversionDirection eDirection
,
185 [in] long nTextConversionOptions
)
186 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
187 com
::sun
::star
::lang
::NoSupportException
);
189 //-------------------------------------------------------------------------
190 /** returns the maximum number of characters used as left or right text
193 <p>All active dictionaries of the specified locale and type
194 will be looked up to get the result.</p>
195 <p>The parameter eDirection specifies if only the left text or the
196 right text from entries should be considered.</p>
199 Locale the conversion is refered to.
200 @param nConversionDictionaryType
201 specifies the type of conversion dictionaries to be looked up.
203 <type scope="com::sun::star::linguistic2">ConversionDictionaryType</type>.
205 specifies if the left text or the right text of entries will
208 @see com::sun::star::linguistic2::ConversionDirection
210 short queryMaxCharCount
(
211 [in] com
::sun
::star
::lang
::Locale aLocale
,
212 [in] short nConversionDictionaryType
,
213 [in] com
::sun
::star
::linguistic2
::ConversionDirection eDirection
);
217 //=============================================================================