1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _I18N_INDEXENTRYSUPPLIER_JA_PHONETIC_HXX_ 25 #define _I18N_INDEXENTRYSUPPLIER_JA_PHONETIC_HXX_ 26 27 #include <indexentrysupplier_common.hxx> 28 29 namespace com { namespace sun { namespace star { namespace i18n { 30 31 // ---------------------------------------------------- 32 // class IndexEntrySupplier_ja_phonetic 33 // ---------------------------------------------------- 34 35 class IndexEntrySupplier_ja_phonetic : public IndexEntrySupplier_Common { 36 public: IndexEntrySupplier_ja_phonetic(const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> & rxMSF)37 IndexEntrySupplier_ja_phonetic( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF ) : IndexEntrySupplier_Common(rxMSF) { 38 implementationName = "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic"; 39 }; 40 virtual rtl::OUString SAL_CALL getIndexCharacter( const rtl::OUString& rIndexEntry,\ 41 const com::sun::star::lang::Locale& rLocale, const rtl::OUString& rSortAlgorithm ) \ 42 throw (com::sun::star::uno::RuntimeException);\ 43 virtual rtl::OUString SAL_CALL getIndexKey( const rtl::OUString& IndexEntry, \ 44 const rtl::OUString& PhoneticEntry, const com::sun::star::lang::Locale& rLocale )\ 45 throw (com::sun::star::uno::RuntimeException);\ 46 virtual sal_Int16 SAL_CALL compareIndexEntry( const rtl::OUString& IndexEntry1,\ 47 const rtl::OUString& PhoneticEntry1, const com::sun::star::lang::Locale& rLocale1,\ 48 const rtl::OUString& IndexEntry2, const ::rtl::OUString& PhoneticEntry2,\ 49 const com::sun::star::lang::Locale& rLocale2 )\ 50 throw (com::sun::star::uno::RuntimeException);\ 51 }; 52 53 #define INDEXENTRYSUPPLIER_JA_PHONETIC( algorithm ) \ 54 class IndexEntrySupplier_##algorithm : public IndexEntrySupplier_ja_phonetic {\ 55 public:\ 56 IndexEntrySupplier_##algorithm (const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF) : IndexEntrySupplier_ja_phonetic (rxMSF) {\ 57 implementationName = "com.sun.star.i18n.IndexEntrySupplier_"#algorithm;\ 58 };\ 59 virtual sal_Bool SAL_CALL loadAlgorithm(\ 60 const com::sun::star::lang::Locale& rLocale,\ 61 const rtl::OUString& SortAlgorithm, sal_Int32 collatorOptions ) \ 62 throw (com::sun::star::uno::RuntimeException);\ 63 }; 64 65 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_syllable ) 66 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_consonant ) 67 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_syllable ) 68 INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_consonant ) 69 70 } } } } 71 #endif 72