1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef __com_sun_star_linguistic2_XConversionDictionaryList_idl__
20 #define __com_sun_star_linguistic2_XConversionDictionaryList_idl__
23 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/container
/XNameContainer.idl
>
25 #include
<com
/sun
/star
/linguistic2
/XConversionDictionary.idl
>
26 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
27 #include
<com
/sun
/star
/lang
/NoSupportException.idl
>
28 #include
<com
/sun
/star
/container
/ElementExistException.idl
>
32 module com
{ module sun
{ module star
{ module linguistic2
{
34 /** is used to manage and maintain a list of conversion dictionaries.
36 <p>The dictionaries added to the list may or may not support the
37 com::sun::star::util::XFlushable interface.
38 If they do those dictionaries have to be flushed upon termination
39 of the dictionary list.</p>
43 published
interface XConversionDictionaryList
: com
::sun
::star
::uno
::XInterface
47 the name container interface to the dictionaries in the list.
49 <p>The interface can be used to add, remove or retrieve dictionaries
50 from the list by specifying the name of the dictionary, and
51 (in case of inserting) the interface to the dictionary as second
54 <p>A dictionary to be added must support the
55 com::sun::star::linguistic2::XConversionDictionary
57 The dictionary to be added needs not necessarily be created by
60 <p>The com::sun::star::container::XNameReplace::replaceByName
61 function is implemented empty since renaming of dictionaries
64 com
::sun
::star
::container
::XNameContainer getDictionaryContainer
();
66 /** creates a new dictionary and adds it to the dictionary list.
68 <p>The dictionary will be empty and active.</p>
71 an empty dictionary with the given name, locale and
76 is the name of the dictionary (should be unique).
79 defines the language of the dictionary.
81 @param nConversionDictionaryType
82 One of com::sun::star::linguistic2::ConversionDictionaryType values.
84 @throws NoSupportException
85 when <var>nConversionDictionaryType</var> is not known by the implementation.
87 @throws ElementExistException
88 when a dictionary with the specified name already exists.
90 com
::sun
::star
::linguistic2
::XConversionDictionary addNewDictionary
(
92 [in] com
::sun
::star
::lang
::Locale aLocale
,
93 [in] short nConversionDictionaryType
)
94 raises
( com
::sun
::star
::lang
::NoSupportException
,
95 com
::sun
::star
::container
::ElementExistException
);
97 /** searches for entries that match the given text.
99 <p>All active dictionaries with matching locales and conversion
100 type will be searched
101 for entries matching the given text.</p>
103 <p>The exact string to be looked for is the substring from the
104 aText parameter that starts at position nStartPos and has the
108 the list of entries found. If no entry was found,
112 the text where the substring to be looked for will be taken from.
114 the starting pos of the substring to be looked for.
116 the length of the substring to be looked for.
120 Locale the conversion is referred to.
122 @param nConversionDictionaryType
123 specifies the type of conversion the dictionary
124 can be used for. It is one of
125 com::sun::star::linguistic2::ConversionDictionaryType.
128 specifies the direction of the conversion to look for.
130 com::sun::star::linguistic2::ConversionDirection.
132 @param nTextConversionOptions
133 Combination of com::sun::star::i18n::TextConversionOption
136 @throws com::sun::star::lang::IllegalArgumentException
137 if the nTextConversionOptions parameter is invalid for
140 @throws NoSupportException
141 when <var>nConversionDictionaryType</var> is not known by the implementation,
142 or when the locale is not supported (i.e. there are no dictionaries
143 for that locale available).
145 sequence
< string > queryConversions
(
149 [in] com
::sun
::star
::lang
::Locale aLocale
,
150 [in] short nConversionDictionaryType
,
151 [in] com
::sun
::star
::linguistic2
::ConversionDirection eDirection
,
152 [in] long nTextConversionOptions
)
153 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
154 com
::sun
::star
::lang
::NoSupportException
);
156 /** returns the maximum number of characters used as left or right text
159 <p>All active dictionaries of the specified locale and type
160 will be looked up to get the result.</p>
161 <p>The parameter eDirection specifies if only the left text or the
162 right text from entries should be considered.</p>
165 Locale the conversion is referred to.
166 @param nConversionDictionaryType
167 specifies the type of conversion dictionaries to be looked up.
169 com::sun::star::linguistic2::ConversionDictionaryType.
171 specifies if the left text or the right text of entries will
174 @see com::sun::star::linguistic2::ConversionDirection
176 short queryMaxCharCount
(
177 [in] com
::sun
::star
::lang
::Locale aLocale
,
178 [in] short nConversionDictionaryType
,
179 [in] com
::sun
::star
::linguistic2
::ConversionDirection eDirection
);
188 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */