summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-29 00:36:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-29 09:56:08 +0100
commit3829892dbc5475a49250729541be369ea9532d28 (patch)
tree9a57bc4865772c6613db2c71c6fde609d8563e09 /sd
parentde82a40f84c69081a517617989c344ec9597cb45 (diff)
merge together 5 or ascii isalpha/isalnum/isdigit implementations
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/docshell/docshel2.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index 5f1737cc6c57..8cea1449fb7c 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -51,6 +51,7 @@
#include "fupoor.hxx"
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
+#include <comphelper/string.hxx>
namespace sd {
@@ -391,16 +392,14 @@ bool DrawDocShell::IsNewPageNameValid( String & rInOutPageName, bool bResetStrin
bIsStandardName = true;
}
}
- else if( rInOutPageName.GetToken( 1, sal_Unicode(' ') ).GetChar(0) >= 'a' &&
- rInOutPageName.GetToken( 1, sal_Unicode(' ') ).GetChar(0) <= 'z' &&
- rInOutPageName.GetToken( 1, sal_Unicode(' ') ).Len() == 1 )
+ else if( rInOutPageName.GetToken( 1, sal_Unicode(' ') ).Len() == 1 &&
+ comphelper::string::islowerAscii(rInOutPageName.GetToken( 1, sal_Unicode(' ') ).GetChar(0) ) )
{
// lower case, single character: reserved
bIsStandardName = true;
}
- else if( rInOutPageName.GetToken( 1, sal_Unicode(' ') ).GetChar(0) >= 'A' &&
- rInOutPageName.GetToken( 1, sal_Unicode(' ') ).GetChar(0) <= 'Z' &&
- rInOutPageName.GetToken( 1, sal_Unicode(' ') ).Len() == 1 )
+ else if( rInOutPageName.GetToken( 1, sal_Unicode(' ') ).Len() == 1 &&
+ comphelper::string::isupperAscii(rInOutPageName.GetToken( 1, sal_Unicode(' ') ).GetChar(0) ) )
{
// upper case, single character: reserved
bIsStandardName = true;