LibreOffice
LibreOffice 5.3 SDK API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
XConversionDictionary Interface Referencepublished

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

import "XConversionDictionary.idl";

Inheritance diagram for XConversionDictionary:
XInterface ConversionDictionary HangulHanjaConversionDictionary

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 . More...
 
boolean isActive ()
 
void clear ()
 removes all entries from the dictionary. More...
 
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. More...
 
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. More...
 
void removeEntry ([in] string aLeftText, [in] string aRightText) raises ( com::sun::star::container::NoSuchElementException )
 removes a conversion pair from the dictionary. More...
 
short getMaxCharCount ([in] com::sun::star::linguistic2::ConversionDirection eDirection)
 returns the maximum number of characters used as left or right text in entries. More...
 
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. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

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

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
aLeftTextthe left text of the pair to be added.
aRightTextthe right text of the pair to be added.
Exceptions
com::sun::star::lang::IllegalArgumentExceptionif the arguments are invalid. For example if the specifications defined by the service implementing this object are not met.
com::sun::star::container::ElementExistExceptionif such an entry already exists.
void clear ( )

removes all entries from the dictionary.

sequence< string > getConversionEntries ( [in] com::sun::star::linguistic2::ConversionDirection  eDirection)
Returns
a list of all left or right parts of the dictionaries entries.
Parameters
eDirectionspecifies 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.

Returns
the list of conversions found for the supplied text. If no nothing was found, it is empty.
Parameters
aTextthe 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.
nStartPosthe starting pos of the substring to be looked for.
nLengththe length of the substring to be looked for.
eDirectionspecifies the direction of the conversion to look for. It is one of com::sun::star::linguistic2::ConversionDirection.
nTextConversionOptionsCombination of com::sun::star::i18n::TextConversionOption values.
Exceptions
com::sun::star::lang::IllegalArgumentExceptionif the locale is not supported by the dictionary or if nTextConversionOptions is invalid for the given locale.
short getConversionType ( )
Returns
the conversion type supported by the dictionary.
See Also
com::sun::star::linguistic2::ConversionDictionaryType
Returns
the language supported by the dictionary.
See Also
com::sun::star::lang::Locale
short getMaxCharCount ( [in] com::sun::star::linguistic2::ConversionDirection  eDirection)

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

Parameters
eDirectionspecifies if the left text or the right text of entries will be used.
See Also
com::sun::star::linguistic2::ConversionDirection
string getName ( )
Returns
the name of the dictionary.
boolean isActive ( )
Returns
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.

Parameters
aLeftTextthe left text of the pair to be removed.
aRightTextthe right text of the pair to be removed.
Exceptions
com::sun::star::container::NoSuchElementExceptionif there is no such entry.
void setActive ( [in] boolean  bActivate)

specifies whether the dictionary should be used or not .

Parameters
bActivateTRUE if the dictionary should be used, FALSE otherwise.

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