LibreOffice Module i18npool (master) 1
Classes | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
i18npool::CollatorImpl Class Reference

#include <collatorImpl.hxx>

Inheritance diagram for i18npool::CollatorImpl:
[legend]
Collaboration diagram for i18npool::CollatorImpl:
[legend]

Classes

struct  lookupTableItem
 

Public Member Functions

 CollatorImpl (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~CollatorImpl () override
 
virtual sal_Int32 SAL_CALL compareSubstring (const OUString &s1, sal_Int32 off1, sal_Int32 len1, const OUString &s2, sal_Int32 off2, sal_Int32 len2) override
 
virtual sal_Int32 SAL_CALL compareString (const OUString &s1, const OUString &s2) override
 
virtual sal_Int32 SAL_CALL loadDefaultCollator (const css::lang::Locale &rLocale, sal_Int32 collatorOptions) override
 
virtual sal_Int32 SAL_CALL loadCollatorAlgorithm (const OUString &impl, const css::lang::Locale &rLocale, sal_Int32 collatorOptions) override
 
virtual void SAL_CALL loadCollatorAlgorithmWithEndUserOption (const OUString &impl, const css::lang::Locale &rLocale, const css::uno::Sequence< sal_Int32 > &collatorOptions) override
 
virtual css::uno::Sequence< OUString > SAL_CALL listCollatorAlgorithms (const css::lang::Locale &rLocale) override
 
virtual css::uno::Sequence< sal_Int32 > SAL_CALL listCollatorOptions (const OUString &collatorAlgorithmName) 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
 

Protected Attributes

css::lang::Locale nLocale
 

Private Member Functions

bool createCollator (const css::lang::Locale &rLocale, const OUString &serviceName, const OUString &rSortAlgorithm)
 
void loadCachedCollator (const css::lang::Locale &rLocale, const OUString &rSortAlgorithm)
 

Private Attributes

std::vector< lookupTableItemlookupTable
 
std::optional< lookupTableItemcachedItem
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::i18n::XLocaleData5 > mxLocaleData
 

Detailed Description

Definition at line 39 of file collatorImpl.hxx.

Constructor & Destructor Documentation

◆ CollatorImpl()

i18npool::CollatorImpl::CollatorImpl ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)

Definition at line 34 of file collatorImpl.cxx.

References m_xContext, and mxLocaleData.

◆ ~CollatorImpl()

i18npool::CollatorImpl::~CollatorImpl ( )
overridevirtual

Definition at line 39 of file collatorImpl.cxx.

Member Function Documentation

◆ compareString()

sal_Int32 SAL_CALL i18npool::CollatorImpl::compareString ( const OUString &  s1,
const OUString &  s2 
)
overridevirtual

Reimplemented in i18npool::ChapterCollator.

Definition at line 59 of file collatorImpl.cxx.

References cachedItem, and compareSubstring().

◆ compareSubstring()

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

Reimplemented in i18npool::ChapterCollator.

Definition at line 44 of file collatorImpl.cxx.

References cachedItem, and i.

Referenced by compareString(), and i18npool::ChapterCollator::compareSubstring().

◆ createCollator()

bool i18npool::CollatorImpl::createCollator ( const css::lang::Locale &  rLocale,
const OUString &  serviceName,
const OUString &  rSortAlgorithm 
)
private
Exceptions
css::uno::RuntimeException

Definition at line 138 of file collatorImpl.cxx.

References cachedItem, lookupTable, and m_xContext.

Referenced by loadCachedCollator().

◆ getImplementationName()

OUString SAL_CALL i18npool::CollatorImpl::getImplementationName ( )
overridevirtual

Reimplemented in i18npool::ChapterCollator.

Definition at line 208 of file collatorImpl.cxx.

◆ getSupportedServiceNames()

Sequence< OUString > SAL_CALL i18npool::CollatorImpl::getSupportedServiceNames ( )
overridevirtual

Reimplemented in i18npool::ChapterCollator.

Definition at line 219 of file collatorImpl.cxx.

◆ listCollatorAlgorithms()

Sequence< OUString > SAL_CALL i18npool::CollatorImpl::listCollatorAlgorithms ( const css::lang::Locale &  rLocale)
overridevirtual

Definition at line 105 of file collatorImpl.cxx.

References mxLocaleData, and nLocale.

◆ listCollatorOptions()

Sequence< sal_Int32 > SAL_CALL i18npool::CollatorImpl::listCollatorOptions ( const OUString &  collatorAlgorithmName)
overridevirtual

Definition at line 124 of file collatorImpl.cxx.

References mxLocaleData, and nLocale.

◆ loadCachedCollator()

void i18npool::CollatorImpl::loadCachedCollator ( const css::lang::Locale &  rLocale,
const OUString &  rSortAlgorithm 
)
private

◆ loadCollatorAlgorithm()

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

◆ loadCollatorAlgorithmWithEndUserOption()

void SAL_CALL i18npool::CollatorImpl::loadCollatorAlgorithmWithEndUserOption ( const OUString &  impl,
const css::lang::Locale &  rLocale,
const css::uno::Sequence< sal_Int32 > &  collatorOptions 
)
overridevirtual

Definition at line 96 of file collatorImpl.cxx.

References loadCollatorAlgorithm().

◆ loadDefaultCollator()

sal_Int32 SAL_CALL i18npool::CollatorImpl::loadDefaultCollator ( const css::lang::Locale &  rLocale,
sal_Int32  collatorOptions 
)
overridevirtual

Definition at line 69 of file collatorImpl.cxx.

References loadCollatorAlgorithm(), and mxLocaleData.

◆ supportsService()

sal_Bool SAL_CALL i18npool::CollatorImpl::supportsService ( const OUString &  ServiceName)
overridevirtual

Reimplemented in i18npool::ChapterCollator.

Definition at line 213 of file collatorImpl.cxx.

References cppu::supportsService().

Member Data Documentation

◆ cachedItem

std::optional<lookupTableItem> i18npool::CollatorImpl::cachedItem
private

◆ lookupTable

std::vector<lookupTableItem> i18npool::CollatorImpl::lookupTable
private

Definition at line 92 of file collatorImpl.hxx.

Referenced by createCollator(), and loadCachedCollator().

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > i18npool::CollatorImpl::m_xContext
private

Definition at line 96 of file collatorImpl.hxx.

Referenced by createCollator().

◆ mxLocaleData

css::uno::Reference< css::i18n::XLocaleData5 > i18npool::CollatorImpl::mxLocaleData
private

◆ nLocale

css::lang::Locale i18npool::CollatorImpl::nLocale
protected

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