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 28#ifndef __com_sun_star_i18n_XExtendedIndexEntrySupplier_idl__ 29#define __com_sun_star_i18n_XExtendedIndexEntrySupplier_idl__ 30 31#include <com/sun/star/i18n/XIndexEntrySupplier.idl> 32#include <com/sun/star/lang/Locale.idl> 33 34//============================================================================= 35 36module com { module sun { module star { module i18n { 37 38//============================================================================= 39 40 41/** 42 This interface provides information for creating "Table of Index" 43 44 <p> It is derived from 45 <type scope="::com::sun::star::i18n">XIndexEntrySupplier</type> and 46 provides following additional functionalities.</p> 47 <ul> 48 <li>Provide supported language/locale list. 49 <li>Provide supported algorithm list. 50 <li>Provide phonetic entry support for CJK languge. 51 <li>Provide method to compare index entry. 52 </ul> 53 54 @since OOo 1.1.2 55 */ 56published interface XExtendedIndexEntrySupplier : ::com::sun::star::i18n::XIndexEntrySupplier 57{ 58 //------------------------------------------------------------------------- 59 /** 60 Returns locale list for which the IndexEntrySupplier provides service. 61 */ 62 sequence < com::sun::star::lang::Locale > getLocaleList(); 63 64 //------------------------------------------------------------------------- 65 /** 66 Returns index algorithm list for specific locale 67 */ 68 sequence < string > getAlgorithmList( 69 [in] com::sun::star::lang::Locale aLocale ); 70 71 //------------------------------------------------------------------------- 72 /** 73 Checks if Phonetic Entry should be used for the locale. 74 */ 75 boolean usePhoneticEntry( [in] com::sun::star::lang::Locale aLocale); 76 77 //------------------------------------------------------------------------- 78 /** 79 Returns phonetic candidate for index entry for the locale. 80 */ 81 string getPhoneticCandidate( [in] string aIndexEntry, 82 [in] com::sun::star::lang::Locale aLocale); 83 84 //------------------------------------------------------------------------- 85 /** 86 Loads index algorithm for the locale. 87 88 @param aIndexAlgorithm 89 Index algorithm to be loaded. 90 91 @param nCollatorOptions 92 Sorting option of <type 93 scope="::com::sun::star::i18n">CollatorOptions</type> for 94 comparing index entries 95 96 @return 97 <TRUE/> if algorithm successfully loaded, 98 <FALSE/> else. 99 */ 100 boolean loadAlgorithm( [in] com::sun::star::lang::Locale aLocale, 101 [in] string aIndexAlgorithm, 102 [in] long nCollatorOptions ); 103 104 //------------------------------------------------------------------------- 105 /** 106 Returns index key. 107 108 <p> Note that loadAlgorithm should be called before calling 109 this function. </p> 110 111 @param aIndexEntry 112 Index entry 113 114 @param aPhoneticEntry 115 Phonetic entry 116 117 @param aLocale 118 Language attribute for index and phonetic entry. <br/> 119 aLocale and the locale in loadAlgorithm may be different. 120 In the case they are different, phonetic entry will not 121 be used in the index key generation. 122 */ 123 string getIndexKey( [in] string aIndexEntry, [in] string aPhoneticEntry, 124 [in] com::sun::star::lang::Locale aLocale ); 125 126 //------------------------------------------------------------------------- 127 /** 128 Compares index entries 129 130 <p> Note that loadAlgorithm should be called before calling 131 this function. </p> 132 133 @param aIndexEntry1 134 @param aIndexEntry2 135 Index entries to be compared 136 137 @param aPhoneticEntry1 138 @param aPhoneticEntry2 139 Phonetic entries to be compared 140 141 @param aLocale1 142 @param aLocale2 143 Language attribute for index and phonetic entry. <br/> 144 aLocale and the locale in loadAlgorithm may be different. 145 In the case they are different, phonetic entry will not 146 be used in the index key generation. 147 */ 148 short compareIndexEntry( [in] string aIndexEntry1, [in] string aPhoneticEntry1, 149 [in] com::sun::star::lang::Locale aLocale1, 150 [in] string aIndexEntry2, [in] string aPhoneticEntry2, 151 [in] com::sun::star::lang::Locale aLocale2 ); 152}; 153 154//============================================================================= 155}; }; }; }; 156 157#endif 158