24#include <com/sun/star/uno/XComponentContext.hpp>
35 static constexpr OUStringLiteral sUnicode =
u"Unicode";
46 sal_Int32 nCount,
const Locale& rLocale )
53 sal_Int32 nCount,
const Locale& rLocale )
60 sal_Int32 nCount,
const Locale& rLocale )
91 const Locale& rLocale )
98 sal_Int32 nCount,
const Locale& rLocale )
104 const OUString& Text, sal_Int32 nPos,
const Locale& rLocale,
105 sal_Int32 startCharTokenType,
const OUString& userDefinedCharactersStart,
106 sal_Int32 contCharTokenType,
const OUString& userDefinedCharactersCont )
109 startCharTokenType,userDefinedCharactersStart,
110 contCharTokenType, userDefinedCharactersCont);
115 sal_Int32 nTokenType,
const OUString& Text, sal_Int32 nPos,
116 const Locale& rLocale, sal_Int32 startCharTokenType,
117 const OUString& userDefinedCharactersStart, sal_Int32 contCharTokenType,
118 const OUString& userDefinedCharactersCont )
121 nTokenType,
Text,
nPos, rLocale, startCharTokenType, userDefinedCharactersStart,
122 contCharTokenType, userDefinedCharactersCont);
138 "com.sun.star.i18n.CharacterClassification_" + serviceName,
m_xContext);
142 xCI.set( xI, UNO_QUERY );
144 lookupTable.emplace_back( rLocale, serviceName, xCI );
172 for (
const auto& rFallback : aFallbacks)
194 return "com.sun.star.i18n.CharacterClassification";
206 return {
"com.sun.star.i18n.CharacterClassification" };
211extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
213 css::uno::XComponentContext *context,
214 css::uno::Sequence<css::uno::Any>
const &)
Reference< XComponentContext > m_xContext
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_i18n_CharacterClassification_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
std::optional< lookupTableItem > cachedItem
bool createLocaleSpecificCharacterClassification(const OUString &serviceName, const css::lang::Locale &rLocale)
virtual sal_Int32 SAL_CALL getCharacterType(const OUString &text, sal_Int32 nPos, const css::lang::Locale &rLocale) override
virtual sal_Int16 SAL_CALL getScript(const OUString &Text, sal_Int32 nPos) override
std::vector< lookupTableItem > lookupTable
virtual css::i18n::ParseResult SAL_CALL parsePredefinedToken(sal_Int32 nTokenType, const OUString &Text, sal_Int32 nPos, const css::lang::Locale &rLocale, sal_Int32 nStartCharFlags, const OUString &userDefinedCharactersStart, sal_Int32 nContCharFlags, const OUString &userDefinedCharactersCont) override
virtual OUString SAL_CALL toLower(const OUString &Text, sal_Int32 nPos, sal_Int32 nCount, const css::lang::Locale &rLocale) override
CharacterClassificationImpl(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual OUString SAL_CALL getImplementationName() override
virtual css::i18n::ParseResult SAL_CALL parseAnyToken(const OUString &Text, sal_Int32 nPos, const css::lang::Locale &rLocale, sal_Int32 nStartCharFlags, const OUString &userDefinedCharactersStart, sal_Int32 nContCharFlags, const OUString &userDefinedCharactersCont) override
css::uno::Reference< XCharacterClassification > const & getLocaleSpecificCharacterClassification(const css::lang::Locale &rLocale)
virtual sal_Int32 SAL_CALL getStringType(const OUString &text, sal_Int32 nPos, sal_Int32 nCount, const css::lang::Locale &rLocale) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL toTitle(const OUString &Text, sal_Int32 nPos, sal_Int32 nCount, const css::lang::Locale &rLocale) override
virtual ~CharacterClassificationImpl() override
virtual sal_Int16 SAL_CALL getType(const OUString &Text, sal_Int32 nPos) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual sal_Int16 SAL_CALL getCharacterDirection(const OUString &Text, sal_Int32 nPos) override
virtual OUString SAL_CALL toUpper(const OUString &Text, sal_Int32 nPos, sal_Int32 nCount, const css::lang::Locale &rLocale) override
css::uno::Reference< XCharacterClassification > xUCI
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
static ::std::vector< OUString > getFallbackLocaleServiceNames(const css::lang::Locale &rLocale)
Generates fallback strings suitable as parts of service names, excluding the one obtained via getFirs...
static OUString getFirstLocaleServiceName(const css::lang::Locale &rLocale)
Generates a <Language>_<Country> or <Variant> (if Language=="qlt") string suitable as part of service...
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Constant values shared between i18npool and, for example, the number formatter.