LibreOffice Module i18npool (master)  1
Public Member Functions | Private Attributes | List of all members
i18npool::Collator_Unicode Class Referencefinal

#include <collator_unicode.hxx>

Inheritance diagram for i18npool::Collator_Unicode:
Collaboration diagram for i18npool::Collator_Unicode:

Public Member Functions

 Collator_Unicode ()
virtual ~Collator_Unicode () override
sal_Int32 SAL_CALL compareSubstring (const OUString &s1, sal_Int32 off1, sal_Int32 len1, const OUString &s2, sal_Int32 off2, sal_Int32 len2) override
sal_Int32 SAL_CALL compareString (const OUString &s1, const OUString &s2) override
sal_Int32 SAL_CALL loadCollatorAlgorithm (const OUString &impl, const css::lang::Locale &rLocale, sal_Int32 collatorOptions) override
sal_Int32 SAL_CALL loadDefaultCollator (const css::lang::Locale &, sal_Int32) override
void SAL_CALL loadCollatorAlgorithmWithEndUserOption (const OUString &, const css::lang::Locale &, const css::uno::Sequence< sal_Int32 > &) override
css::uno::Sequence< OUString > SAL_CALL listCollatorAlgorithms (const css::lang::Locale &) override
css::uno::Sequence< sal_Int32 > SAL_CALL listCollatorOptions (const OUString &) override
virtual OUString SAL_CALL getImplementationName () override
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override

Private Attributes

std::unique_ptr< icu::RuleBasedCollator > uca_base
std::unique_ptr< icu::RuleBasedCollator > collator
oslModule hModule

Detailed Description

Definition at line 34 of file collator_unicode.hxx.

Constructor & Destructor Documentation

i18npool::Collator_Unicode::Collator_Unicode ( )

Definition at line 43 of file collator_unicode.cxx.

References collator, hModule, and uca_base.

i18npool::Collator_Unicode::~Collator_Unicode ( )

Definition at line 52 of file collator_unicode.cxx.

References collator, hModule, and uca_base.

Member Function Documentation

sal_Int32 SAL_CALL i18npool::Collator_Unicode::compareString ( const OUString &  s1,
const OUString &  s2 

Definition at line 128 of file collator_unicode.cxx.

References collator.

sal_Int32 SAL_CALL i18npool::Collator_Unicode::compareSubstring ( const OUString &  s1,
sal_Int32  off1,
sal_Int32  len1,
const OUString &  s2,
sal_Int32  off2,
sal_Int32  len2 

Definition at line 121 of file collator_unicode.cxx.

References collator.

OUString SAL_CALL i18npool::Collator_Unicode::getImplementationName ( )

Definition at line 431 of file collator_unicode.cxx.

References i18npool::implementationName.

Sequence< OUString > SAL_CALL i18npool::Collator_Unicode::getSupportedServiceNames ( )

Definition at line 443 of file collator_unicode.cxx.

css::uno::Sequence< OUString > SAL_CALL i18npool::Collator_Unicode::listCollatorAlgorithms ( const css::lang::Locale &  )

Definition at line 55 of file collator_unicode.hxx.

css::uno::Sequence< sal_Int32 > SAL_CALL i18npool::Collator_Unicode::listCollatorOptions ( const OUString &  )

Definition at line 56 of file collator_unicode.hxx.

sal_Int32 SAL_CALL i18npool::Collator_Unicode::loadCollatorAlgorithm ( const OUString &  impl,
const css::lang::Locale &  rLocale,
sal_Int32  collatorOptions 

ICU collators are loaded using a locale only. ICU uses Variant as collation algorithm name (like de__PHONEBOOK locale), note the empty territory (Country) designator in this special case here. But sometimes the mapping fails, eg for German (from Germany) phonebook, we'll have "de_DE_PHONEBOOK" this one won't be remapping to collation keyword specifiers "de@collation=phonebook" See, Level 2 canonicalization, 8. So let variant empty and use the fourth arg of icuLocale "keywords" See LanguageTagIcu::getIcuLocale from i18nlangtag/source/languagetag/languagetagicu.cxx The icu::Locale constructor changes the algorithm name to uppercase itself, so we don't have to bother with that.

Definition at line 141 of file collator_unicode.cxx.

References aBuf, collator, i18npool::LocaleDataImpl::get(), LanguageTagIcu::getIcuLocale(), hModule, pData, SAL_DLLEXTENSION, SAL_DLLPREFIX, SAL_WARN, status, i18npool::thisModule(), u, and uca_base.

void SAL_CALL i18npool::Collator_Unicode::loadCollatorAlgorithmWithEndUserOption ( const OUString &  ,
const css::lang::Locale &  ,
const css::uno::Sequence< sal_Int32 > &   

Definition at line 53 of file collator_unicode.hxx.

sal_Int32 SAL_CALL i18npool::Collator_Unicode::loadDefaultCollator ( const css::lang::Locale &  ,

Definition at line 52 of file collator_unicode.hxx.

sal_Bool SAL_CALL i18npool::Collator_Unicode::supportsService ( const OUString &  ServiceName)

Definition at line 437 of file collator_unicode.cxx.

References cppu::supportsService().

Member Data Documentation

std::unique_ptr<icu::RuleBasedCollator> i18npool::Collator_Unicode::collator
oslModule i18npool::Collator_Unicode::hModule

Definition at line 66 of file collator_unicode.hxx.

Referenced by Collator_Unicode(), loadCollatorAlgorithm(), and ~Collator_Unicode().

std::unique_ptr<icu::RuleBasedCollator> i18npool::Collator_Unicode::uca_base

Definition at line 64 of file collator_unicode.hxx.

Referenced by Collator_Unicode(), loadCollatorAlgorithm(), and ~Collator_Unicode().

The documentation for this class was generated from the following files: