Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: i18n ::

interface XTextConversion
Description
Method to convert text from one type to another
Since
OOo 1.1.2
Developers Guide
OfficeDev - Implementing a New Locale - XTextConversion
OfficeDev - Overview and Using the API - XTextConversion

Methods' Summary
getConversions Method to search dictionaries for the conversion candidates.  
getConversion Method to search dictionaries for the conversion candidate, if there are multiple candidates, it will return first one. This is for the conversion in non-interactive mode.  
interactiveConversion Method to query if the conversion type should be interactive or non-interactive mode.  
Methods' Details
getConversions
TextConversionResult
getConversions( [in] string  aText,
[in] long  nStartPos,
[in] long  nLength,
[in] ::com::sun::star::lang::Locale  aLocale,
[in] short  nTextConversionType,
[in] long  nTextConversionOptions )
raises( ::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::lang::NoSupportException );

Description
Method to search dictionaries for the conversion candidates.
Parameter aText
Text string to be converted.
Parameter nStartPos
The start position in aText for the conversion
Parameter nLength
The length of the partion in aText for the conversion
Parameter aLocal
Locale the conversion is referring to.
Parameter nTextConversionType
One of TextConversionType values.
Parameter nTextConversionOptions
Combination of TextConversionOption values.
Returns
TextConversionResult
Throws
NoSupportException when nConversionDictionaryType is not known by the implementation, or when the locale is not supported.
getConversion
string
getConversion( [in] string  aText,
[in] long  nStartPos,
[in] long  nLength,
[in] ::com::sun::star::lang::Locale  aLocale,
[in] short  nTextConversionType,
[in] long  nTextConversionOptions )
raises( ::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::lang::NoSupportException );

Description
Method to search dictionaries for the conversion candidate, if there are multiple candidates, it will return first one. This is for the conversion in non-interactive mode.
Parameter aText
Text string to be converted.
Parameter nStartPos
The start position in aText for the conversion
Parameter nLength
The length of the partion in aText for the conversion
Parameter aLocal
Locale the conversion is referring to.
Parameter nTextConversionType
One of TextConversionType values.
Parameter nTextConversionOptions
Combination of TextConversionOption values.
Returns
Converted text
Throws
NoSupportException when nConversionDictionaryType is not known by the implementation, or when the locale is not supported.
interactiveConversion
boolean
interactiveConversion( [in] ::com::sun::star::lang::Locale  aLocale,
[in] short  nTextConversionType,
[in] long  nTextConversionOptions )
raises( ::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::lang::NoSupportException );

Description
Method to query if the conversion type should be interactive or non-interactive mode.
Parameter aLocal
Locale the conversion is referring to.
Parameter nTextConversionType
One of TextConversionType values.
Parameter nTextConversionOptions
Combination of TextConversionOption values.
Returns
true if the entry is a valid entry for the dictionary false otherwise.
Throws
NoSupportException when nConversionDictionaryType is not known by the implementation, or when the locale is not supported.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.