1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_linguistic2_XConversionDictionaryList_idl__ 28#define __com_sun_star_linguistic2_XConversionDictionaryList_idl__ 29 30 31#ifndef __com_sun_star_uno_XInterface_idl__ 32#include <com/sun/star/uno/XInterface.idl> 33#endif 34 35#ifndef __com_sun_star_container_XNameContainer_idl__ 36#include <com/sun/star/container/XNameContainer.idl> 37#endif 38 39#ifndef __com_sun_star_linguistic2_XConversionDictionary_idl__ 40#include <com/sun/star/linguistic2/XConversionDictionary.idl> 41#endif 42 43#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 44#include <com/sun/star/lang/IllegalArgumentException.idl> 45#endif 46 47#ifndef __com_sun_star_lang_NoSupportException_idl__ 48#include <com/sun/star/lang/NoSupportException.idl> 49#endif 50 51#ifndef __com_sun_star_container_ElementExistException_idl__ 52#include <com/sun/star/container/ElementExistException.idl> 53#endif 54 55 56//============================================================================= 57 58module com { module sun { module star { module linguistic2 { 59 60//============================================================================= 61/** is used to manage and maintain a list of conversion dictionaries. 62 63 <p>The dictionaries added to the list may or may not support the 64 <type scope="com::sun::star::util">XFlushable</type> interface. 65 If they do those dictionaries have to be flushed upon termination 66 of the dictionary list.</p> 67 68 @since OOo 1.1.2 69*/ 70published interface XConversionDictionaryList : com::sun::star::uno::XInterface 71{ 72 //------------------------------------------------------------------------- 73 /** 74 @returns 75 the name container interface to the dictionaries in the list. 76 77 <p>The interface can be used to add, remove or retrieve dictionaries 78 from the list by specifying the name of the dictionary, and 79 (in case of inserting) the interface to the dictionary as second 80 parameter.</p> 81 82 <p>A dictionary to be added must support the 83 <type scope="com::sun::star::linguistic2">XConversionDictionary</type> 84 interface. 85 The dictionary to be added needs not necessarily be created by 86 this service.</p> 87 88 <p>The <member scope="com::sun::star::container::XNameReplace">replaceByName</member> 89 function is implemented empty since renaming of dictionaries 90 is not allowed.</p> 91 */ 92 com::sun::star::container::XNameContainer getDictionaryContainer(); 93 94 //------------------------------------------------------------------------- 95 /** creates a new dictionary and adds it to the dictionary list. 96 97 <p>The dictionary will be empty and active.</p> 98 99 @returns 100 an empty dictionary with the given name, locale and 101 conversion type. 102 <NULL/> on failure. 103 104 @param aName 105 is the name of the dictionary (should be unique). 106 107 @param aLocale 108 defines the language of the dictionary. 109 110 @param nConversionDictionaryType 111 One of <type scope="com::sun::star::linguistic2">ConversionDictionaryType</type> values. 112 113 @throws NoSupportException 114 when <var>nConversionDictionaryType</var> is not known by the implementation. 115 116 @throws ElementExistException 117 when a dictionary with the specified name already exists. 118 */ 119 com::sun::star::linguistic2::XConversionDictionary addNewDictionary( 120 [in] string aName, 121 [in] com::sun::star::lang::Locale aLocale, 122 [in] short nConversionDictionaryType ) 123 raises( com::sun::star::lang::NoSupportException, 124 com::sun::star::container::ElementExistException ); 125 126 //------------------------------------------------------------------------- 127 /** searches for entries that match the given text. 128 129 <p>All active dictionaries with matching locales and conversion 130 type will be searched 131 for entries matching the given text.</p> 132 133 <p>The exact string to be looked for is the substring from the 134 aText parameter that starts at position nStartPos and has the 135 length nLength.</p> 136 137 @returns 138 the list of entries found. If no entry was found, 139 it is empty. 140 141 @param aText 142 the text where the substring to be looked for will be taken from. 143 @param nStartPos 144 the starting pos of the substring to be looked for. 145 @param nLength 146 the length of the substring to be looked for. 147 148 149 @param aLocale 150 Locale the conversion is refered to. 151 152 @param nConversionDictionaryType 153 specifies the type of conversion the dictionary 154 can be used for. It is one of 155 <type scope="com::sun::star::linguistic2">ConversionDictionaryType</type>. 156 157 @param eConversionDirection 158 specifies the direction of the conversion to look for. 159 It is one of 160 <type scope="com::sun::star::linguistic2">ConversionDirection</type>. 161 162 @param nTextConversionOptions 163 Combination of <type scope="com::sun::star::i18n">TextConversionOption</type> 164 values. 165 166 @throws com::sun::star::lang::IllegalArgumentException 167 if the nTextConversionOptions parameter is invalid for 168 the given locale. 169 170 @throws NoSupportException 171 when <var>nConversionDictionaryType</var> is not known by the implementation, 172 or when the locale is not supported (i.e. there are no dictionaries 173 for that locale available). 174 */ 175 sequence< string > queryConversions( 176 [in] string aText, 177 [in] long nStartPos, 178 [in] long nLength, 179 [in] com::sun::star::lang::Locale aLocale, 180 [in] short nConversionDictionaryType, 181 [in] com::sun::star::linguistic2::ConversionDirection eDirection, 182 [in] long nTextConversionOptions ) 183 raises( com::sun::star::lang::IllegalArgumentException, 184 com::sun::star::lang::NoSupportException ); 185 186 //------------------------------------------------------------------------- 187 /** returns the maximum number of characters used as left or right text 188 in entries. 189 190 <p>All active dictionaries of the specified locale and type 191 will be looked up to get the result.</p> 192 <p>The parameter eDirection specifies if only the left text or the 193 right text from entries should be considered.</p> 194 195 @param aLocale 196 Locale the conversion is refered to. 197 @param nConversionDictionaryType 198 specifies the type of conversion dictionaries to be looked up. 199 It is one of 200 <type scope="com::sun::star::linguistic2">ConversionDictionaryType</type>. 201 @param eDirection 202 specifies if the left text or the right text of entries will 203 be used. 204 205 @see com::sun::star::linguistic2::ConversionDirection 206 */ 207 short queryMaxCharCount( 208 [in] com::sun::star::lang::Locale aLocale, 209 [in] short nConversionDictionaryType, 210 [in] com::sun::star::linguistic2::ConversionDirection eDirection ); 211 212}; 213 214//============================================================================= 215 216}; }; }; }; 217 218#endif 219 220