diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-14 01:37:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-15 09:21:48 +0100 |
commit | 9124003eb1e398957a85c5c009ac5eddf5e6f28e (patch) | |
tree | d1348216600b18f3daa08224a4d4492b53337813 /l10ntools | |
parent | SvByteStringsSortDtor is now finally gone (diff) | |
download | core-9124003eb1e398957a85c5c009ac5eddf5e6f28e.tar.gz core-9124003eb1e398957a85c5c009ac5eddf5e6f28e.zip |
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.cxx | 8 | ||||
-rw-r--r-- | l10ntools/source/makefile.mk | 1 |
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) |