26 #include <rtl/ustrbuf.hxx>
44 ImplDestroyWrappers();
49 mpLocaleDataWrapper.reset();
50 mpTransliterationWrapper.reset();
55 if ( !mpTransliterationWrapper )
58 if ( mbTransliterateIgnoreCase )
59 nModules |= TransliterationFlags::IGNORE_CASE;
64 return *mpTransliterationWrapper;
69 if ( !mpLocaleDataWrapper )
73 return *mpLocaleDataWrapper;
78 if( (c >= 0x200B) && (c <= 0x200F) )
80 if( (c >= 0x2028) && (c <= 0x202E) )
95 sal_Int32
nLength = rStr.getLength();
96 OUStringBuffer
aBuf( nLength );
101 aBuf.append( *pStr );
104 return aBuf.makeStringAndClear();
109 ::osl::Guard< ::osl::Mutex > aGuard( const_cast<vcl::I18nHelper*>(
this)->
maMutex );
111 if ( mbTransliterateIgnoreCase )
119 OUString aStr1( filterFormattingChars(rStr1) );
120 OUString aStr2( filterFormattingChars(rStr2) );
121 return ImplGetTransliterationWrapper().compareString( aStr1, aStr2 );
126 ::osl::Guard< ::osl::Mutex > aGuard( const_cast<vcl::I18nHelper*>(
this)->
maMutex );
128 if ( !mbTransliterateIgnoreCase )
136 OUString aStr1( filterFormattingChars(rStr1) );
137 OUString aStr2( filterFormattingChars(rStr2) );
138 return ImplGetTransliterationWrapper().isMatch( aStr1, aStr2 );
143 ::osl::Guard< ::osl::Mutex > aGuard( const_cast<vcl::I18nHelper*>(
this)->
maMutex );
146 sal_Int32
n = rString.indexOf(
'~' );
149 OUString aMatchStr = rString.copy( n+1 );
150 bEqual = MatchString( OUString(cMnemonicChar), aMatchStr );
157 return ImplGetLocaleDataWrapper().getNum( nNumber, nDecimals, bUseThousandSep, bTrailingZeros );
static OUString filterFormattingChars(const OUString &)
LanguageType getLanguageType(bool bResolveSystem=true) const
I18nHelper(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const LanguageTag &rLanguageTag)
bool MatchString(const OUString &rStr1, const OUString &rStr2) const
bool mbTransliterateIgnoreCase
static bool is_formatting_mark(sal_Unicode c)
sal_Int32 CompareString(const OUString &rStr1, const OUString &rStr2) const
bool MatchMnemonic(const OUString &rString, sal_Unicode cMnemonicChar) const
SAL_DLLPRIVATE LocaleDataWrapper & ImplGetLocaleDataWrapper() const
std::unique_ptr< utl::TransliterationWrapper > mpTransliterationWrapper
SAL_DLLPRIVATE utl::TransliterationWrapper & ImplGetTransliterationWrapper() const
OUString GetNum(tools::Long nNumber, sal_uInt16 nDecimals, bool bUseThousandSep=true, bool bTrailingZeros=true) const
LanguageTag maLanguageTag
Reference< XComponentContext > m_xContext
css::uno::Reference< css::uno::XComponentContext > m_xContext
std::unique_ptr< LocaleDataWrapper > mpLocaleDataWrapper
SAL_DLLPRIVATE void ImplDestroyWrappers()