summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/i18n/charclass.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/unotools/source/i18n/charclass.cxx b/unotools/source/i18n/charclass.cxx
index be3a9f4f0ee0..423f9530f2cb 100644
--- a/unotools/source/i18n/charclass.cxx
+++ b/unotools/source/i18n/charclass.cxx
@@ -253,6 +253,23 @@ bool CharClass::isLetterNumeric( const OUString& rStr ) const
return false;
}
+bool CharClass::isBase( const OUString& rStr, sal_Int32 nPos ) const
+{
+ sal_Unicode c = rStr[nPos];
+ if ( c < 128 )
+ return rtl::isAsciiAlphanumeric( c );
+
+ try
+ {
+ return (xCC->getCharacterType( rStr, nPos, getMyLocale() ) & nCharClassBaseType ) != 0;
+ }
+ catch ( const Exception& )
+ {
+ TOOLS_WARN_EXCEPTION("unotools.i18n", "" );
+ }
+ return false;
+}
+
bool CharClass::isUpper( const OUString& rStr, sal_Int32 nPos ) const
{
sal_Unicode c = rStr[nPos];