| /************************************************************** |
| * |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| * |
| *************************************************************/ |
| |
| |
| |
| #ifndef __com_sun_star_i18n_XTextConversion_idl__ |
| #define __com_sun_star_i18n_XTextConversion_idl__ |
| |
| #ifndef __com_sun_star_uno_XInterface_idl__ |
| #include <com/sun/star/uno/XInterface.idl> |
| #endif |
| |
| #ifndef __com_sun_star_lang_Locale_idl__ |
| #include <com/sun/star/lang/Locale.idl> |
| #endif |
| |
| #ifndef __com_sun_star_i18n_TextConversionResult_idl__ |
| #include <com/sun/star/i18n/TextConversionResult.idl> |
| #endif |
| |
| #ifndef __com_sun_star_lang_IllegalArgumentException_idl__ |
| #include <com/sun/star/lang/IllegalArgumentException.idl> |
| #endif |
| |
| #ifndef __com_sun_star_lang_NoSupportException_idl__ |
| #include <com/sun/star/lang/NoSupportException.idl> |
| #endif |
| |
| |
| //============================================================================= |
| |
| module com { module sun { module star { module i18n { |
| |
| //============================================================================= |
| |
| /** Method to convert text from one type to another |
| |
| @since OpenOffice 1.1.2 |
| */ |
| published interface XTextConversion : ::com::sun::star::uno::XInterface |
| { |
| //--------------------------------------------------------------------- |
| /** Method to search dictionaries for the conversion candidates. |
| |
| @param aText |
| Text string to be converted. |
| @param nStartPos |
| The start position in aText for the conversion |
| @param nLength |
| The length of the partion in aText for the conversion |
| @param aLocal |
| Locale the conversion is referring to. |
| @param nTextConversionType |
| One of <type>TextConversionType</type> values. |
| @param nTextConversionOptions |
| Combination of <type>TextConversionOption</type> values. |
| @returns |
| <type>TextConversionResult</type> |
| |
| @throws NoSupportException |
| when <var>nConversionDictionaryType</var> is not known by the implementation, |
| or when the locale is not supported. |
| */ |
| 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 ); |
| |
| //--------------------------------------------------------------------- |
| /** 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. |
| |
| @param aText |
| Text string to be converted. |
| @param nStartPos |
| The start position in aText for the conversion |
| @param nLength |
| The length of the partion in aText for the conversion |
| @param aLocal |
| Locale the conversion is referring to. |
| @param nTextConversionType |
| One of <type>TextConversionType</type> values. |
| @param nTextConversionOptions |
| Combination of <type>TextConversionOption</type> values. |
| @returns |
| Converted text |
| |
| @throws NoSupportException |
| when <var>nConversionDictionaryType</var> is not known by the implementation, |
| or when the locale is not supported. |
| */ |
| 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 ); |
| |
| //--------------------------------------------------------------------- |
| /** Method to query if the conversion type should be interactive or |
| non-interactive mode. |
| |
| @param aLocal |
| Locale the conversion is referring to. |
| @param nTextConversionType |
| One of <type>TextConversionType</type> values. |
| @param nTextConversionOptions |
| Combination of <type>TextConversionOption</type> values. |
| @returns |
| <TRUE/> if the entry is a valid entry for the dictionary |
| <FALSE/> otherwise. |
| |
| @throws NoSupportException |
| when <var>nConversionDictionaryType</var> is not known by the implementation, |
| or when the locale is not supported. |
| */ |
| 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 ); |
| }; |
| |
| |
| //============================================================================= |
| |
| }; }; }; }; |
| |
| #endif |