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 .
20 #ifndef INCLUDED_I18NPOOL_INC_INDEXENTRYSUPPLIER_JA_PHONETIC_HXX
21 #define INCLUDED_I18NPOOL_INC_INDEXENTRYSUPPLIER_JA_PHONETIC_HXX
23 #include "indexentrysupplier_common.hxx"
28 // class IndexEntrySupplier_ja_phonetic
31 class IndexEntrySupplier_ja_phonetic
: public IndexEntrySupplier_Common
{
33 IndexEntrySupplier_ja_phonetic( const css::uno::Reference
< css::uno::XComponentContext
>& rxContext
) : IndexEntrySupplier_Common(rxContext
) {
34 implementationName
= "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic";
36 virtual OUString SAL_CALL
getIndexCharacter( const OUString
& rIndexEntry
,
37 const css::lang::Locale
& rLocale
, const OUString
& rSortAlgorithm
) override
;
38 virtual OUString SAL_CALL
getIndexKey( const OUString
& IndexEntry
,
39 const OUString
& PhoneticEntry
, const css::lang::Locale
& rLocale
) override
;
40 virtual sal_Int16 SAL_CALL
compareIndexEntry( const OUString
& IndexEntry1
,
41 const OUString
& PhoneticEntry1
, const css::lang::Locale
& rLocale1
,
42 const OUString
& IndexEntry2
, const OUString
& PhoneticEntry2
,
43 const css::lang::Locale
& rLocale2
) override
;
46 #define INDEXENTRYSUPPLIER_JA_PHONETIC( algorithm ) \
47 class IndexEntrySupplier_##algorithm : public IndexEntrySupplier_ja_phonetic {\
49 IndexEntrySupplier_##algorithm (const css::uno::Reference < css::uno::XComponentContext >& rxContext) : IndexEntrySupplier_ja_phonetic (rxContext) {\
50 implementationName = "com.sun.star.i18n.IndexEntrySupplier_"#algorithm;\
52 virtual sal_Bool SAL_CALL loadAlgorithm(\
53 const css::lang::Locale& rLocale,\
54 const OUString& SortAlgorithm, sal_Int32 collatorOptions ) override;\
57 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_syllable
)
58 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_consonant
)
59 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_syllable
)
60 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_consonant
)
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */