LibreOffice
LibreOffice 24.2 SDK API Reference
|
This interfaces enables the object to access personal dictionaries. More...
import"XDictionary.idl";
Public Member Functions | |
com::sun::star::linguistic2::DictionaryType | getDictionaryType () |
returns the type of the dictionary. More... | |
void | setActive ([in] boolean bActivate) |
specifies whether the dictionary should be used or not . More... | |
boolean | isActive () |
long | getCount () |
com::sun::star::lang::Locale | getLocale () |
void | setLocale ([in] com::sun::star::lang::Locale aLocale) |
is used to set the language of the dictionary. More... | |
com::sun::star::linguistic2::XDictionaryEntry | getEntry ([in] string aWord) |
searches for an entry that matches the given word. More... | |
boolean | addEntry ([in] com::sun::star::linguistic2::XDictionaryEntry xDicEntry) |
is used to add an entry to the dictionary. More... | |
boolean | add ([in] string aWord, [in] boolean bIsNegative, [in] string aRplcText) |
is used to make an entry in the dictionary. More... | |
boolean | remove ([in] string aWord) |
removes an entry from the dictionary. More... | |
boolean | isFull () |
sequence< com::sun::star::linguistic2::XDictionaryEntry > | getEntries () |
void | clear () |
removes all entries from the dictionary. More... | |
boolean | addDictionaryEventListener ([in] com::sun::star::linguistic2::XDictionaryEventListener xListener) |
adds an entry to the list of dictionary event listeners. More... | |
boolean | removeDictionaryEventListener ([in] com::sun::star::linguistic2::XDictionaryEventListener xListener) |
removes an entry from the list of dictionary event listeners. More... | |
Public Member Functions inherited from XNamed | |
string | getName () |
void | setName ([in] string aName) |
sets the programmatic name of the object. More... | |
Public Member Functions inherited from XInterface | |
any | queryInterface ([in] type aType) |
queries for a new interface to an existing UNO object. More... | |
void | acquire () |
increases the reference counter by one. More... | |
void | release () |
decreases the reference counter by one. More... | |
This interfaces enables the object to access personal dictionaries.
Personal dictionaries are used to supply additional information for spell checking and hyphenation (see com::sun::star::linguistic2::XDictionaryEntry). Only active dictionaries with an appropriate language are used for that purpose. The entries of an active, positive dictionary are words that are required to be recognized as correct during the spell checking process. Additionally, they will be used for hyphenation. Entries of a negative dictionary are required to be recognized as negative words, for example, words that should not be used, during SPELLCHECK. An entry in a negative dictionary may supply a proposal for a word to be used instead of the one being used.
boolean add | ( | [in] string | aWord, |
[in] boolean | bIsNegative, | ||
[in] string | aRplcText | ||
) |
is used to make an entry in the dictionary.
If an entry already exists, the dictionary remains unchanged and FALSE
will be returned.
In positive dictionaries only positive entries can be made, and in negative ones only negative entries.
aWord | the word to be added. |
bIsNegative | specifies whether the entry will be a negative one or not. |
aRplcText | in the case of a negative entry, this is the replacement text to be used when replacing aWord. Otherwise, it is undefined. |
TRUE
if the entry was successfully added, FALSE
otherwise.boolean addDictionaryEventListener | ( | [in] com::sun::star::linguistic2::XDictionaryEventListener | xListener | ) |
adds an entry to the list of dictionary event listeners.
On dictionary events, each entry in the listener list will be notified via a call to com::sun::star::linguistic2::XDictionaryEventListener::processDictionaryEvent().
xListener | the entry to be made, that is, the object that wants notifications. |
TRUE
if the entry was successfully made, FALSE
otherwise. If com::sun::star::lang::XEventListener::disposing() was called before, it will always fail.boolean addEntry | ( | [in] com::sun::star::linguistic2::XDictionaryEntry | xDicEntry | ) |
is used to add an entry to the dictionary.
If an entry already exists, the dictionary remains unchanged and FALSE
will be returned.
In positive dictionaries only positive entries can be made, and in negative ones only negative entries.
xDicEntry | the entry to be added. |
TRUE
if the entry was successfully added FALSE
otherwise.void clear | ( | ) |
removes all entries from the dictionary.
long getCount | ( | ) |
com::sun::star::linguistic2::DictionaryType getDictionaryType | ( | ) |
returns the type of the dictionary.
sequence<com::sun::star::linguistic2::XDictionaryEntry> getEntries | ( | ) |
This function should no longer be used since with the expansion of the maximum number of allowed entries the result may become unreasonable large!
com::sun::star::linguistic2::XDictionaryEntry getEntry | ( | [in] string | aWord | ) |
searches for an entry that matches the given word.
aWord | the word to be looked for. |
com::sun::star::lang::Locale getLocale | ( | ) |
boolean isActive | ( | ) |
TRUE
if the dictionary is active, FALSE
otherwise. boolean isFull | ( | ) |
TRUE
if the dictionary is full and no further entry can be made, FALSE
otherwise. boolean remove | ( | [in] string | aWord | ) |
removes an entry from the dictionary.
aWord | the word matching the entry to be removed. |
TRUE
if the entry was successfully removed, FALSE
otherwise (especially if the entry was not found). boolean removeDictionaryEventListener | ( | [in] com::sun::star::linguistic2::XDictionaryEventListener | xListener | ) |
removes an entry from the list of dictionary event listeners.
xListener | the reference to the listening object to be removed. |
TRUE
if the object to be removed was found and removed, FALSE
if the object was not found in the list.void setActive | ( | [in] boolean | bActivate | ) |
specifies whether the dictionary should be used or not .
bActivate | TRUE if the dictionary should be used, FALSE otherwise. |
void setLocale | ( | [in] com::sun::star::lang::Locale | aLocale | ) |
is used to set the language of the dictionary.
aLocale | the new language of the dictionary. |