1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef _I18N_INDEXENTRYSUPPLIER_JA_PHONETIC_HXX_
29 #define _I18N_INDEXENTRYSUPPLIER_JA_PHONETIC_HXX_
31 #include <indexentrysupplier_common.hxx>
33 namespace com
{ namespace sun
{ namespace star
{ namespace i18n
{
35 // ----------------------------------------------------
36 // class IndexEntrySupplier_ja_phonetic
37 // ----------------------------------------------------
39 class IndexEntrySupplier_ja_phonetic
: public IndexEntrySupplier_Common
{
41 IndexEntrySupplier_ja_phonetic( const com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
>& rxMSF
) : IndexEntrySupplier_Common(rxMSF
) {
42 implementationName
= "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic";
44 virtual rtl::OUString SAL_CALL
getIndexCharacter( const rtl::OUString
& rIndexEntry
,\
45 const com::sun::star::lang::Locale
& rLocale
, const rtl::OUString
& rSortAlgorithm
) \
46 throw (com::sun::star::uno::RuntimeException
);\
47 virtual rtl::OUString SAL_CALL
getIndexKey( const rtl::OUString
& IndexEntry
, \
48 const rtl::OUString
& PhoneticEntry
, const com::sun::star::lang::Locale
& rLocale
)\
49 throw (com::sun::star::uno::RuntimeException
);\
50 virtual sal_Int16 SAL_CALL
compareIndexEntry( const rtl::OUString
& IndexEntry1
,\
51 const rtl::OUString
& PhoneticEntry1
, const com::sun::star::lang::Locale
& rLocale1
,\
52 const rtl::OUString
& IndexEntry2
, const ::rtl::OUString
& PhoneticEntry2
,\
53 const com::sun::star::lang::Locale
& rLocale2
)\
54 throw (com::sun::star::uno::RuntimeException
);\
57 #define INDEXENTRYSUPPLIER_JA_PHONETIC( algorithm ) \
58 class IndexEntrySupplier_##algorithm : public IndexEntrySupplier_ja_phonetic {\
60 IndexEntrySupplier_##algorithm (const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF) : IndexEntrySupplier_ja_phonetic (rxMSF) {\
61 implementationName = "com.sun.star.i18n.IndexEntrySupplier_"#algorithm;\
63 virtual sal_Bool SAL_CALL loadAlgorithm(\
64 const com::sun::star::lang::Locale& rLocale,\
65 const rtl::OUString& SortAlgorithm, sal_Int32 collatorOptions ) \
66 throw (com::sun::star::uno::RuntimeException);\
69 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_syllable
)
70 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_consonant
)
71 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_syllable
)
72 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_consonant
)