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 _I18N_INDEXENTRYSUPPLIER_JA_PHONETIC_HXX_
30 #define _I18N_INDEXENTRYSUPPLIER_JA_PHONETIC_HXX_
32 #include <indexentrysupplier_common.hxx>
34 namespace com
{ namespace sun
{ namespace star
{ namespace i18n
{
36 // ----------------------------------------------------
37 // class IndexEntrySupplier_ja_phonetic
38 // ----------------------------------------------------
40 class IndexEntrySupplier_ja_phonetic
: public IndexEntrySupplier_Common
{
42 IndexEntrySupplier_ja_phonetic( const com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
>& rxMSF
) : IndexEntrySupplier_Common(rxMSF
) {
43 implementationName
= "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic";
45 virtual rtl::OUString SAL_CALL
getIndexCharacter( const rtl::OUString
& rIndexEntry
,\
46 const com::sun::star::lang::Locale
& rLocale
, const rtl::OUString
& rSortAlgorithm
) \
47 throw (com::sun::star::uno::RuntimeException
);\
48 virtual rtl::OUString SAL_CALL
getIndexKey( const rtl::OUString
& IndexEntry
, \
49 const rtl::OUString
& PhoneticEntry
, const com::sun::star::lang::Locale
& rLocale
)\
50 throw (com::sun::star::uno::RuntimeException
);\
51 virtual sal_Int16 SAL_CALL
compareIndexEntry( const rtl::OUString
& IndexEntry1
,\
52 const rtl::OUString
& PhoneticEntry1
, const com::sun::star::lang::Locale
& rLocale1
,\
53 const rtl::OUString
& IndexEntry2
, const ::rtl::OUString
& PhoneticEntry2
,\
54 const com::sun::star::lang::Locale
& rLocale2
)\
55 throw (com::sun::star::uno::RuntimeException
);\
58 #define INDEXENTRYSUPPLIER_JA_PHONETIC( algorithm ) \
59 class IndexEntrySupplier_##algorithm : public IndexEntrySupplier_ja_phonetic {\
61 IndexEntrySupplier_##algorithm (const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF) : IndexEntrySupplier_ja_phonetic (rxMSF) {\
62 implementationName = "com.sun.star.i18n.IndexEntrySupplier_"#algorithm;\
64 virtual sal_Bool SAL_CALL loadAlgorithm(\
65 const com::sun::star::lang::Locale& rLocale,\
66 const rtl::OUString& SortAlgorithm, sal_Int32 collatorOptions ) \
67 throw (com::sun::star::uno::RuntimeException);\
70 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_syllable
)
71 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_consonant
)
72 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_syllable
)
73 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_consonant
)
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */