diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-28 23:08:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-29 09:56:08 +0100 |
commit | 313332e76bd17c0a5a6bd67c0abc467877948a3a (patch) | |
tree | 217b63800be13ef2ebbae21c0f919467d782a287 /l10ntools | |
parent | 3422a02b5e9bd3a50518198c6ae9a9df0008edac (diff) |
various centralized isFOOAsciiStrings
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/gsicheck.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/l10ntools/source/gsicheck.cxx b/l10ntools/source/gsicheck.cxx index 438234ea8e34..0b05de086b83 100644 --- a/l10ntools/source/gsicheck.cxx +++ b/l10ntools/source/gsicheck.cxx @@ -67,24 +67,27 @@ sal_Bool LanguageOK( ByteString aLang ) if ( !aLang.Len() ) return sal_False; - if (comphelper::string::isdigitAsciiString(aLang)) + using comphelper::string::isdigitAsciiString; + using comphelper::string::isupperAsciiString; + using comphelper::string::islowerAsciiString; + + if (isdigitAsciiString(aLang)) return sal_True; if ( aLang.GetTokenCount( '-' ) == 1 ) - return aLang.IsLowerAscii(); + return islowerAsciiString(aLang); else if ( aLang.GetTokenCount( '-' ) == 2 ) { ByteString aTok0( aLang.GetToken( 0, '-' ) ); ByteString aTok1( aLang.GetToken( 1, '-' ) ); - return aTok0.Len() && aTok0.IsLowerAscii() - && aTok1.Len() && aTok1.IsUpperAscii() + return aTok0.Len() && islowerAsciiString(aTok0) + && aTok1.Len() && isupperAsciiString(aTok1) && !aTok1.EqualsIgnoreCaseAscii( aTok0 ); } return sal_False; } - // // class LazySvFileStream // |