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 .
21 module com
{ module sun
{ module star
{ module linguistic2
{
23 /** This interfaces enables the object to access personal dictionaries.
25 <P>Personal dictionaries are used to supply additional
26 information for spell checking and hyphenation (see
27 com::sun::star::linguistic2::XDictionaryEntry).
28 Only active dictionaries with an appropriate language are used
30 The entries of an active, positive dictionary are words that are
31 required to be recognized as correct during the spell checking
32 process. Additionally, they will be used for hyphenation.
33 Entries of a negative dictionary are required to be recognized
34 as negative words, for example, words that should not be used, during
35 SPELLCHECK. An entry in a negative dictionary may supply a
36 proposal for a word to be used instead of the one being used.</P>
38 @see com::sun::star::linguistic2::XDictionaryEvent
39 @see com::sun::star::container::XNamed
41 published
interface XDictionary
: com
::sun
::star
::container
::XNamed
43 /** returns the type of the dictionary.
46 the type of the dictionary.
48 @see com::sun::star::linguistic2::DictionaryType
50 com
::sun
::star
::linguistic2
::DictionaryType getDictionaryType
();
52 /** specifies whether the dictionary should be used or not .
55 `TRUE` if the dictionary should be used, `FALSE` otherwise.
58 void setActive
( [in] boolean bActivate
);
62 `TRUE` if the dictionary is active, `FALSE` otherwise.
68 the number of entries in the dictionary.
74 the language of the dictionary.
76 @see com::sun::star::lang::Locale
78 com
::sun
::star
::lang
::Locale getLocale
();
80 /** is used to set the language of the dictionary.
83 the new language of the dictionary.
85 @see com::sun::star::lang::Locale
87 void setLocale
( [in] com
::sun
::star
::lang
::Locale aLocale
);
89 /** searches for an entry that matches the given word.
92 the reference to the entry found. If no entry was found,
96 the word to be looked for.
98 @see com::sun::star::linguistic2::XDictionaryEntry
100 com
::sun
::star
::linguistic2
::XDictionaryEntry getEntry
( [in] string aWord
);
102 /** is used to add an entry to the dictionary.
104 <P>If an entry already exists, the dictionary remains unchanged
105 and `FALSE` will be returned.</P>
107 <P>In positive dictionaries only positive entries
108 can be made, and in negative ones only negative entries.</P>
111 the entry to be added.
114 `TRUE` if the entry was successfully added `FALSE` otherwise.
116 @see com::sun::star::linguistic2::XDictionaryEntry
117 @see com::sun::star::linguistic2::DictionaryType
120 [in] com
::sun
::star
::linguistic2
::XDictionaryEntry xDicEntry
);
122 /** is used to make an entry in the dictionary.
124 <P>If an entry already exists, the dictionary remains unchanged
125 and `FALSE` will be returned.</P>
127 <P>In positive dictionaries only positive entries
128 can be made, and in negative ones only negative entries.</P>
131 the word to be added.
134 specifies whether the entry will be a negative one or not.
137 in the case of a negative entry, this is the replacement text to
138 be used when replacing aWord. Otherwise, it is undefined.
141 `TRUE` if the entry was successfully added, `FALSE` otherwise.
143 @see com::sun::star::linguistic2::DictionaryType
147 [in] boolean bIsNegative
,
148 [in] string aRplcText
);
150 /** removes an entry from the dictionary.
153 the word matching the entry to be removed.
156 `TRUE` if the entry was successfully removed, `FALSE`
157 otherwise (especially if the entry was not found).
159 boolean remove
( [in] string aWord
);
163 `TRUE` if the dictionary is full and no further
164 entry can be made, `FALSE` otherwise.
169 <p>This function should no longer be used since with the expansion of the
170 maximum number of allowed entries the result may become unreasonable large!</p>
173 a sequence with all the entries of the dictionary.
175 @see com::sun::star::linguistic2::XDictionaryEntry
176 @see com::sun::star::linguistic2::XSearchableDictionary
180 sequence
<com
::sun
::star
::linguistic2
::XDictionaryEntry
> getEntries
();
182 /** removes all entries from the dictionary.
186 /** adds an entry to the list of dictionary event listeners.
188 <P>On dictionary events, each entry in the listener list will
189 be notified via a call to
190 com::sun::star::linguistic2::XDictionaryEventListener::processDictionaryEvent().</P>
193 the entry to be made, that is, the object that wants notifications.
196 `TRUE` if the entry was successfully made, `FALSE` otherwise.
197 If com::sun::star::lang::XEventListener::disposing() was called before,
200 @see com::sun::star::linguistic2::XDictionary::removeDictionaryEventListener()
201 @see com::sun::star::linguistic2::XDictionaryEventListener
203 boolean addDictionaryEventListener
(
204 [in] com
::sun
::star
::linguistic2
::XDictionaryEventListener xListener
);
206 /** removes an entry from the list of dictionary event listeners.
209 the reference to the listening object to be removed.
212 `TRUE` if the object to be removed was found and removed,
213 `FALSE` if the object was not found in the list.
215 @see com::sun::star::linguistic2::XDictionary::addDictionaryEventListener()
216 @see com::sun::star::linguistic2::XDictionaryEventListener
218 boolean removeDictionaryEventListener
(
219 [in] com
::sun
::star
::linguistic2
::XDictionaryEventListener xListener
);
226 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */