21#include <com/sun/star/i18n/InputSequenceCheckMode.hpp>
22#include <com/sun/star/uno/XComponentContext.hpp>
34 serviceName =
"com.sun.star.i18n.InputSequenceChecker";
37InputSequenceCheckerImpl::InputSequenceCheckerImpl(
const char *pServiceName)
38 : serviceName(pServiceName)
50 if (inputCheckMode == InputSequenceCheckMode::PASSTHROUGH)
65 if (inputCheckMode != InputSequenceCheckMode::PASSTHROUGH) {
71 Text =
Text.replaceAt(++nStartPos, 0, rtl::OUStringChar(inputChar));
78 { UnicodeScript_kDevanagari, UnicodeScript_kDevanagari, sal_Int16(UnicodeScript_kDevanagari) },
79 { UnicodeScript_kThai, UnicodeScript_kThai, sal_Int16(UnicodeScript_kThai) },
81 { UnicodeScript_kScriptCount, UnicodeScript_kScriptCount, sal_Int16(UnicodeScript_kScriptCount) }
89 if (
type != UnicodeScript_kScriptCount &&
92 case UnicodeScript_kThai:
return const_cast<char*
>(
"th");
95 case UnicodeScript_kDevanagari:
return const_cast<char*
>(
"hi");
102Reference< XExtendedInputSequenceChecker >&
115 Reference < XInterface > xI =
m_xContext->getServiceManager()->createInstanceWithContext(
116 "com.sun.star.i18n.InputSequenceChecker_" +
117 OUString::createFromAscii(rLanguage),
121 Reference< XExtendedInputSequenceChecker > xISC( xI, UNO_QUERY );
144Sequence< OUString > SAL_CALL
147 Sequence< OUString > aRet { OUString::createFromAscii(
serviceName) };
153extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
155 css::uno::XComponentContext *context,
156 css::uno::Sequence<css::uno::Any>
const &)
Reference< XComponentContext > m_xContext
static sal_Int16 getUnicodeScriptType(const sal_Unicode ch, const ScriptTypeList *typeList, sal_Int16 unknownType=0)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Constant values shared between i18npool and, for example, the number formatter.
ScriptTypeList const typeList[]