LibreOffice
LibreOffice 24.2 SDK API Reference
|
Allows the user to access a conversion dictionary. More...
import <XConversionDictionary.idl;
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) |
![]() | |
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. | |
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.
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.
aLeftText | the left text of the pair to be added. |
aRightText | the right text of the pair to be added. |
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. |
void clear | ( | ) |
removes all entries from the dictionary.
sequence< string > getConversionEntries | ( | [in] com::sun::star::linguistic2::ConversionDirection | eDirection | ) |
eDirection | specifies if all left or all right parts of the entries should be returned. |
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.
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. |
com::sun::star::lang::IllegalArgumentException | if the locale is not supported by the dictionary or if nTextConversionOptions is invalid for the given locale. |
short getConversionType | ( | ) |
com::sun::star::lang::Locale getLocale | ( | ) |
short getMaxCharCount | ( | [in] com::sun::star::linguistic2::ConversionDirection | eDirection | ) |
returns the maximum number of characters used as left or right text in entries.
eDirection | specifies if the left text or the right text of entries will be used. |
string getName | ( | ) |
boolean isActive | ( | ) |
TRUE
if the dictionary is active, FALSE
otherwise. void removeEntry | ( | [in] string | aLeftText, | |||
[in] string | aRightText ) | |||||
raises | ( | com::sun::star::container::NoSuchElementException ) |
removes a conversion pair from the dictionary.
aLeftText | the left text of the pair to be removed. |
aRightText | the right text of the pair to be removed. |
com::sun::star::container::NoSuchElementException | if there is no such entry. |
void setActive | ( | [in] boolean | bActivate | ) |
specifies whether the dictionary should be used or not .
bActivate | TRUE if the dictionary should be used, FALSE otherwise. |