Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / i18n / XExtendedIndexEntrySupplier.idl
blobe0330f3fd86b42ced1005ee107b4c98d84ce6a4b
1 /*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XExtendedIndexEntrySupplier.idl,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_i18n_XExtendedIndexEntrySupplier_idl__
32 #define __com_sun_star_i18n_XExtendedIndexEntrySupplier_idl__
34 #include <com/sun/star/i18n/XIndexEntrySupplier.idl>
35 #include <com/sun/star/lang/Locale.idl>
37 //=============================================================================
39 module com { module sun { module star { module i18n {
41 //=============================================================================
44 /**
45 This interface provides information for creating "Table of Index"
47 <p> It is derived from
48 <type scope="::com::sun::star::i18n">XIndexEntrySupplier</type> and
49 provides following additional functionalities.</p>
50 <ul>
51 <li>Provide supported language/locale list.
52 <li>Provide supported algorithm list.
53 <li>Provide phonetic entry support for CJK languge.
54 <li>Provide method to compare index entry.
55 </ul>
57 @since OOo 1.1.2
59 published interface XExtendedIndexEntrySupplier : ::com::sun::star::i18n::XIndexEntrySupplier
61 //-------------------------------------------------------------------------
62 /**
63 Returns locale list for which the IndexEntrySupplier provides service.
65 sequence < com::sun::star::lang::Locale > getLocaleList();
67 //-------------------------------------------------------------------------
68 /**
69 Returns index algorithm list for specific locale
71 sequence < string > getAlgorithmList(
72 [in] com::sun::star::lang::Locale aLocale );
74 //-------------------------------------------------------------------------
75 /**
76 Checks if Phonetic Entry should be used for the locale.
78 boolean usePhoneticEntry( [in] com::sun::star::lang::Locale aLocale);
80 //-------------------------------------------------------------------------
81 /**
82 Returns phonetic candidate for index entry for the locale.
84 string getPhoneticCandidate( [in] string aIndexEntry,
85 [in] com::sun::star::lang::Locale aLocale);
87 //-------------------------------------------------------------------------
88 /**
89 Loads index algorithm for the locale.
91 @param aIndexAlgorithm
92 Index algorithm to be loaded.
94 @param nCollatorOptions
95 Sorting option of <type
96 scope="::com::sun::star::i18n">CollatorOptions</type> for
97 comparing index entries
99 @return
100 <TRUE/> if algorithm successfully loaded,
101 <FALSE/> else.
103 boolean loadAlgorithm( [in] com::sun::star::lang::Locale aLocale,
104 [in] string aIndexAlgorithm,
105 [in] long nCollatorOptions );
107 //-------------------------------------------------------------------------
109 Returns index key.
111 <p> Note that loadAlgorithm should be called before calling
112 this function. </p>
114 @param aIndexEntry
115 Index entry
117 @param aPhoneticEntry
118 Phonetic entry
120 @param aLocale
121 Language attribute for index and phonetic entry. <br/>
122 aLocale and the locale in loadAlgorithm may be different.
123 In the case they are different, phonetic entry will not
124 be used in the index key generation.
126 string getIndexKey( [in] string aIndexEntry, [in] string aPhoneticEntry,
127 [in] com::sun::star::lang::Locale aLocale );
129 //-------------------------------------------------------------------------
131 Compares index entries
133 <p> Note that loadAlgorithm should be called before calling
134 this function. </p>
136 @param aIndexEntry1
137 @param aIndexEntry2
138 Index entries to be compared
140 @param aPhoneticEntry1
141 @param aPhoneticEntry2
142 Phonetic entries to be compared
144 @param aLocale1
145 @param aLocale2
146 Language attribute for index and phonetic entry. <br/>
147 aLocale and the locale in loadAlgorithm may be different.
148 In the case they are different, phonetic entry will not
149 be used in the index key generation.
151 short compareIndexEntry( [in] string aIndexEntry1, [in] string aPhoneticEntry1,
152 [in] com::sun::star::lang::Locale aLocale1,
153 [in] string aIndexEntry2, [in] string aPhoneticEntry2,
154 [in] com::sun::star::lang::Locale aLocale2 );
157 //=============================================================================
158 }; }; }; };
160 #endif