32 const css::lang::Locale& ,
const OUString& )
36 if (
first == 0xFFFF) {
38 return OUString(&
idxStr[(
ch & 0xFF00) ? 0 :
ch], 1);
41 return OUString(&idx2[
first + (
ch & 0xff) ], 1);
46 const OUString& PhoneticEntry,
const css::lang::Locale& rLocale )
48 return getIndexCharacter( PhoneticEntry.isEmpty() ? IndexEntry : PhoneticEntry , rLocale, OUString());
52 const OUString& IndexEntry1,
const OUString& PhoneticEntry1,
const css::lang::Locale& rLocale1,
53 const OUString& IndexEntry2,
const OUString& PhoneticEntry2,
const css::lang::Locale& rLocale2 )
55 sal_Int16
result = sal::static_int_cast<sal_Int16>(
collator->compareString(
61 IndexEntry1, PhoneticEntry1, rLocale1,
62 IndexEntry2, PhoneticEntry2, rLocale2);
66constexpr OUStringLiteral
first =
u"phonetic (alphanumeric first)";
67sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable::loadAlgorithm(
68 const css::lang::Locale& rLocale,
const OUString& ,
69 sal_Int32 collatorOptions )
71 return collator->loadCollatorAlgorithm(
first, rLocale, collatorOptions) == 0;
73sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant::loadAlgorithm(
74 const css::lang::Locale& rLocale,
const OUString& ,
75 sal_Int32 collatorOptions )
77 return collator->loadCollatorAlgorithm(
first, rLocale, collatorOptions) == 0;
80constexpr OUStringLiteral
last =
u"phonetic (alphanumeric last)";
81sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable::loadAlgorithm(
82 const css::lang::Locale& rLocale,
const OUString& ,
83 sal_Int32 collatorOptions )
85 return collator->loadCollatorAlgorithm(
last, rLocale, collatorOptions) == 0;
87sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant::loadAlgorithm(
88 const css::lang::Locale& rLocale,
const OUString& ,
89 sal_Int32 collatorOptions )
91 return collator->loadCollatorAlgorithm(
last, rLocale, collatorOptions) == 0;
rtl::Reference< CollatorImpl > collator
const char * implementationName
virtual sal_Int16 SAL_CALL compareIndexEntry(const OUString &IndexEntry1, const OUString &PhoneticEntry1, const css::lang::Locale &rLocale1, const OUString &IndexEntry2, const OUString &PhoneticEntry2, const css::lang::Locale &rLocale2) override
virtual sal_Int16 SAL_CALL compareIndexEntry(const OUString &IndexEntry1, const OUString &PhoneticEntry1, const css::lang::Locale &rLocale1, const OUString &IndexEntry2, const OUString &PhoneticEntry2, const css::lang::Locale &rLocale2) override
virtual OUString SAL_CALL getIndexKey(const OUString &IndexEntry, const OUString &PhoneticEntry, const css::lang::Locale &rLocale) override
virtual OUString SAL_CALL getIndexCharacter(const OUString &rIndexEntry, const css::lang::Locale &rLocale, const OUString &rSortAlgorithm) override
const sal_Unicode idxStr[]
const sal_Unicode consonant[]
const sal_Unicode syllable[]
Constant values shared between i18npool and, for example, the number formatter.
constexpr OUStringLiteral first
constexpr OUStringLiteral last