26#include <rtl/ustrbuf.hxx>
45 ImplDestroyWrappers();
50 mpLocaleDataWrapper.reset();
51 mpTransliterationWrapper.reset();
56 if ( !mpTransliterationWrapper )
59 if ( mbTransliterateIgnoreCase )
60 nModules |= TransliterationFlags::IGNORE_CASE;
65 return *mpTransliterationWrapper;
70 if ( !mpLocaleDataWrapper )
74 return *mpLocaleDataWrapper;
79 if( (c >= 0x200B) && (c <= 0x200F) )
81 if( (c >= 0x2028) && (c <= 0x202E) )
96 sal_Int32
nLength = rStr.getLength();
102 aBuf.append( *pStr );
105 return aBuf.makeStringAndClear();
110 std::unique_lock aGuard(
maMutex );
112 if ( mbTransliterateIgnoreCase )
120 OUString aStr1( filterFormattingChars(rStr1) );
121 OUString aStr2( filterFormattingChars(rStr2) );
122 return ImplGetTransliterationWrapper().compareString( aStr1, aStr2 );
127 std::unique_lock aGuard(
maMutex );
129 if ( !mbTransliterateIgnoreCase )
137 OUString aStr1( filterFormattingChars(rStr1) );
138 OUString aStr2( filterFormattingChars(rStr2) );
139 return ImplGetTransliterationWrapper().isMatch( aStr1, aStr2 );
144 size_t n = rString.find(
'~' );
145 if (
n == std::u16string_view::npos )
147 OUString aMatchStr( rString.substr(
n+1 ) );
148 return MatchString( OUString(cMnemonicChar), aMatchStr );
153 return ImplGetLocaleDataWrapper().getNum( nNumber, nDecimals, bUseThousandSep, bTrailingZeros );
Reference< XComponentContext > m_xContext
LanguageType getLanguageType(bool bResolveSystem=true) const
I18nHelper(const css::uno::Reference< css::uno::XComponentContext > &rxContext, LanguageTag aLanguageTag)
SAL_DLLPRIVATE LocaleDataWrapper & ImplGetLocaleDataWrapper() const
bool mbTransliterateIgnoreCase
std::unique_ptr< LocaleDataWrapper > mpLocaleDataWrapper
sal_Int32 CompareString(const OUString &rStr1, const OUString &rStr2) const
SAL_DLLPRIVATE void ImplDestroyWrappers()
static OUString filterFormattingChars(const OUString &)
SAL_DLLPRIVATE utl::TransliterationWrapper & ImplGetTransliterationWrapper() const
bool MatchString(const OUString &rStr1, const OUString &rStr2) const
OUString GetNum(tools::Long nNumber, sal_uInt16 nDecimals, bool bUseThousandSep=true, bool bTrailingZeros=true) const
bool MatchMnemonic(std::u16string_view rString, sal_Unicode cMnemonicChar) const
css::uno::Reference< css::uno::XComponentContext > m_xContext
std::unique_ptr< utl::TransliterationWrapper > mpTransliterationWrapper
static bool is_formatting_mark(sal_Unicode c)
LanguageTag maLanguageTag