1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef __com_sun_star_i18n_XExtendedIndexEntrySupplier_idl__
30 #define __com_sun_star_i18n_XExtendedIndexEntrySupplier_idl__
32 #include
<com
/sun
/star
/i18n
/XIndexEntrySupplier.idl
>
33 #include
<com
/sun
/star
/lang
/Locale.idl
>
35 //=============================================================================
37 module com
{ module sun
{ module star
{ module i18n
{
39 //=============================================================================
43 This interface provides information for creating "Table of Index"
45 <p> It is derived from
46 <type scope="::com::sun::star::i18n">XIndexEntrySupplier</type> and
47 provides following additional functionalities.</p>
49 <li>Provide supported language/locale list.
50 <li>Provide supported algorithm list.
51 <li>Provide phonetic entry support for CJK language.
52 <li>Provide method to compare index entry.
57 published
interface XExtendedIndexEntrySupplier
: ::com
::sun
::star
::i18n
::XIndexEntrySupplier
59 //-------------------------------------------------------------------------
61 Returns locale list for which the IndexEntrySupplier provides service.
63 sequence
< com
::sun
::star
::lang
::Locale
> getLocaleList
();
65 //-------------------------------------------------------------------------
67 Returns index algorithm list for specific locale
69 sequence
< string > getAlgorithmList
(
70 [in] com
::sun
::star
::lang
::Locale aLocale
);
72 //-------------------------------------------------------------------------
74 Checks if Phonetic Entry should be used for the locale.
76 boolean usePhoneticEntry
( [in] com
::sun
::star
::lang
::Locale aLocale
);
78 //-------------------------------------------------------------------------
80 Returns phonetic candidate for index entry for the locale.
82 string getPhoneticCandidate
( [in] string aIndexEntry
,
83 [in] com
::sun
::star
::lang
::Locale aLocale
);
85 //-------------------------------------------------------------------------
87 Loads index algorithm for the locale.
89 @param aIndexAlgorithm
90 Index algorithm to be loaded.
92 @param nCollatorOptions
93 Sorting option of <type
94 scope="::com::sun::star::i18n">CollatorOptions</type> for
95 comparing index entries
98 <TRUE/> if algorithm successfully loaded,
101 boolean loadAlgorithm
( [in] com
::sun
::star
::lang
::Locale aLocale
,
102 [in] string aIndexAlgorithm
,
103 [in] long nCollatorOptions
);
105 //-------------------------------------------------------------------------
109 <p> Note that loadAlgorithm should be called before calling
115 @param aPhoneticEntry
119 Language attribute for index and phonetic entry. <br/>
120 aLocale and the locale in loadAlgorithm may be different.
121 In the case they are different, phonetic entry will not
122 be used in the index key generation.
124 string getIndexKey
( [in] string aIndexEntry
, [in] string aPhoneticEntry
,
125 [in] com
::sun
::star
::lang
::Locale aLocale
);
127 //-------------------------------------------------------------------------
129 Compares index entries
131 <p> Note that loadAlgorithm should be called before calling
136 Index entries to be compared
138 @param aPhoneticEntry1
139 @param aPhoneticEntry2
140 Phonetic entries to be compared
144 Language attribute for index and phonetic entry. <br/>
145 aLocale and the locale in loadAlgorithm may be different.
146 In the case they are different, phonetic entry will not
147 be used in the index key generation.
149 short compareIndexEntry
( [in] string aIndexEntry1
, [in] string aPhoneticEntry1
,
150 [in] com
::sun
::star
::lang
::Locale aLocale1
,
151 [in] string aIndexEntry2
, [in] string aPhoneticEntry2
,
152 [in] com
::sun
::star
::lang
::Locale aLocale2
);
155 //=============================================================================
160 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */