From 9124003eb1e398957a85c5c009ac5eddf5e6f28e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 14 Aug 2011 01:37:52 +0100 Subject: ByteString::IsNumericAscii->comphelper::string::isAsciiDecimalString shrink ByteString api, remove need for intermediate OString/ByteString with random-ish encoding solely for check --- l10ntools/source/gsicheck.cxx | 8 ++++---- l10ntools/source/makefile.mk | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'l10ntools') diff --git a/l10ntools/source/gsicheck.cxx b/l10ntools/source/gsicheck.cxx index 2fd8b8b540b1..da305db9ca04 100644 --- a/l10ntools/source/gsicheck.cxx +++ b/l10ntools/source/gsicheck.cxx @@ -33,7 +33,7 @@ #include #include - +#include #include "tagtest.hxx" #include "gsicheck.hxx" @@ -67,7 +67,7 @@ sal_Bool LanguageOK( ByteString aLang ) if ( !aLang.Len() ) return sal_False; - if ( aLang.IsNumericAscii() ) + if (comphelper::string::isAsciiDecimalString(aLang)) return sal_True; if ( aLang.GetTokenCount( '-' ) == 1 ) @@ -153,7 +153,7 @@ GSILine::GSILine( const ByteString &rLine, sal_uLong nLine ) aTitle = rLine.GetToken( 13, '\t' ); // do some more format checks here - if ( !rLine.GetToken( 8, '\t' ).IsNumericAscii() ) + if (!comphelper::string::isAsciiDecimalString(rLine.GetToken(8, '\t'))) { PrintError( "The length field does not contain a number!", "Line format", rLine.GetToken( 8, '\t' ), sal_True, GetLineNumber(), GetUniqId() ); NotOK(); @@ -491,7 +491,7 @@ sal_Bool GSIBlock::IsUTF8( const ByteString &aTestee, sal_Bool bFixTags, sal_uIn if ( aID.Len() > 0 && aID.GetChar(aID.Len()-1) == '*' ) aID.Erase( aID.Len()-1 ); - if ( aID.IsNumericAscii() && aID.Len() >= 5 ) + if (comphelper::string::isAsciiDecimalString(aID) && aID.Len() >= 5) bIsKeyID = sal_True; } diff --git a/l10ntools/source/makefile.mk b/l10ntools/source/makefile.mk index 86bcea3cbd0e..5ab3c4fdf23c 100644 --- a/l10ntools/source/makefile.mk +++ b/l10ntools/source/makefile.mk @@ -98,6 +98,7 @@ APP3STDLIBS+= \ APP5TARGET= gsicheck APP5OBJS= $(OBJ)$/gsicheck.obj $(OBJ)$/tagtest.obj APP5STDLIBS+= \ + $(COMPHELPERLIB) \ $(TOOLSLIB) \ $(SALLIB) -- cgit