From dadb28a2fbe3e50361b60cee9dda43b1fba3629e Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Sun, 31 Jul 2016 14:11:42 +0200 Subject: [PATCH] sc: replace IsAssciiDigit and IsAsciiAlpha with rtl equivalents Change-Id: I81537e2c3c9b7f3828c080fcc1a7ebc98ef2fde9 Reviewed-on: https://gerrit.libreoffice.org/27748 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- sc/source/ui/docshell/docsh8.cxx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index caea9fd9fa87..d264d6482d58 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -461,16 +461,6 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi namespace { -inline bool IsAsciiDigit( sal_Unicode c ) -{ - return 0x30 <= c && c <= 0x39; -} - -inline bool IsAsciiAlpha( sal_Unicode c ) -{ - return (0x41 <= c && c <= 0x5a) || (0x61 <= c && c <= 0x7a); -} - void lcl_GetColumnTypes( ScDocShell& rDocShell, const ScRange& rDataRange, bool bHasFieldNames, OUString* pColNames, sal_Int32* pColTypes, sal_Int32* pColLengths, @@ -567,13 +557,13 @@ void lcl_GetColumnTypes( // "_DBASELOCK" is reserved (obsolete because first character is // not alphabetical). // No duplicated names. - if ( !IsAsciiAlpha( aFieldName[0] ) ) + if ( !rtl::isAsciiAlpha(aFieldName[0]) ) aFieldName = "N" + aFieldName; OUString aTmpStr; sal_Unicode c; for ( const sal_Unicode* p = aFieldName.getStr(); ( c = *p ) != 0; p++ ) { - if ( IsAsciiAlpha( c ) || IsAsciiDigit( c ) || c == '_' ) + if ( rtl::isAsciiAlpha(c) || rtl::isAsciiDigit(c) || c == '_' ) aTmpStr += OUString(c); else aTmpStr += "_";