Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / i18n / XExtendedIndexEntrySupplier.idl
blobe640fceda08120bab83ebe26f2fd239576128781
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_i18n_XExtendedIndexEntrySupplier_idl__
21 #define __com_sun_star_i18n_XExtendedIndexEntrySupplier_idl__
23 #include <com/sun/star/i18n/XIndexEntrySupplier.idl>
24 #include <com/sun/star/lang/Locale.idl>
27 module com { module sun { module star { module i18n {
31 /**
32 This interface provides information for creating "Table of Index"
34 <p> It is derived from
35 ::com::sun::star::i18n::XIndexEntrySupplier and
36 provides following additional functionalities.</p>
37 <ul>
38 <li>Provide supported language/locale list.
39 <li>Provide supported algorithm list.
40 <li>Provide phonetic entry support for CJK language.
41 <li>Provide method to compare index entry.
42 </ul>
44 @since OOo 1.1.2
46 published interface XExtendedIndexEntrySupplier : ::com::sun::star::i18n::XIndexEntrySupplier
48 /**
49 Returns locale list for which the IndexEntrySupplier provides service.
51 sequence < com::sun::star::lang::Locale > getLocaleList();
53 /**
54 Returns index algorithm list for specific locale
56 sequence < string > getAlgorithmList(
57 [in] com::sun::star::lang::Locale aLocale );
59 /**
60 Checks if Phonetic Entry should be used for the locale.
62 boolean usePhoneticEntry( [in] com::sun::star::lang::Locale aLocale);
64 /**
65 Returns phonetic candidate for index entry for the locale.
67 string getPhoneticCandidate( [in] string aIndexEntry,
68 [in] com::sun::star::lang::Locale aLocale);
70 /**
71 Loads index algorithm for the locale.
73 @param aLocale
74 The locale.
76 @param aIndexAlgorithm
77 Index algorithm to be loaded.
79 @param nCollatorOptions
80 Sorting option of ::com::sun::star::i18n::CollatorOptions for
81 comparing index entries
83 @return
84 `TRUE` if algorithm successfully loaded,
85 `FALSE` else.
87 boolean loadAlgorithm( [in] com::sun::star::lang::Locale aLocale,
88 [in] string aIndexAlgorithm,
89 [in] long nCollatorOptions );
91 /**
92 Returns index key.
94 <p> Note that loadAlgorithm should be called before calling
95 this function. </p>
97 @param aIndexEntry
98 Index entry
100 @param aPhoneticEntry
101 Phonetic entry
103 @param aLocale
104 Language attribute for index and phonetic entry. <br/>
105 aLocale and the locale in loadAlgorithm may be different.
106 In the case they are different, phonetic entry will not
107 be used in the index key generation.
109 string getIndexKey( [in] string aIndexEntry, [in] string aPhoneticEntry,
110 [in] com::sun::star::lang::Locale aLocale );
113 Compares index entries
115 <p> Note that loadAlgorithm should be called before calling
116 this function. </p>
118 @param aIndexEntry1
119 @param aIndexEntry2
120 Index entries to be compared
122 @param aPhoneticEntry1
123 @param aPhoneticEntry2
124 Phonetic entries to be compared
126 @param aLocale1
127 @param aLocale2
128 Language attribute for index and phonetic entry. <br/>
129 aLocale and the locale in loadAlgorithm may be different.
130 In the case they are different, phonetic entry will not
131 be used in the index key generation.
133 short compareIndexEntry( [in] string aIndexEntry1, [in] string aPhoneticEntry1,
134 [in] com::sun::star::lang::Locale aLocale1,
135 [in] string aIndexEntry2, [in] string aPhoneticEntry2,
136 [in] com::sun::star::lang::Locale aLocale2 );
139 }; }; }; };
141 #endif
143 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */