LibreOffice: XConversionDictionaryList Interface Reference

LibreOffice LibreOffice 5.1 SDK API Reference

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
XConversionDictionaryList Interface Referencepublished

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

`import"XConversionDictionaryList.idl";`

Inheritance diagram for XConversionDictionaryList:

## Public Member Functions
com::sun::star::container::XNameContainer | getDictionaryContainer ()
com::sun::star::linguistic2::XConversionDictionary | addNewDictionary ([in] string aName, [in] com::sun::star::lang::Locale aLocale, [in] short nConversionDictionaryType) raises ( com::sun::star::lang::NoSupportException, com::sun::star::container::ElementExistException )
| creates a new dictionary and adds it to the dictionary list. More...
sequence< string > | queryConversions ([in] string aText, [in] long nStartPos, [in] long nLength, [in] com::sun::star::lang::Locale aLocale, [in] short nConversionDictionaryType, [in] com::sun::star::linguistic2::ConversionDirection eDirection, [in] long nTextConversionOptions) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::NoSupportException )
| searches for entries that match the given text. More...
short | queryMaxCharCount ([in] com::sun::star::lang::Locale aLocale, [in] short nConversionDictionaryType, [in] com::sun::star::linguistic2::ConversionDirection eDirection)
| returns the maximum number of characters used as left or right text in entries. 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

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

The dictionaries added to the list may or may not support the com::sun::star::util::XFlushable interface. If they do those dictionaries have to be flushed upon termination of the dictionary list.

Since
  OOo 1.1.2

## Member Function Documentation

com::sun::star::linguistic2::XConversionDictionary addNewDictionary | ( | [in] string | aName,
|  | [in] com::sun::star::lang::Locale | aLocale,
|  | [in] short | nConversionDictionaryType
| ) |  |
raises | ( | com::sun::star::lang::NoSupportException,
|  | com::sun::star::container::ElementExistException
| ) |  |

creates a new dictionary and adds it to the dictionary list.

The dictionary will be empty and active.

Returns
  an empty dictionary with the given name, locale and conversion type. `NULL` on failure.

Parameters

  aName | is the name of the dictionary (should be unique).
  aLocale | defines the language of the dictionary.
  nConversionDictionaryType | One of com::sun::star::linguistic2::ConversionDictionaryType values.

Exceptions

  NoSupportException | when nConversionDictionaryType is not known by the implementation.
  ElementExistException | when a dictionary with the specified name already exists.

com::sun::star::container::XNameContainer getDictionaryContainer | ( |  | ) |

Returns
  the name container interface to the dictionaries in the list.

The interface can be used to add, remove or retrieve dictionaries from the list by specifying the name of the dictionary, and (in case of inserting) the interface to the dictionary as second parameter.

A dictionary to be added must support the com::sun::star::linguistic2::XConversionDictionary interface. The dictionary to be added needs not necessarily be created by this service.

The com::sun::star::container::XNameReplace::replaceByName function is implemented empty since renaming of dictionaries is not allowed.

sequence< string > queryConversions | ( | [in] string | aText,
|  | [in] long | nStartPos,
|  | [in] long | nLength,
|  | [in] com::sun::star::lang::Locale | aLocale,
|  | [in] short | nConversionDictionaryType,
|  | [in] com::sun::star::linguistic2::ConversionDirection | eDirection,
|  | [in] long | nTextConversionOptions
| ) |  |
raises | ( | com::sun::star::lang::IllegalArgumentException,
|  | com::sun::star::lang::NoSupportException
| ) |  |

searches for entries that match the given text.

All active dictionaries with matching locales and conversion type will be searched for entries matching the given text.

The exact string to be looked for is the substring from the aText parameter that starts at position nStartPos and has the length nLength.

Returns
  the list of entries found. If no entry was found, it is empty.

Parameters

  aText | the text where the substring to be looked for will be taken from.
  nStartPos | the starting pos of the substring to be looked for.
  nLength | the length of the substring to be looked for.
  aLocale | Locale the conversion is referred to.
  nConversionDictionaryType | specifies the type of conversion the dictionary can be used for. It is one of com::sun::star::linguistic2::ConversionDictionaryType.
  eDirection | specifies the direction of the conversion to look for. It is one of com::sun::star::linguistic2::ConversionDirection.
  nTextConversionOptions | Combination of com::sun::star::i18n::TextConversionOption values.

Exceptions

  com::sun::star::lang::IllegalArgumentException | if the nTextConversionOptions parameter is invalid for the given locale.
  NoSupportException | when nConversionDictionaryType is not known by the implementation, or when the locale is not supported (i.e. there are no dictionaries for that locale available).

short queryMaxCharCount | ( | [in] com::sun::star::lang::Locale | aLocale,
|  | [in] short | nConversionDictionaryType,
|  | [in] com::sun::star::linguistic2::ConversionDirection | eDirection
| ) |  |

returns the maximum number of characters used as left or right text in entries.

All active dictionaries of the specified locale and type will be looked up to get the result.

The parameter eDirection specifies if only the left text or the right text from entries should be considered.

Parameters

  aLocale | Locale the conversion is referred to.
  nConversionDictionaryType | specifies the type of conversion dictionaries to be looked up. It is one of com::sun::star::linguistic2::ConversionDictionaryType.
  eDirection | specifies if the left text or the right text of entries will be used.

See also
  com::sun::star::linguistic2::ConversionDirection

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

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