1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_linguistic2_XDictionaryList_idl__
29 #define __com_sun_star_linguistic2_XDictionaryList_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
32 #include
<com
/sun
/star
/linguistic2
/XDictionary.idl
>
33 #include
<com
/sun
/star
/linguistic2
/XDictionaryListEventListener.idl
>
35 //=============================================================================
37 module com
{ module sun
{ module star
{ module linguistic2
{
39 //=============================================================================
40 /** is used to manage and maintain a list of dictionaries.
42 <P>A dictionary-list may be given to a spell checker or hyphenator
43 service implementation on their creation in order to supply a set
44 of dictionaries and additional information to be used for
47 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
48 @see <type scope="com::sun::star::uno">XInterface</type>
50 published
interface XDictionaryList
: com
::sun
::star
::uno
::XInterface
52 //-------------------------------------------------------------------------
55 the number of dictionaries in the list.
59 //-------------------------------------------------------------------------
62 a sequence with an entry for every dictionary
65 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
67 sequence
<com
::sun
::star
::linguistic2
::XDictionary
> getDictionaries
();
69 //-------------------------------------------------------------------------
70 /** searches the list for a dictionary with a given name.
73 the XDictionary with the specified name. If no such
74 dictionary exists, <NULL/> will be returned.
76 @param aDictionaryName
77 specifies the name of the dictionary to look for.
79 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
81 com
::sun
::star
::linguistic2
::XDictionary getDictionaryByName
(
82 [in] string aDictionaryName
);
84 //-------------------------------------------------------------------------
85 /** adds a dictionary to the list.
87 <P>Additionally, the dictionary-list will add itself to the list of dictionary
88 event listeners of that dictionary.</P>
91 <TRUE/> if the dictionary was added successfully,
95 the dictionary to be added.
97 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
99 boolean addDictionary
(
100 [in] com
::sun
::star
::linguistic2
::XDictionary xDictionary
);
102 //-------------------------------------------------------------------------
103 /** removes a single dictionary from the list.
105 <P>If the dictionary is still active, it will be deactivated
106 first. The dictionary-list will remove itself from the list of
107 dictionary event listeners of the dictionary.</P>
110 <TRUE/> if the dictionary was removed successfully, <FALSE/>
114 dictionary to be removed from the list of dictionaries.
116 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
118 boolean removeDictionary
(
119 [in] com
::sun
::star
::linguistic2
::XDictionary xDictionary
);
121 //-------------------------------------------------------------------------
122 /** adds an entry to the list of dictionary-list event listeners.
124 <P>On dictionary-list events, each entry in the listener list will
125 be notified via a call to
126 <member scope="com::sun::star::linguistic2">XDictionaryListEventListener::processDictionaryListEvent</member>.</P>
129 <TRUE/> if the entry was made, <FALSE/> otherwise.
130 If <member scope="com::sun::star::lang">XEventListener::disposing</member>
131 was called before, it will always fail.
134 the object to be notified of dictionary-list events.
136 @param bReceiveVerbose
137 <TRUE/> if the listener requires more detailed event
138 notification than usual.
140 @see <type scope="com::sun::star::linguistic2">XDictionaryListEventListener</type>
141 @see <type scope="com::sun::star::linguistic2">XDictionaryListEvent</type>
143 boolean addDictionaryListEventListener
(
144 [in] com
::sun
::star
::linguistic2
::XDictionaryListEventListener xListener
,
145 [in] boolean bReceiveVerbose
);
147 //-------------------------------------------------------------------------
148 /** removes an entry from the list of dictionary-list event listeners.
151 <TRUE/> if the object to be removed was found and removed,
155 the object to be removed from the listener list.
157 @see <type scope="com::sun::star::linguistic2">XDictionaryListEventListener</type>
158 @see <type scope="com::sun::star::linguistic2">XDictionaryListEvent</type>
160 boolean removeDictionaryListEventListener
(
161 [in] com
::sun
::star
::linguistic2
::XDictionaryListEventListener xListener
);
163 //-------------------------------------------------------------------------
164 /** increases request level for event buffering by one.
166 <P>The request level for event buffering is an integer
167 counter that is initially set to 0.
168 As long as the request level is not 0, events will be buffered
169 until the next flushing of the buffer.</P>
172 the current request level for event buffering.
174 @see <type scope="com::sun::star::linguistic2">XDictionaryListEvent</type>
175 @see <type scope="com::sun::star::linguistic2">XDictionaryListEventListener</type>
176 @see <member scope="com::sun::star::linguistic2">XDictionaryList::endCollectEvents</member>
177 @see <member scope="com::sun::star::linguistic2">XDictionaryList::flushEvents</member>
179 short beginCollectEvents
();
181 //-------------------------------------------------------------------------
182 /** flushes the event buffer and decreases the request level for
183 event buffering by one.
185 <P>There should be one matching endCollectEvents call for every
186 beginCollectEvents call. Usually you will group these around
187 some code where you do not wish to get notified of every single
191 the current request level for event buffering.
193 @see <type scope="com::sun::star::linguistic2">XDictionaryListEvent</type>
194 @see <type scope="com::sun::star::linguistic2">XDictionaryListEventListener</type>
195 @see <member scope="com::sun::star::linguistic2">XDictionaryList::beginCollectEvents</member>
196 @see <member scope="com::sun::star::linguistic2">XDictionaryList::flushEvents</member>
198 short endCollectEvents
();
200 //-------------------------------------------------------------------------
201 /** notifies the listeners of all buffered events and then clears
205 the current request level for event buffering.
207 @see <type scope="com::sun::star::linguistic2">XDictionaryListEvent</type>
208 @see <type scope="com::sun::star::linguistic2">XDictionaryListEventListener</type>
209 @see <member scope="com::sun::star::linguistic2">XDictionaryList::beginCollectEvents</member>
210 @see <member scope="com::sun::star::linguistic2">XDictionaryList::endCollectEvents</member>
214 //-------------------------------------------------------------------------
215 /** creates a new dictionary.
218 an empty dictionary with the given name, language and type.
222 is the name of the dictionary (should be unique).
225 defines the language of the dictionary.
226 Use an empty aLocale for dictionaries which may contain
227 entries of all languages.
230 specifies the type of the dictionary.
233 is the URL of the location where the dictionary is persistent,
234 if the XStorable interface is supported.
235 It may be empty, which means the dictionary will not be persistent.
237 @see <type scope="com::sun::star::linguistic2">XDictionary</type>
238 @see <type scope="com::sun::star::lang">Locale</type>
239 @see <type scope="com::sun::star::linguistic2">DictionaryType</type>
241 com
::sun
::star
::linguistic2
::XDictionary createDictionary
(
243 [in] com
::sun
::star
::lang
::Locale aLocale
,
244 [in] com
::sun
::star
::linguistic2
::DictionaryType eDicType
,
249 //=============================================================================
255 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */