Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: linguistic2 ::

interface XDictionaryList
Description
is used to manage and maintain a list of dictionaries.

A dictionary-list may be given to a spellchecker 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
XDictionary, ::com::sun::star::uno::XInterface

Methods' Summary
getCount  
getDictionaries  
getDictionaryByName searches the list for a dictionary with a given name.  
addDictionary adds a dictionary to the list.  
removeDictionary removes a single dictionary from the list.  
addDictionaryListEventListener adds an entry to the list of dictionary-list event listeners.  
removeDictionaryListEventListener removes an entry from the list of dictionary-list event listeners.  
beginCollectEvents increases request level for event buffering by one.  
endCollectEvents flushes the event buffer and decreases the request level for event buffering by one.  
flushEvents notifies the listeners of all buffered events and then clears that buffer.  
createDictionary creates a new dictionary.  
Methods' Details
getCount
short
getCount();

Returns
the number of dictionaries in the list.
getDictionaries
sequence< XDictionary >
getDictionaries();

Returns
a sequence with an entry for every dictionary in the list.
See also
XDictionary
getDictionaryByName
XDictionary
getDictionaryByName( [in] string  aDictionaryName );

Description
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.
Parameter aDictionaryName
specifies the name of the dictionary to look for.
See also
XDictionary
addDictionary
boolean
addDictionary( [in] XDictionary  xDictionary );

Description
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.
Parameter xDictionary
the dictionary to be added.
See also
XDictionary
removeDictionary
boolean
removeDictionary( [in] XDictionary  xDictionary );

Description
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.
Parameter xDictionary
dictionary to be removed from the list of dictionaries.
See also
XDictionary
addDictionaryListEventListener
boolean
addDictionaryListEventListener( [in] XDictionaryListEventListener  xListener,
[in] boolean  bReceiveVerbose );

Description
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 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.
Parameter xListener
the object to be notified of dictionary-list events.
Parameter bReceiveVerbose
true if the listener requires more detailed event notification than usual.
See also
XDictionaryListEventListener, com::sun::star::linguistic2::XDictionaryListEvent
removeDictionaryListEventListener
boolean
removeDictionaryListEventListener( [in] XDictionaryListEventListener  xListener );

Description
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.
Parameter xListener
the object to be removed from the listener list.
See also
XDictionaryListEventListener, com::sun::star::linguistic2::XDictionaryListEvent
beginCollectEvents
short
beginCollectEvents();

Description
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, XDictionaryListEventListener, XDictionaryList::endCollectEvents, XDictionaryList::flushEvents
endCollectEvents
short
endCollectEvents();

Description
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 notfied of every single event.

Returns
the current request level for event buffering.
See also
com::sun::star::linguistic2::XDictionaryListEvent, XDictionaryListEventListener, XDictionaryList::beginCollectEvents, XDictionaryList::flushEvents
flushEvents
short
flushEvents();

Description
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, XDictionaryListEventListener, XDictionaryList::beginCollectEvents, XDictionaryList::endCollectEvents
createDictionary
XDictionary
createDictionary( [in] string  aName,
[in] ::com::sun::star::lang::Locale  aLocale,
[in] DictionaryType  eDicType,
[in] string  aURL );

Description
creates a new dictionary.
Returns
an empty dictionary with the given name, language and type. NULL on failure.
Parameter aName
is the name of the dictionary (should be unique).
Parameter aLocale
defines the language of the dictionary. Use an empty aLocale for dictionaries which may contain entries of all languages.
Parameter eDicType
specifies the type of the dictionary.
Parameter 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
XDictionary, ::com::sun::star::lang::Locale, DictionaryType
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.