interface XDictionary in module com::sun::star::linguistic2::

(Global Index)

Syntax

interface XDictionary : com::sun::star::container::XNamed ;

Description

This interfaces enables the object to access personal dictionaries.

Personal dictionaries are used to supply additional information for spellchecking and hyphenation (see 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 spellchecking 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.

See also

XDictionaryEvent

See also

XNamed

Method Summary

getDictionaryType returns the type of the dictionary.

setActive specifies whether the dictionary should be used or not .

isActive

getCount

getLocale

setLocale is used to set the language of the dictionary.

getEntry searches for an entry that matches the given word.

addEntry is used to add an entry to the dictionary.

add is used to make an entry in the dictionary.

remove removes an entry from the dictionary.

isFull

getEntries

clear removes all entries from the dictionary.

addDictionaryEventListener adds an entry to the list of dictionary event listeners.

removeDictionaryEventListener removes an entry from the list of dictionary event listeners.

Method Details



getDictionaryType

Syntax

com::sun::star::linguistic2::DictionaryType getDictionaryType ();

Description

returns the type of the dictionary.

Returns

the type of the dictionary.

See also

DictionaryType

setActive

Syntax

void setActive (
boolean bActivate );

Description

specifies whether the dictionary should be used or not .

Parameter bAcvtivate

true if the dictionary should be used, false otherwise.

isActive

Syntax

boolean isActive ();

Description

Returns

true if the dictionary is active, false otherwise.

getCount

Syntax

short getCount ();

Description

Returns

the number of entries in the dictionary.

getLocale

Syntax

com::sun::star::lang::Locale getLocale ();

Description

Returns

the language of the dictionary.

See also

Locale

setLocale

Syntax

void setLocale (
com::sun::star::lang::Locale aLocale );

Description

is used to set the language of the dictionary.

Parameter aLocale

the new language of the dictionary.

See also

Locale

getEntry

Syntax

com::sun::star::linguistic2::XDictionaryEntry getEntry (
string aWord );

Description

searches for an entry that matches the given word.

Returns

the reference to the entry found. If no entry was found, it is NULL.

Parameter aWord

the word to be looked for.

See also

XDictionaryEntry

addEntry

Syntax

boolean addEntry (
com::sun::star::linguistic2::XDictionaryEntry xDicEntry );

Description

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 postive entries can be made, and in negative ones only negative entries.

Parameter xDicEntry

the entry to be added.

Returns

true if the entry was successfully added false otherwise.

See also

add

See also

remove

See also

isFull

See also

XDictionaryEntry

See also

DictionaryType

add

Syntax

boolean add (
string aWord,
boolean bIsNegative,
string aRplcText );

Description

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 postive entries can be made, and in negative ones only negative entries.

Parameter aWord

the word to be added.

Parameter bIsNegative

specifies whether the entry will be a negative one or not.

Parameter aRplcText

in the case of a negative entry, this is the replacement text to be used when replacing aWord. Otherwise, it is undefined.

Returns

true if the entry was successfully added, false otherwise.

See also

addEntry

See also

remove

See also

isFull

See also

DictionaryType

remove

Syntax

boolean remove (
string aWord );

Description

removes an entry from the dictionary.

Parameter aWord

the word matching the entry to be removed.

Returns

true if the entry was successfully removed, false otherwise (especially if the entry was not found).

See also

addEntry

See also

add

isFull

Syntax

boolean isFull ();

Description

Returns

true if the dictionary is full and no further entry can be made, false otherwise.

See also

addEntry

See also

add

getEntries

Syntax

sequence< com::sun::star::linguistic2::XDictionaryEntry > getEntries ();

Description

Returns

a sequence with all the entries of the dictionary.

See also

XDictionaryEntry

clear

Syntax

void clear ();

Description

removes all entries from the dictionary.


addDictionaryEventListener

Syntax

boolean addDictionaryEventListener (
com::sun::star::linguistic2::XDictionaryEventListener xListener );

Description

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 XDictionaryEventListener::processDictionaryEvent .

Parameter xListener

the entry to be made, that is, the object that wants notifications.

Returns

true if the entry was successfully made, false otherwise. If XEventListener::disposing was called before, it will always fail.

See also

removeDictionaryEventListener

See also

XDictionaryEventListener

removeDictionaryEventListener

Syntax

boolean removeDictionaryEventListener (
com::sun::star::linguistic2::XDictionaryEventListener xListener );

Description

removes an entry from the list of dictionary event listeners.

Parameter xListener

the reference to the listening object to be removed.

Returns

true if the object to be removed was found and removed, false if the object was not found in the list.

See also

addDictionaryEventListener

See also

XDictionaryEventListener
Top of Page