1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
21 module com
{ module sun
{ module star
{ module i18n
{
26 This interface provides information for creating "Table of Index"
28 <p> It is derived from
29 ::com::sun::star::i18n::XIndexEntrySupplier and
30 provides following additional functionalities.</p>
32 <li>Provide supported language/locale list.
33 <li>Provide supported algorithm list.
34 <li>Provide phonetic entry support for CJK language.
35 <li>Provide method to compare index entry.
40 published
interface XExtendedIndexEntrySupplier
: ::com
::sun
::star
::i18n
::XIndexEntrySupplier
43 Returns locale list for which the IndexEntrySupplier provides service.
45 sequence
< com
::sun
::star
::lang
::Locale
> getLocaleList
();
48 Returns index algorithm list for specific locale
50 sequence
< string > getAlgorithmList
(
51 [in] com
::sun
::star
::lang
::Locale aLocale
);
54 Checks if Phonetic Entry should be used for the locale.
56 boolean usePhoneticEntry
( [in] com
::sun
::star
::lang
::Locale aLocale
);
59 Returns phonetic candidate for index entry for the locale.
61 string getPhoneticCandidate
( [in] string aIndexEntry
,
62 [in] com
::sun
::star
::lang
::Locale aLocale
);
65 Loads index algorithm for the locale.
70 @param aIndexAlgorithm
71 Index algorithm to be loaded.
73 @param nCollatorOptions
74 Sorting option of ::com::sun::star::i18n::CollatorOptions for
75 comparing index entries
78 `TRUE` if algorithm successfully loaded,
81 boolean loadAlgorithm
( [in] com
::sun
::star
::lang
::Locale aLocale
,
82 [in] string aIndexAlgorithm
,
83 [in] long nCollatorOptions
);
88 <p> Note that loadAlgorithm should be called before calling
98 Language attribute for index and phonetic entry. <br/>
99 aLocale and the locale in loadAlgorithm may be different.
100 In the case they are different, phonetic entry will not
101 be used in the index key generation.
103 string getIndexKey
( [in] string aIndexEntry
, [in] string aPhoneticEntry
,
104 [in] com
::sun
::star
::lang
::Locale aLocale
);
107 Compares index entries
109 <p> Note that loadAlgorithm should be called before calling
114 Index entries to be compared
116 @param aPhoneticEntry1
117 @param aPhoneticEntry2
118 Phonetic entries to be compared
122 Language attribute for index and phonetic entry. <br/>
123 aLocale and the locale in loadAlgorithm may be different.
124 In the case they are different, phonetic entry will not
125 be used in the index key generation.
127 short compareIndexEntry
( [in] string aIndexEntry1
, [in] string aPhoneticEntry1
,
128 [in] com
::sun
::star
::lang
::Locale aLocale1
,
129 [in] string aIndexEntry2
, [in] string aPhoneticEntry2
,
130 [in] com
::sun
::star
::lang
::Locale aLocale2
);
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */