LibreOffice: XDictionaryList Interface Reference

LibreOffice LibreOffice 26.8 SDK API Reference

Loading...
Searching...
No Matches
XDictionaryList Interface Referencepublished

is used to manage and maintain a list of dictionaries. More...

`import "XDictionaryList.idl";`

Inheritance diagram for XDictionaryList:

## Public Member Functions
short | getCount ()
sequence< com::sun::star::linguistic2::XDictionary > | getDictionaries ()
com::sun::star::linguistic2::XDictionary | getDictionaryByName ([in] string aDictionaryName)
| searches the list for a dictionary with a given name.
boolean | addDictionary ([in] com::sun::star::linguistic2::XDictionary xDictionary)
| adds a dictionary to the list.
boolean | removeDictionary ([in] com::sun::star::linguistic2::XDictionary xDictionary)
| removes a single dictionary from the list.
boolean | addDictionaryListEventListener ([in] com::sun::star::linguistic2::XDictionaryListEventListener xListener, [in] boolean bReceiveVerbose)
| adds an entry to the list of dictionary-list event listeners.
boolean | removeDictionaryListEventListener ([in] com::sun::star::linguistic2::XDictionaryListEventListener xListener)
| removes an entry from the list of dictionary-list event listeners.
short | beginCollectEvents ()
| increases request level for event buffering by one.
short | endCollectEvents ()
| flushes the event buffer and decreases the request level for event buffering by one.
short | flushEvents ()
| notifies the listeners of all buffered events and then clears that buffer.
com::sun::star::linguistic2::XDictionary | createDictionary ([in] string aName, [in] com::sun::star::lang::Locale aLocale, [in] com::sun::star::linguistic2::DictionaryType eDicType, [in] string aURL)
| creates a new dictionary.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Detailed Description

is used to manage and maintain a list of dictionaries.

A dictionary-list may be given to a spell checker or hyphenator service implementation on their creation in order to supply a set of dictionaries and additional information to be used for those purposes.

See also
  com::sun::star::linguistic2::XDictionary
  com::sun::star::uno::XInterface

## Member Function Documentation

## ◆ addDictionary()

boolean addDictionary | ( | [in] com::sun::star::linguistic2::XDictionary | xDictionary | ) |

adds a dictionary to the list.

Additionally, the dictionary-list will add itself to the list of dictionary event listeners of that dictionary.

Returns
  TRUE if the dictionary was added successfully, FALSE otherwise.

Parameters

  xDictionary | the dictionary to be added.

See also
  com::sun::star::linguistic2::XDictionary

## ◆ addDictionaryListEventListener()

boolean addDictionaryListEventListener | ( | [in] com::sun::star::linguistic2::XDictionaryListEventListener | xListener,
|  | [in] boolean | bReceiveVerbose )

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

On dictionary-list events, each entry in the listener list will be notified via a call to com::sun::star::linguistic2::XDictionaryListEventListener::processDictionaryListEvent().

Returns
  TRUE if the entry was made, FALSE otherwise. If com::sun::star::lang::XEventListener::disposing() was called before, it will always fail.

Parameters

  xListener | the object to be notified of dictionary-list events.
  bReceiveVerbose | TRUE if the listener requires more detailed event notification than usual.

See also
  com::sun::star::linguistic2::XDictionaryListEventListener
  com::sun::star::linguistic2::XDictionaryListEvent

## ◆ beginCollectEvents()

short beginCollectEvents | ( |  | ) |

increases request level for event buffering by one.

The request level for event buffering is an integer counter that is initially set to 0. As long as the request level is not 0, events will be buffered until the next flushing of the buffer.

Returns
  the current request level for event buffering.

See also
  com::sun::star::linguistic2::XDictionaryListEvent
  com::sun::star::linguistic2::XDictionaryListEventListener
  com::sun::star::linguistic2::XDictionaryList::endCollectEvents()
  com::sun::star::linguistic2::XDictionaryList::flushEvents()

## ◆ createDictionary()

com::sun::star::linguistic2::XDictionary createDictionary | ( | [in] string | aName,
|  | [in] com::sun::star::lang::Locale | aLocale,
|  | [in] com::sun::star::linguistic2::DictionaryType | eDicType,
|  | [in] string | aURL )

creates a new dictionary.

Returns
  an empty dictionary with the given name, language and type. NULL on failure.

Parameters

  aName | is the name of the dictionary (should be unique).
  aLocale | defines the language of the dictionary. Use an empty aLocale for dictionaries which may contain entries of all languages.
  eDicType | specifies the type of the dictionary.
  aURL | is the URL of the location where the dictionary is persistent, if the XStorable interface is supported. It may be empty, which means the dictionary will not be persistent.

See also
  com::sun::star::linguistic2::XDictionary
  com::sun::star::lang::Locale
  com::sun::star::linguistic2::DictionaryType

## ◆ endCollectEvents()

short endCollectEvents | ( |  | ) |

flushes the event buffer and decreases the request level for event buffering by one.

There should be one matching endCollectEvents call for every beginCollectEvents call. Usually you will group these around some code where you do not wish to get notified of every single event.

Returns
  the current request level for event buffering.

See also
  com::sun::star::linguistic2::XDictionaryListEvent
  com::sun::star::linguistic2::XDictionaryListEventListener
  com::sun::star::linguistic2::XDictionaryList::beginCollectEvents()
  com::sun::star::linguistic2::XDictionaryList::flushEvents()

## ◆ flushEvents()

short flushEvents | ( |  | ) |

notifies the listeners of all buffered events and then clears that buffer.

Returns
  the current request level for event buffering.

See also
  com::sun::star::linguistic2::XDictionaryListEvent
  com::sun::star::linguistic2::XDictionaryListEventListener
  com::sun::star::linguistic2::XDictionaryList::beginCollectEvents()
  com::sun::star::linguistic2::XDictionaryList::endCollectEvents()

## ◆ getCount()

short getCount | ( |  | ) |

Returns
  the number of dictionaries in the list.

## ◆ getDictionaries()

sequence< com::sun::star::linguistic2::XDictionary > getDictionaries | ( |  | ) |

Returns
  a sequence with an entry for every dictionary in the list.

See also
  com::sun::star::linguistic2::XDictionary

## ◆ getDictionaryByName()

com::sun::star::linguistic2::XDictionary getDictionaryByName | ( | [in] string | aDictionaryName | ) |

searches the list for a dictionary with a given name.

Returns
  the XDictionary with the specified name. If no such dictionary exists, NULL will be returned.

Parameters

  aDictionaryName | specifies the name of the dictionary to look for.

See also
  com::sun::star::linguistic2::XDictionary

## ◆ removeDictionary()

boolean removeDictionary | ( | [in] com::sun::star::linguistic2::XDictionary | xDictionary | ) |

removes a single dictionary from the list.

If the dictionary is still active, it will be deactivated first. The dictionary-list will remove itself from the list of dictionary event listeners of the dictionary.

Returns
  TRUE if the dictionary was removed successfully, FALSE otherwise.

Parameters

  xDictionary | dictionary to be removed from the list of dictionaries.

See also
  com::sun::star::linguistic2::XDictionary

## ◆ removeDictionaryListEventListener()

boolean removeDictionaryListEventListener | ( | [in] com::sun::star::linguistic2::XDictionaryListEventListener | xListener | ) |

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

Returns
  TRUE if the object to be removed was found and removed, FALSE otherwise.

Parameters

  xListener | the object to be removed from the listener list.

See also
  com::sun::star::linguistic2::XDictionaryListEventListener
  com::sun::star::linguistic2::XDictionaryListEvent

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

- com/sun/star/linguistic2/XDictionaryList.idl