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 ************************************************************************/
27 #ifndef __com_sun_star_linguistic2_XDictionaryList_idl__
28 #define __com_sun_star_linguistic2_XDictionaryList_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 #ifndef __com_sun_star_linguistic2_XDictionary_idl__
35 #include
<com
/sun
/star
/linguistic2
/XDictionary.idl
>
38 #ifndef __com_sun_star_linguistic2_XDictionaryListEventListener_idl__
39 #include
<com
/sun
/star
/linguistic2
/XDictionaryListEventListener.idl
>
42 //=============================================================================
44 module com
{ module sun
{ module star
{ module linguistic2
{
46 //=============================================================================
47 /** is used to manage and maintain a list of dictionaries.
49 <P>A dictionary-list may be given to a spellchecker or hyphenator
50 service implementation on their creation in order to supply a set
51 of dictionaries and additional information to be used for
54 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
55 @see <type scope="com::sun::star::uno">XInterface</type>
57 published
interface XDictionaryList
: com
::sun
::star
::uno
::XInterface
59 //-------------------------------------------------------------------------
62 the number of dictionaries in the list.
66 //-------------------------------------------------------------------------
69 a sequence with an entry for every dictionary
72 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
74 sequence
<com
::sun
::star
::linguistic2
::XDictionary
> getDictionaries
();
76 //-------------------------------------------------------------------------
77 /** searches the list for a dictionary with a given name.
80 the XDictionary with the specified name. If no such
81 dictionary exists, <NULL/> will be returned.
83 @param aDictionaryName
84 specifies the name of the dictionary to look for.
86 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
88 com
::sun
::star
::linguistic2
::XDictionary getDictionaryByName
(
89 [in] string aDictionaryName
);
91 //-------------------------------------------------------------------------
92 /** adds a dictionary to the list.
94 <P>Additionally, the dictionary-list will add itself to the list of dictionary
95 event listeners of that dictionary.</P>
98 <TRUE/> if the dictionary was added successfully,
102 the dictionary to be added.
104 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
106 boolean addDictionary
(
107 [in] com
::sun
::star
::linguistic2
::XDictionary xDictionary
);
109 //-------------------------------------------------------------------------
110 /** removes a single dictionary from the list.
112 <P>If the dictionary is still active, it will be deactivated
113 first. The dictionary-list will remove itself from the list of
114 dictionary event listeners of the dictionary.</P>
117 <TRUE/> if the dictionary was removed successfully, <FALSE/>
121 dictionary to be removed from the list of dictionaries.
123 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
125 boolean removeDictionary
(
126 [in] com
::sun
::star
::linguistic2
::XDictionary xDictionary
);
128 //-------------------------------------------------------------------------
129 /** adds an entry to the list of dictionary-list event listeners.
131 <P>On dictionary-list events, each entry in the listener list will
132 be notified via a call to
133 <member scope="com::sun::star::linguistic2">XDictionaryListEventListener::processDictionaryListEvent</member>.</P>
136 <TRUE/> if the entry was made, <FALSE/> otherwise.
137 If <member scope="com::sun::star::lang">XEventListener::disposing</member>
138 was called before, it will always fail.
141 the object to be notified of dictionary-list events.
143 @param bReceiveVerbose
144 <TRUE/> if the listener requires more detailed event
145 notification than usual.
147 @see <type scope="com::sun::star::linguistic2">XDictionaryListEventListener</type>
148 @see <type scope="com::sun::star::linguistic2">XDictionaryListEvent</type>
150 boolean addDictionaryListEventListener
(
151 [in] com
::sun
::star
::linguistic2
::XDictionaryListEventListener xListener
,
152 [in] boolean bReceiveVerbose
);
154 //-------------------------------------------------------------------------
155 /** removes an entry from the list of dictionary-list event listeners.
158 <TRUE/> if the object to be removed was found and removed,
162 the object to be removed from the listener list.
164 @see <type scope="com::sun::star::linguistic2">XDictionaryListEventListener</type>
165 @see <type scope="com::sun::star::linguistic2">XDictionaryListEvent</type>
167 boolean removeDictionaryListEventListener
(
168 [in] com
::sun
::star
::linguistic2
::XDictionaryListEventListener xListener
);
170 //-------------------------------------------------------------------------
171 /** increases request level for event buffering by one.
173 <P>The request level for event buffering is an integer
174 counter that is initially set to 0.
175 As long as the request level is not 0, events will be buffered
176 until the next flushing of the buffer.</P>
179 the current request level for event buffering.
181 @see <type scope="com::sun::star::linguistic2">XDictionaryListEvent</type>
182 @see <type scope="com::sun::star::linguistic2">XDictionaryListEventListener</type>
183 @see <member scope="com::sun::star::linguistic2">XDictionaryList::endCollectEvents</member>
184 @see <member scope="com::sun::star::linguistic2">XDictionaryList::flushEvents</member>
186 short beginCollectEvents
();
188 //-------------------------------------------------------------------------
189 /** flushes the event buffer and decreases the request level for
190 event buffering by one.
192 <P>There should be one matching endCollectEvents call for every
193 beginCollectEvents call. Usually you will group these around
194 some code where you do not wish to get notfied of every single
198 the current request level for event buffering.
200 @see <type scope="com::sun::star::linguistic2">XDictionaryListEvent</type>
201 @see <type scope="com::sun::star::linguistic2">XDictionaryListEventListener</type>
202 @see <member scope="com::sun::star::linguistic2">XDictionaryList::beginCollectEvents</member>
203 @see <member scope="com::sun::star::linguistic2">XDictionaryList::flushEvents</member>
205 short endCollectEvents
();
207 //-------------------------------------------------------------------------
208 /** notifies the listeners of all buffered events and then clears
212 the current request level for event buffering.
214 @see <type scope="com::sun::star::linguistic2">XDictionaryListEvent</type>
215 @see <type scope="com::sun::star::linguistic2">XDictionaryListEventListener</type>
216 @see <member scope="com::sun::star::linguistic2">XDictionaryList::beginCollectEvents</member>
217 @see <member scope="com::sun::star::linguistic2">XDictionaryList::endCollectEvents</member>
221 //-------------------------------------------------------------------------
222 /** creates a new dictionary.
225 an empty dictionary with the given name, language and type.
229 is the name of the dictionary (should be unique).
232 defines the language of the dictionary.
233 Use an empty aLocale for dictionaries which may contain
234 entries of all languages.
237 specifies the type of the dictionary.
240 is the URL of the location where the dictionary is persistent,
241 if the XStorable interface is supported.
242 It may be empty, which means the dictionary will not be persistent.
244 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
245 @see <type scope="com::sun::star::lang">Locale</type>
246 @see <type scope="com::sun::star::linguistic2">DictionaryType</type>
248 com
::sun
::star
::linguistic2
::XDictionary createDictionary
(
250 [in] com
::sun
::star
::lang
::Locale aLocale
,
251 [in] com
::sun
::star
::linguistic2
::DictionaryType eDicType
,
256 //=============================================================================