Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / offapi / com / sun / star / linguistic2 / XDictionaryList.idl
blob3ca3f87e7dec3e189276e9ef0600ea630f95efb6
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 .
21 module com { module sun { module star { module linguistic2 {
23 /** is used to manage and maintain a list of dictionaries.
25 <P>A dictionary-list may be given to a spell checker or hyphenator
26 service implementation on their creation in order to supply a set
27 of dictionaries and additional information to be used for
28 those purposes.</P>
30 @see com::sun::star::linguistic2::XDictionary
31 @see com::sun::star::uno::XInterface
33 published interface XDictionaryList : com::sun::star::uno::XInterface
35 /**
36 @returns
37 the number of dictionaries in the list.
39 short getCount();
41 /**
42 @returns
43 a sequence with an entry for every dictionary
44 in the list.
46 @see com::sun::star::linguistic2::XDictionary
48 sequence<com::sun::star::linguistic2::XDictionary> getDictionaries();
50 /** searches the list for a dictionary with a given name.
52 @returns
53 the XDictionary with the specified name. If no such
54 dictionary exists, `NULL` will be returned.
56 @param aDictionaryName
57 specifies the name of the dictionary to look for.
59 @see com::sun::star::linguistic2::XDictionary
61 com::sun::star::linguistic2::XDictionary getDictionaryByName(
62 [in] string aDictionaryName );
64 /** adds a dictionary to the list.
66 <P>Additionally, the dictionary-list will add itself to the list of dictionary
67 event listeners of that dictionary.</P>
69 @returns
70 `TRUE` if the dictionary was added successfully,
71 `FALSE` otherwise.
73 @param xDictionary
74 the dictionary to be added.
76 @see com::sun::star::linguistic2::XDictionary
78 boolean addDictionary(
79 [in] com::sun::star::linguistic2::XDictionary xDictionary );
81 /** removes a single dictionary from the list.
83 <P>If the dictionary is still active, it will be deactivated
84 first. The dictionary-list will remove itself from the list of
85 dictionary event listeners of the dictionary.</P>
87 @returns
88 `TRUE` if the dictionary was removed successfully, `FALSE`
89 otherwise.
91 @param xDictionary
92 dictionary to be removed from the list of dictionaries.
94 @see com::sun::star::linguistic2::XDictionary
96 boolean removeDictionary(
97 [in] com::sun::star::linguistic2::XDictionary xDictionary );
99 /** adds an entry to the list of dictionary-list event listeners.
101 <P>On dictionary-list events, each entry in the listener list will
102 be notified via a call to
103 com::sun::star::linguistic2::XDictionaryListEventListener::processDictionaryListEvent().</P>
105 @returns
106 `TRUE` if the entry was made, `FALSE` otherwise.
107 If com::sun::star::lang::XEventListener::disposing()
108 was called before, it will always fail.
110 @param xListener
111 the object to be notified of dictionary-list events.
113 @param bReceiveVerbose
114 `TRUE` if the listener requires more detailed event
115 notification than usual.
117 @see com::sun::star::linguistic2::XDictionaryListEventListener
118 @see com::sun::star::linguistic2::XDictionaryListEvent
120 boolean addDictionaryListEventListener(
121 [in] com::sun::star::linguistic2::XDictionaryListEventListener xListener,
122 [in] boolean bReceiveVerbose );
124 /** removes an entry from the list of dictionary-list event listeners.
126 @returns
127 `TRUE` if the object to be removed was found and removed,
128 `FALSE` otherwise.
130 @param xListener
131 the object to be removed from the listener list.
133 @see com::sun::star::linguistic2::XDictionaryListEventListener
134 @see com::sun::star::linguistic2::XDictionaryListEvent
136 boolean removeDictionaryListEventListener(
137 [in] com::sun::star::linguistic2::XDictionaryListEventListener xListener );
139 /** increases request level for event buffering by one.
141 <P>The request level for event buffering is an integer
142 counter that is initially set to 0.
143 As long as the request level is not 0, events will be buffered
144 until the next flushing of the buffer.</P>
146 @returns
147 the current request level for event buffering.
149 @see com::sun::star::linguistic2::XDictionaryListEvent
150 @see com::sun::star::linguistic2::XDictionaryListEventListener
151 @see com::sun::star::linguistic2::XDictionaryList::endCollectEvents()
152 @see com::sun::star::linguistic2::XDictionaryList::flushEvents()
154 short beginCollectEvents();
156 /** flushes the event buffer and decreases the request level for
157 event buffering by one.
159 <P>There should be one matching endCollectEvents call for every
160 beginCollectEvents call. Usually you will group these around
161 some code where you do not wish to get notified of every single
162 event.</P>
164 @returns
165 the current request level for event buffering.
167 @see com::sun::star::linguistic2::XDictionaryListEvent
168 @see com::sun::star::linguistic2::XDictionaryListEventListener
169 @see com::sun::star::linguistic2::XDictionaryList::beginCollectEvents()
170 @see com::sun::star::linguistic2::XDictionaryList::flushEvents()
172 short endCollectEvents();
174 /** notifies the listeners of all buffered events and then clears
175 that buffer.
177 @returns
178 the current request level for event buffering.
180 @see com::sun::star::linguistic2::XDictionaryListEvent
181 @see com::sun::star::linguistic2::XDictionaryListEventListener
182 @see com::sun::star::linguistic2::XDictionaryList::beginCollectEvents()
183 @see com::sun::star::linguistic2::XDictionaryList::endCollectEvents()
185 short flushEvents();
187 /** creates a new dictionary.
189 @returns
190 an empty dictionary with the given name, language and type.
191 `NULL` on failure.
193 @param aName
194 is the name of the dictionary (should be unique).
196 @param aLocale
197 defines the language of the dictionary.
198 Use an empty aLocale for dictionaries which may contain
199 entries of all languages.
201 @param eDicType
202 specifies the type of the dictionary.
204 @param aURL
205 is the URL of the location where the dictionary is persistent,
206 if the XStorable interface is supported.
207 It may be empty, which means the dictionary will not be persistent.
209 @see com::sun::star::linguistic2::XDictionary
210 @see com::sun::star::lang::Locale
211 @see com::sun::star::linguistic2::DictionaryType
213 com::sun::star::linguistic2::XDictionary createDictionary(
214 [in] string aName,
215 [in] com::sun::star::lang::Locale aLocale,
216 [in] com::sun::star::linguistic2::DictionaryType eDicType,
217 [in] string aURL );
222 }; }; }; };
224 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */