LibreOffice
LibreOffice 7.4 SDK API Reference
Public Member Functions | List of all members
XDictionary Interface Referencepublished

This interfaces enables the object to access personal dictionaries. More...

import"XDictionary.idl";

Inheritance diagram for XDictionary:
XNamed XInterface Dictionary XSearchableDictionary Dictionary

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::XDictionaryEntrygetEntries ()
 
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...
 

Detailed Description

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.

See also
com::sun::star::linguistic2::XDictionaryEvent
com::sun::star::container::XNamed

Member Function Documentation

◆ add()

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.

Parameters
aWordthe word to be added.
bIsNegativespecifies whether the entry will be a negative one or not.
aRplcTextin 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
com::sun::star::linguistic2::DictionaryType

◆ addDictionaryEventListener()

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().

Parameters
xListenerthe entry to be made, that is, the object that wants notifications.
Returns
TRUE if the entry was successfully made, FALSE otherwise. If com::sun::star::lang::XEventListener::disposing() was called before, it will always fail.
See also
com::sun::star::linguistic2::XDictionary::removeDictionaryEventListener()
com::sun::star::linguistic2::XDictionaryEventListener

◆ addEntry()

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.

Parameters
xDicEntrythe entry to be added.
Returns
TRUE if the entry was successfully added FALSE otherwise.
See also
com::sun::star::linguistic2::XDictionaryEntry
com::sun::star::linguistic2::DictionaryType

◆ clear()

void clear ( )

removes all entries from the dictionary.

◆ getCount()

long getCount ( )
Returns
the number of entries in the dictionary.

◆ getDictionaryType()

returns the type of the dictionary.

Returns
the type of the dictionary.
See also
com::sun::star::linguistic2::DictionaryType

◆ 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!

Returns
a sequence with all the entries of the dictionary.
See also
com::sun::star::linguistic2::XDictionaryEntry
com::sun::star::linguistic2::XSearchableDictionary
Deprecated:

◆ getEntry()

com::sun::star::linguistic2::XDictionaryEntry getEntry ( [in] string  aWord)

searches for an entry that matches the given word.

Returns
the reference to the entry found. If no entry was found, it is NULL.
Parameters
aWordthe word to be looked for.
See also
com::sun::star::linguistic2::XDictionaryEntry

◆ getLocale()

Returns
the language of the dictionary.
See also
com::sun::star::lang::Locale

◆ isActive()

boolean isActive ( )
Returns
TRUE if the dictionary is active, FALSE otherwise.

◆ isFull()

boolean isFull ( )
Returns
TRUE if the dictionary is full and no further entry can be made, FALSE otherwise.

◆ remove()

boolean remove ( [in] string  aWord)

removes an entry from the dictionary.

Parameters
aWordthe word matching the entry to be removed.
Returns
TRUE if the entry was successfully removed, FALSE otherwise (especially if the entry was not found).

◆ removeDictionaryEventListener()

boolean removeDictionaryEventListener ( [in] com::sun::star::linguistic2::XDictionaryEventListener  xListener)

removes an entry from the list of dictionary event listeners.

Parameters
xListenerthe 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
com::sun::star::linguistic2::XDictionary::addDictionaryEventListener()
com::sun::star::linguistic2::XDictionaryEventListener

◆ setActive()

void setActive ( [in] boolean  bActivate)

specifies whether the dictionary should be used or not .

Parameters
bActivateTRUE if the dictionary should be used, FALSE otherwise.

◆ setLocale()

void setLocale ( [in] com::sun::star::lang::Locale  aLocale)

is used to set the language of the dictionary.

Parameters
aLocalethe new language of the dictionary.
See also
com::sun::star::lang::Locale

The documentation for this interface was generated from the following file: