|
LibreOffice Module unotools (master) 1
|
#include <charclass.hxx>
Public Member Functions | |
| CharClass (const css::uno::Reference< css::uno::XComponentContext > &rxContext, LanguageTag aLanguageTag) | |
| Preferred ctor with service manager specified. More... | |
| CharClass (LanguageTag aLanguageTag) | |
| Deprecated ctor, tries to get a process service manager or to load the library directly. More... | |
| ~CharClass () | |
| const LanguageTag & | getLanguageTag () const |
| get current Locale More... | |
| OUString | uppercase (const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const |
| OUString | lowercase (const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const |
| OUString | titlecase (const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const |
| OUString | uppercase (const OUString &_rStr) const |
| OUString | lowercase (const OUString &_rStr) const |
| OUString | titlecase (const OUString &_rStr) const |
| sal_Int16 | getType (const OUString &rStr, sal_Int32 nPos) const |
| css::i18n::DirectionProperty | getCharacterDirection (const OUString &rStr, sal_Int32 nPos) const |
| css::i18n::UnicodeScript | getScript (const OUString &rStr, sal_Int32 nPos) const |
| sal_Int32 | getCharacterType (const OUString &rStr, sal_Int32 nPos) const |
| css::i18n::ParseResult | parseAnyToken (const OUString &rStr, sal_Int32 nPos, sal_Int32 nStartCharFlags, const OUString &userDefinedCharactersStart, sal_Int32 nContCharFlags, const OUString &userDefinedCharactersCont) const |
| css::i18n::ParseResult | parsePredefinedToken (sal_Int32 nTokenType, const OUString &rStr, sal_Int32 nPos, sal_Int32 nStartCharFlags, const OUString &userDefinedCharactersStart, sal_Int32 nContCharFlags, const OUString &userDefinedCharactersCont) const |
| bool | isAlpha (const OUString &rStr, sal_Int32 nPos) const |
| bool | isLetter (const OUString &rStr, sal_Int32 nPos) const |
| bool | isDigit (const OUString &rStr, sal_Int32 nPos) const |
| bool | isAlphaNumeric (const OUString &rStr, sal_Int32 nPos) const |
| bool | isLetterNumeric (const OUString &rStr, sal_Int32 nPos) const |
| bool | isBase (const OUString &rStr, sal_Int32 nPos) const |
| bool | isUpper (const OUString &rStr, sal_Int32 nPos) const |
| bool | isLetter (const OUString &rStr) const |
| bool | isNumeric (const OUString &rStr) const |
| bool | isLetterNumeric (const OUString &rStr) const |
| bool | isUpper (const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const |
Static Public Member Functions | |
| static bool | isAsciiNumeric (std::u16string_view rStr) |
| isdigit() on ascii values of entire string More... | |
| static bool | isAsciiAlpha (std::u16string_view rStr) |
| isalpha() on ascii values of entire string More... | |
| static bool | isNumericType (sal_Int32 nType) |
| whether type is pure numeric or not, e.g. return of getCharacterType() More... | |
| static bool | isAlphaNumericType (sal_Int32 nType) |
| whether type is pure alphanumeric or not, e.g. return of getCharacterType() More... | |
| static bool | isLetterType (sal_Int32 nType) |
| whether type is pure letter or not, e.g. return of getCharacterType() More... | |
| static bool | isLetterNumericType (sal_Int32 nType) |
| whether type is pure letternumeric or not, e.g. return of getCharacterType() More... | |
Private Member Functions | |
| CharClass (const CharClass &)=delete | |
| CharClass & | operator= (const CharClass &)=delete |
| const css::lang::Locale & | getMyLocale () const |
Private Attributes | |
| LanguageTag | maLanguageTag |
| css::uno::Reference< css::i18n::XCharacterClassification > | xCC |
Definition at line 64 of file charclass.hxx.
|
privatedelete |
| CharClass::CharClass | ( | const css::uno::Reference< css::uno::XComponentContext > & | rxContext, |
| LanguageTag | aLanguageTag | ||
| ) |
Preferred ctor with service manager specified.
References getLanguageTag().
| CharClass::CharClass | ( | LanguageTag | aLanguageTag | ) |
Deprecated ctor, tries to get a process service manager or to load the library directly.
Definition at line 41 of file charclass.cxx.
References comphelper::getProcessComponentContext(), maLanguageTag, and xCC.
| CharClass::~CharClass | ( | ) |
Definition at line 47 of file charclass.cxx.
| css::i18n::DirectionProperty CharClass::getCharacterDirection | ( | const OUString & | rStr, |
| sal_Int32 | nPos | ||
| ) | const |
Definition at line 370 of file charclass.cxx.
References Exception, nPos, TOOLS_WARN_EXCEPTION, and xCC.
| sal_Int32 CharClass::getCharacterType | ( | const OUString & | rStr, |
| sal_Int32 | nPos | ||
| ) | const |
Definition at line 396 of file charclass.cxx.
References Exception, getMyLocale(), nPos, TOOLS_WARN_EXCEPTION, and xCC.
| const LanguageTag & CharClass::getLanguageTag | ( | ) | const |
get current Locale
Definition at line 51 of file charclass.cxx.
References maLanguageTag.
Referenced by utl::TextSearch::TextSearch().
|
private |
Definition at line 56 of file charclass.cxx.
References LanguageTag::getLocale(), and maLanguageTag.
Referenced by getCharacterType(), isAlpha(), isAlphaNumeric(), isBase(), isDigit(), isLetter(), isLetterNumeric(), isUpper(), lowercase(), parseAnyToken(), parsePredefinedToken(), titlecase(), and uppercase().
| css::i18n::UnicodeScript CharClass::getScript | ( | const OUString & | rStr, |
| sal_Int32 | nPos | ||
| ) | const |
Definition at line 383 of file charclass.cxx.
References Exception, nPos, TOOLS_WARN_EXCEPTION, and xCC.
| sal_Int16 CharClass::getType | ( | const OUString & | rStr, |
| sal_Int32 | nPos | ||
| ) | const |
Definition at line 357 of file charclass.cxx.
References Exception, nPos, TOOLS_WARN_EXCEPTION, and xCC.
| bool CharClass::isAlpha | ( | const OUString & | rStr, |
| sal_Int32 | nPos | ||
| ) | const |
Definition at line 97 of file charclass.cxx.
References Exception, getMyLocale(), nCharClassAlphaType, nPos, TOOLS_WARN_EXCEPTION, and xCC.
| bool CharClass::isAlphaNumeric | ( | const OUString & | rStr, |
| sal_Int32 | nPos | ||
| ) | const |
Definition at line 197 of file charclass.cxx.
References Exception, getMyLocale(), nCharClassAlphaType, nCharClassNumericType, nPos, TOOLS_WARN_EXCEPTION, and xCC.
|
inlinestatic |
whether type is pure alphanumeric or not, e.g. return of getCharacterType()
Definition at line 101 of file charclass.hxx.
References nCharClassAlphaType, nCharClassAlphaTypeMask, nCharClassNumericType, nCharClassNumericTypeMask, and nType.
|
static |
isalpha() on ascii values of entire string
Definition at line 80 of file charclass.cxx.
References p.
|
static |
isdigit() on ascii values of entire string
Definition at line 62 of file charclass.cxx.
References p.
| bool CharClass::isBase | ( | const OUString & | rStr, |
| sal_Int32 | nPos | ||
| ) | const |
Definition at line 256 of file charclass.cxx.
References Exception, getMyLocale(), nCharClassBaseType, nPos, TOOLS_WARN_EXCEPTION, and xCC.
| bool CharClass::isDigit | ( | const OUString & | rStr, |
| sal_Int32 | nPos | ||
| ) | const |
Definition at line 156 of file charclass.cxx.
References Exception, getMyLocale(), nPos, TOOLS_WARN_EXCEPTION, and xCC.
Referenced by isNumeric().
| bool CharClass::isLetter | ( | const OUString & | rStr | ) | const |
Definition at line 133 of file charclass.cxx.
References Exception, isLetter(), nPos, and TOOLS_WARN_EXCEPTION.
| bool CharClass::isLetter | ( | const OUString & | rStr, |
| sal_Int32 | nPos | ||
| ) | const |
Definition at line 115 of file charclass.cxx.
References Exception, getMyLocale(), nCharClassLetterType, nPos, TOOLS_WARN_EXCEPTION, and xCC.
Referenced by isLetter().
| bool CharClass::isLetterNumeric | ( | const OUString & | rStr | ) | const |
Definition at line 233 of file charclass.cxx.
References Exception, isLetterNumeric(), nPos, and TOOLS_WARN_EXCEPTION.
| bool CharClass::isLetterNumeric | ( | const OUString & | rStr, |
| sal_Int32 | nPos | ||
| ) | const |
Definition at line 215 of file charclass.cxx.
References Exception, getMyLocale(), nCharClassLetterType, nCharClassNumericType, nPos, TOOLS_WARN_EXCEPTION, and xCC.
Referenced by isLetterNumeric().
|
inlinestatic |
whether type is pure letternumeric or not, e.g. return of getCharacterType()
Definition at line 117 of file charclass.hxx.
References nCharClassLetterType, nCharClassLetterTypeMask, nCharClassNumericType, nCharClassNumericTypeMask, and nType.
|
inlinestatic |
whether type is pure letter or not, e.g. return of getCharacterType()
Definition at line 110 of file charclass.hxx.
References nCharClassLetterType, and nType.
| bool CharClass::isNumeric | ( | const OUString & | rStr | ) | const |
Definition at line 174 of file charclass.cxx.
References Exception, isDigit(), nPos, and TOOLS_WARN_EXCEPTION.
|
inlinestatic |
whether type is pure numeric or not, e.g. return of getCharacterType()
Definition at line 94 of file charclass.hxx.
References nCharClassNumericType, and nType.
| bool CharClass::isUpper | ( | const OUString & | rStr, |
| sal_Int32 | nPos | ||
| ) | const |
Definition at line 273 of file charclass.cxx.
References Exception, getMyLocale(), nPos, TOOLS_WARN_EXCEPTION, and xCC.
Referenced by isUpper().
| bool CharClass::isUpper | ( | const OUString & | rStr, |
| sal_Int32 | nPos, | ||
| sal_Int32 | nCount | ||
| ) | const |
Definition at line 291 of file charclass.cxx.
References Exception, isUpper(), nCount, nPos, and TOOLS_WARN_EXCEPTION.
|
inline |
Definition at line 135 of file charclass.hxx.
| OUString CharClass::lowercase | ( | const OUString & | rStr, |
| sal_Int32 | nPos, | ||
| sal_Int32 | nCount | ||
| ) | const |
Definition at line 344 of file charclass.cxx.
References Exception, getMyLocale(), nCount, nPos, TOOLS_WARN_EXCEPTION, and xCC.
| css::i18n::ParseResult CharClass::parseAnyToken | ( | const OUString & | rStr, |
| sal_Int32 | nPos, | ||
| sal_Int32 | nStartCharFlags, | ||
| const OUString & | userDefinedCharactersStart, | ||
| sal_Int32 | nContCharFlags, | ||
| const OUString & | userDefinedCharactersCont | ||
| ) | const |
Definition at line 409 of file charclass.cxx.
References Exception, getMyLocale(), nPos, TOOLS_WARN_EXCEPTION, and xCC.
| css::i18n::ParseResult CharClass::parsePredefinedToken | ( | sal_Int32 | nTokenType, |
| const OUString & | rStr, | ||
| sal_Int32 | nPos, | ||
| sal_Int32 | nStartCharFlags, | ||
| const OUString & | userDefinedCharactersStart, | ||
| sal_Int32 | nContCharFlags, | ||
| const OUString & | userDefinedCharactersCont | ||
| ) | const |
Definition at line 430 of file charclass.cxx.
References Exception, getMyLocale(), nPos, TOOLS_WARN_EXCEPTION, and xCC.
|
inline |
Definition at line 139 of file charclass.hxx.
| OUString CharClass::titlecase | ( | const OUString & | rStr, |
| sal_Int32 | nPos, | ||
| sal_Int32 | nCount | ||
| ) | const |
Definition at line 318 of file charclass.cxx.
References Exception, getMyLocale(), nCount, nPos, TOOLS_WARN_EXCEPTION, and xCC.
|
inline |
Definition at line 131 of file charclass.hxx.
| OUString CharClass::uppercase | ( | const OUString & | rStr, |
| sal_Int32 | nPos, | ||
| sal_Int32 | nCount | ||
| ) | const |
Definition at line 331 of file charclass.cxx.
References Exception, getMyLocale(), nCount, nPos, TOOLS_WARN_EXCEPTION, and xCC.
|
private |
Definition at line 66 of file charclass.hxx.
Referenced by getLanguageTag(), and getMyLocale().
|
private |
Definition at line 67 of file charclass.hxx.
Referenced by CharClass(), getCharacterDirection(), getCharacterType(), getScript(), getType(), isAlpha(), isAlphaNumeric(), isBase(), isDigit(), isLetter(), isLetterNumeric(), isUpper(), lowercase(), parseAnyToken(), parsePredefinedToken(), titlecase(), and uppercase().