21#include <com/sun/star/uno/Reference.h>
22#include <com/sun/star/i18n/XCollator.hpp>
23#include <com/sun/star/lang/Locale.hpp>
25#include <com/sun/star/lang/XServiceInfo.hpp>
42 css::lang::XServiceInfo
48 CollatorImpl(
const css::uno::Reference < css::uno::XComponentContext >& rxContext );
52 virtual sal_Int32 SAL_CALL
compareSubstring(
const OUString& s1, sal_Int32 off1, sal_Int32 len1,
53 const OUString& s2, sal_Int32 off2, sal_Int32 len2)
override;
56 const OUString& s2)
override;
58 virtual sal_Int32 SAL_CALL
loadDefaultCollator(
const css::lang::Locale& rLocale, sal_Int32 collatorOptions)
override;
61 sal_Int32 collatorOptions)
override;
64 const css::uno::Sequence< sal_Int32 >& collatorOptions)
override;
66 virtual css::uno::Sequence< OUString > SAL_CALL
listCollatorAlgorithms(
const css::lang::Locale& rLocale )
override;
68 virtual css::uno::Sequence< sal_Int32 > SAL_CALL
listCollatorOptions(
const OUString& collatorAlgorithmName )
override;
82 css::uno::Reference < XCollator >
xC;
83 lookupTableItem(css::lang::Locale _aLocale, OUString _algorithm, OUString _service,
85 bool equals(
const css::lang::Locale& rLocale, std::u16string_view _algorithm) {
86 return aLocale.Language == rLocale.Language &&
87 aLocale.Country == rLocale.Country &&
88 aLocale.Variant == rLocale.Variant &&
96 css::uno::Reference < css::uno::XComponentContext >
m_xContext;
101 bool createCollator(
const css::lang::Locale& rLocale,
const OUString& serviceName,
102 const OUString& rSortAlgorithm);
104 void loadCachedCollator(
const css::lang::Locale& rLocale,
const OUString& rSortAlgorithm);
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual ~CollatorImpl() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Reference< css::i18n::XLocaleData5 > mxLocaleData
virtual sal_Int32 SAL_CALL loadDefaultCollator(const css::lang::Locale &rLocale, sal_Int32 collatorOptions) 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 loadCollatorAlgorithm(const OUString &impl, const css::lang::Locale &rLocale, sal_Int32 collatorOptions) override
std::optional< lookupTableItem > cachedItem
virtual OUString SAL_CALL getImplementationName() override
css::lang::Locale nLocale
std::vector< lookupTableItem > lookupTable
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual css::uno::Sequence< sal_Int32 > SAL_CALL listCollatorOptions(const OUString &collatorAlgorithmName) override
virtual void SAL_CALL loadCollatorAlgorithmWithEndUserOption(const OUString &impl, const css::lang::Locale &rLocale, const css::uno::Sequence< sal_Int32 > &collatorOptions) override
void loadCachedCollator(const css::lang::Locale &rLocale, const OUString &rSortAlgorithm)
virtual css::uno::Sequence< OUString > SAL_CALL listCollatorAlgorithms(const css::lang::Locale &rLocale) override
bool createCollator(const css::lang::Locale &rLocale, const OUString &serviceName, const OUString &rSortAlgorithm)
CollatorImpl(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual sal_Int32 SAL_CALL compareString(const OUString &s1, const OUString &s2) override
Constant values shared between i18npool and, for example, the number formatter.
css::uno::Reference< XCollator > xC
bool equals(const css::lang::Locale &rLocale, std::u16string_view _algorithm)
lookupTableItem(css::lang::Locale _aLocale, OUString _algorithm, OUString _service, css::uno::Reference< XCollator > _xC)
css::lang::Locale aLocale