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 ************************************************************************/
28 #ifndef _I18N_INDEXENTRYSUPPLIER_DEFAULT_HXX_
29 #define _I18N_INDEXENTRYSUPPLIER_DEFAULT_HXX_
31 #include <indexentrysupplier_common.hxx>
33 namespace com
{ namespace sun
{ namespace star
{ namespace i18n
{
37 // ----------------------------------------------------
38 // class IndexEntrySupplier_Unicode
39 // ----------------------------------------------------
40 class IndexEntrySupplier_Unicode
: public IndexEntrySupplier_Common
{
42 IndexEntrySupplier_Unicode( const com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
>& rxMSF
);
43 ~IndexEntrySupplier_Unicode();
45 virtual sal_Bool SAL_CALL
loadAlgorithm(
46 const com::sun::star::lang::Locale
& rLocale
,
47 const rtl::OUString
& SortAlgorithm
, sal_Int32 collatorOptions
)
48 throw (com::sun::star::uno::RuntimeException
);
50 virtual rtl::OUString SAL_CALL
getIndexKey( const rtl::OUString
& IndexEntry
,
51 const rtl::OUString
& PhoneticEntry
, const com::sun::star::lang::Locale
& rLocale
)
52 throw (com::sun::star::uno::RuntimeException
);
54 virtual sal_Int16 SAL_CALL
compareIndexEntry( const rtl::OUString
& IndexEntry1
,
55 const rtl::OUString
& PhoneticEntry1
, const com::sun::star::lang::Locale
& rLocale1
,
56 const rtl::OUString
& IndexEntry2
, const ::rtl::OUString
& PhoneticEntry2
,
57 const com::sun::star::lang::Locale
& rLocale2
)
58 throw (com::sun::star::uno::RuntimeException
);
60 virtual rtl::OUString SAL_CALL
getIndexCharacter( const rtl::OUString
& rIndexEntry
,
61 const com::sun::star::lang::Locale
& rLocale
, const rtl::OUString
& rSortAlgorithm
)
62 throw (com::sun::star::uno::RuntimeException
);
80 void init(sal_Unicode start_
, sal_Unicode end_
, IndexKey
* keys
, sal_Int16 key_count
, Index
*index
);
93 Index(const com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
>& rxMSF
);
96 void init(const com::sun::star::lang::Locale
& rLocale
, const rtl::OUString
& algorithm
) throw (com::sun::star::uno::RuntimeException
);
98 void makeIndexKeys(const com::sun::star::lang::Locale
&rLocale
, const rtl::OUString
&algorithm
) throw (com::sun::star::uno::RuntimeException
);
99 sal_Int16
getIndexWeight(const rtl::OUString
& rIndexEntry
);
100 rtl::OUString
getIndexDescription(const rtl::OUString
& rIndexEntry
);
102 IndexTable tables
[MAX_TABLES
];
103 sal_Int16 table_count
;
104 IndexKey keys
[MAX_KEYS
];
106 sal_Int16 mkeys
[MAX_KEYS
];
107 sal_Int16 mkey_count
;
108 rtl::OUString skipping_chars
;
109 CollatorImpl
*collator
;
110 sal_Int16
compare(sal_Unicode c1
, sal_Unicode c2
);
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */