summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-07-31 14:11:42 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-08-01 06:09:03 +0000
commitdadb28a2fbe3e50361b60cee9dda43b1fba3629e (patch)
treef137f602530392eeda1dcd103db17176bc1449bc
parent069d71b72566a0b8f234304d3bd4511ee86b6c60 (diff)
sc: replace IsAssciiDigit and IsAsciiAlpha with rtl equivalents
Change-Id: I81537e2c3c9b7f3828c080fcc1a7ebc98ef2fde9 Reviewed-on: https://gerrit.libreoffice.org/27748 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--sc/source/ui/docshell/docsh8.cxx14
1 files 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 += "_";