LibreOffice LibreOffice 25.8 SDK API Reference

Loading...
Searching...
No Matches
XConversionDictionary Interface Referencepublished

Allows the user to access a conversion dictionary. More...

`import "XConversionDictionary.idl";`

Inheritance diagram for XConversionDictionary:

## Public Member Functions
string | getName ()
com::sun::star::lang::Locale | getLocale ()
short | getConversionType ()
void | setActive ([in] boolean bActivate)
| specifies whether the dictionary should be used or not .
boolean | isActive ()
void | clear ()
| removes all entries from the dictionary.
sequence< string > | getConversions ([in] string aText, [in] long nStartPos, [in] long nLength, [in] com::sun::star::linguistic2::ConversionDirection eDirection, [in] long nTextConversionOptions) raises ( com::sun::star::lang::IllegalArgumentException )
| searches for entries or conversions that match the given text.
void | addEntry ([in] string aLeftText, [in] string aRightText) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::container::ElementExistException)
| is used to add a conversion pair to the dictionary.
void | removeEntry ([in] string aLeftText, [in] string aRightText) raises ( com::sun::star::container::NoSuchElementException )
| removes a conversion pair from the dictionary.
short | getMaxCharCount ([in] com::sun::star::linguistic2::ConversionDirection eDirection)
| returns the maximum number of characters used as left or right text in entries.
sequence< string > | getConversionEntries ([in] com::sun::star::linguistic2::ConversionDirection eDirection)
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

Allows the user to access a conversion dictionary.

The dictionary consists of entries (pairs) of the form ( aLeftText, aRightText ). Those pairs can be added and removed. Also it can be looked for all entries where the left text or the right text matches a given text. Thus it can be used for conversions in both directions.

Restrictions to what has to be the left and right text are usually given by specific services implementing this interface.

See also
  com::sun::star::linguistic2::ConversionDictionary
  com::sun::star::linguistic2::HangulHanjaConversionDictionary

Since
  OOo 1.1.2

## Member Function Documentation

## ◆ addEntry()

void addEntry | ( | [in] string | aLeftText,
|  | [in] string | aRightText )
raises | ( | com::sun::star::lang::IllegalArgumentException,
|  | com::sun::star::container::ElementExistException ) |  |  |

is used to add a conversion pair to the dictionary.

Parameters

  aLeftText | the left text of the pair to be added.
  aRightText | the right text of the pair to be added.

Exceptions

  com::sun::star::lang::IllegalArgumentException | if the arguments are invalid. For example if the specifications defined by the service implementing this object are not met.
  com::sun::star::container::ElementExistException | if such an entry already exists.

## ◆ clear()

void clear | ( |  | ) |

removes all entries from the dictionary.

## ◆ getConversionEntries()

sequence< string > getConversionEntries | ( | [in] com::sun::star::linguistic2::ConversionDirection | eDirection | ) |

Returns
  a list of all left or right parts of the dictionaries entries.

Parameters

  eDirection | specifies if all left or all right parts of the entries should be returned.

## ◆ getConversions()

sequence< string > getConversions | ( | [in] string | aText,
|  | [in] long | nStartPos,
|  | [in] long | nLength,
|  | [in] com::sun::star::linguistic2::ConversionDirection | eDirection,
|  | [in] long | nTextConversionOptions )
raises | ( | com::sun::star::lang::IllegalArgumentException ) |  |  |

searches for entries or conversions that match 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 conversions found for the supplied text. If no nothing was found, it is empty.

Parameters

  aText | the text where the substring to be looked for will be taken from. Depending on the conversion direction parameter it specifies either the left text or the right text to look for.
  nStartPos | the starting pos of the substring to be looked for.
  nLength | the length of the substring to be looked for.
  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 locale is not supported by the dictionary or if nTextConversionOptions is invalid for the given locale.

## ◆ getConversionType()

short getConversionType | ( |  | ) |

Returns
  the conversion type supported by the dictionary.

See also
  com::sun::star::linguistic2::ConversionDictionaryType

## ◆ getLocale()

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

Returns
  the language supported by the dictionary.

See also
  com::sun::star::lang::Locale

## ◆ getMaxCharCount()

short getMaxCharCount | ( | [in] com::sun::star::linguistic2::ConversionDirection | eDirection | ) |

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

Parameters

  eDirection | specifies if the left text or the right text of entries will be used.

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

## ◆ getName()

string getName | ( |  | ) |

Returns
  the name of the dictionary.

## ◆ isActive()

boolean isActive | ( |  | ) |

Returns
  TRUE if the dictionary is active, FALSE otherwise.

## ◆ removeEntry()

void removeEntry | ( | [in] string | aLeftText,
|  | [in] string | aRightText )
raises | ( | com::sun::star::container::NoSuchElementException ) |  |  |

removes a conversion pair from the dictionary.

Parameters

  aLeftText | the left text of the pair to be removed.
  aRightText | the right text of the pair to be removed.

Exceptions

  com::sun::star::container::NoSuchElementException | if there is no such entry.

## ◆ setActive()

void setActive | ( | [in] boolean | bActivate | ) |

specifies whether the dictionary should be used or not .

Parameters

  bActivate | TRUE if the dictionary should be used, FALSE otherwise.

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

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