diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-29 00:36:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-29 09:56:08 +0100 |
commit | 3829892dbc5475a49250729541be369ea9532d28 (patch) | |
tree | 9a57bc4865772c6613db2c71c6fde609d8563e09 /xmlhelp | |
parent | de82a40f84c69081a517617989c344ec9597cb45 (diff) |
merge together 5 or ascii isalpha/isalnum/isdigit implementations
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.cxx | 6 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvread.cxx | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index 0c3e8fd1b8a3..542167b69c12 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -66,6 +66,7 @@ #include <l10ntools/compilehelp.hxx> #include <comphelper/storagehelper.hxx> +#include <comphelper/string.hxx> #include "databases.hxx" #include "urlparameter.hxx" @@ -1686,8 +1687,7 @@ rtl::OUString ExtensionIteratorBase::implGetFileFromPackage( inline bool isLetter( sal_Unicode c ) { - bool bLetter = ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); - return bLetter; + return comphelper::string::isalphaAscii(c); } void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< ::rtl::OUString > &rv, @@ -1709,7 +1709,7 @@ void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< ::r { rtl::OUString aPureEntry = aEntry.copy( nLastSlash + 1 ); - // Check language sceme + // Check language scheme int nLen = aPureEntry.getLength(); const sal_Unicode* pc = aPureEntry.getStr(); bool bStartCanBeLanguage = ( nLen >= 2 && isLetter( pc[0] ) && isLetter( pc[1] ) ); diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index ce9acf05663a..b07c2421f05f 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -1144,8 +1144,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextBundledHelpP inline bool isLetter( sal_Unicode c ) { - bool bLetter = ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); - return bLetter; + return comphelper::string::isalphaAscii(c); } void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< ::rtl::OUString > &rv, |