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

interface XConversionDictionary
Base Hierarchy
::com::sun::star::uno::XInterface
 |
 +-XConversionDictionary
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
ConversionDictionary
See also
HangulHanjaConversionDictionary
Since version
OpenOffice.org 1.1.1

Methods' Summary
getName
getLocale
getConversionType
setActive specifies whether the dictionary should be used or not .
isActive
clear removes all entries from the dictionary.
getConversions searches for entries or conversions that match the given text.
addEntry is used to add a conversion pair to the dictionary.
removeEntry removes a conversion pair from the dictionary.
getMaxCharCount returns the maximum number of characters used as left or right text in entries.
Methods' Details
getName
string
getName();
 
 

Description
Returns
the name of the dictionary.
getLocale
::com::sun::star::lang::Locale
getLocale();
 
 

Description
Returns
the language supported by the dictionary.
See also
::com::sun::star::lang::Locale
getConversionType
short
getConversionType();
 
 

Description
Returns
the conversion type supported by the dictionary.
See also
ConversionDictionaryType
setActive
void
setActive(
 
[in] boolean
 
bActivate );

Description
specifies whether the dictionary should be used or not .
Parameter bAcvtivate
true if the dictionary should be used, false otherwise.
isActive
boolean
isActive();
 
 

Description
Returns
true if the dictionary is active, false otherwise.
clear
void
clear();
 
 

Description
removes all entries from the dictionary.
getConversions
sequence< string >
getConversions(
 
[in] string
[in] long
[in] long
[in] ConversionDirection
[in] long 

raises(

 
aText,
nStartPos,
nLength,
eDirection,
nTextConversionOptions ) 
::com::sun::star::lang::IllegalArgumentException );

Description
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.
Parameter 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.
Parameter nStartPos
the starting pos of the substring to be looked for.
Parameter nLength
the length of the substring to be looked for.
Parameter eConversionDirection
specifies the direction of the conversion to look for. It is one of ConversionDirection .
Parameter nTextConversionOptions
Combination of ::com::sun::star::i18n::TextConversionOption values.
Throws
com::sun::star::lang::IllegalArgumentException if the locale is not supported by the dictionary or if nTextConversionOptions is invalid for the given locale.
addEntry
void
addEntry(
 
[in] string
[in] string 

raises(

 
aLeftText,
aRightText ) 
::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::container::ElementExistException );

Description
is used to add a conversion pair to the dictionary.
Parameter aLeftText
the left text of the pair to be added.
Parameter aRightText
the right text of the pair to be added.
Throws
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.
Throws
com::sun::star::container::ElementExistException if such an entry already exists.
removeEntry
void
removeEntry(
 
[in] string
[in] string 

raises(

 
aLeftText,
aRightText ) 
::com::sun::star::container::NoSuchElementException );

Description
removes a conversion pair from the dictionary.
Parameter aLeftText
the left text of the pair to be removed.
Parameter aRightText
the right text of the pair to be removed.
Throws
com::sun::star::container::NoSuchElementException if there is no such entry.
getMaxCharCount
short
getMaxCharCount(
 
[in] ConversionDirection
 
eDirection );

Description
returns the maximum number of characters used as left or right text in entries.
Parameter eDirection
specifies if the left text or the right text of entries will be used.
See also
ConversionDirection
Top of Page