summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-14 01:37:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-15 09:21:48 +0100
commit9124003eb1e398957a85c5c009ac5eddf5e6f28e (patch)
treed1348216600b18f3daa08224a4d4492b53337813 /l10ntools
parenta6825d680c7f49dd462a858cc8691757a6dd4cba (diff)
ByteString::IsNumericAscii->comphelper::string::isAsciiDecimalString
shrink ByteString api, remove need for intermediate OString/ByteString with random-ish encoding solely for check
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/gsicheck.cxx8
-rw-r--r--l10ntools/source/makefile.mk1
2 files changed, 5 insertions, 4 deletions
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 <tools/stream.hxx>
#include <rtl/strbuf.hxx>
-
+#include <comphelper/string.hxx>
#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)