summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/misc/syntaxhighlight.cxx4
-rw-r--r--forms/source/xforms/submission/serialization_urlencoded.cxx5
-rw-r--r--include/comphelper/string.hxx30
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sd/source/ui/docshell/docshel2.cxx5
-rw-r--r--sfx2/source/appl/appdde.cxx5
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx4
-rw-r--r--svtools/source/svhtml/parhtml.cxx8
-rw-r--r--svtools/source/svrtf/parrtf.cxx9
-rw-r--r--sw/source/filter/html/parcss1.cxx12
-rw-r--r--sw/source/ui/vba/vbatemplate.cxx2
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx3
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx3
-rw-r--r--ucb/source/regexp/regexp.cxx8
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx3
-rw-r--r--xmlhelp/source/treeview/tvread.cxx4
16 files changed, 36 insertions, 71 deletions
diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx
index 9f0eb7dfe862..d1fffbcf5db5 100644
--- a/comphelper/source/misc/syntaxhighlight.cxx
+++ b/comphelper/source/misc/syntaxhighlight.cxx
@@ -21,9 +21,9 @@
#include <cassert>
+#include <rtl/character.hxx>
#include <unicode/uchar.h>
#include <comphelper/syntaxhighlight.hxx>
-#include <comphelper/string.hxx>
// Flags for character properties
#define CHAR_START_IDENTIFIER 0x0001
@@ -249,7 +249,7 @@ namespace
{
bool isAlpha(sal_Unicode c)
{
- if (comphelper::string::isalphaAscii(c))
+ if (rtl::isAsciiAlpha(c))
return true;
return u_isalpha(c);
}
diff --git a/forms/source/xforms/submission/serialization_urlencoded.cxx b/forms/source/xforms/submission/serialization_urlencoded.cxx
index c688b6eb7fc0..221ccc10f88f 100644
--- a/forms/source/xforms/submission/serialization_urlencoded.cxx
+++ b/forms/source/xforms/submission/serialization_urlencoded.cxx
@@ -24,11 +24,10 @@
#include <com/sun/star/xml/dom/XText.hpp>
#include <com/sun/star/xml/dom/XNodeList.hpp>
#include <com/sun/star/xml/dom/NodeType.hpp>
-
+#include <rtl/character.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/strbuf.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/string.hxx>
#include <stdio.h>
@@ -54,7 +53,7 @@ CSerializationURLEncoded::CSerializationURLEncoded()
*/
bool CSerializationURLEncoded::is_unreserved(sal_Char c)
{
- if (comphelper::string::isalnumAscii(c))
+ if (rtl::isAsciiAlphanumeric(static_cast<unsigned char>(c)))
return true;
switch (c) {
case '-':
diff --git a/include/comphelper/string.hxx b/include/comphelper/string.hxx
index b9680372c21b..5bf8296ee1e3 100644
--- a/include/comphelper/string.hxx
+++ b/include/comphelper/string.hxx
@@ -401,36 +401,6 @@ COMPHELPER_DLLPUBLIC bool isdigitAsciiString(const OString &rString);
*/
COMPHELPER_DLLPUBLIC bool isdigitAsciiString(const OUString &rString);
-inline bool isdigitAscii(sal_Unicode c)
-{
- return ((c >= '0') && (c <= '9'));
-}
-
-inline bool isxdigitAscii(sal_Unicode c)
-{
- return isdigitAscii(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
-}
-
-inline bool islowerAscii(sal_Unicode c)
-{
- return ((c >= 'a') && (c <= 'z'));
-}
-
-inline bool isupperAscii(sal_Unicode c)
-{
- return ((c >= 'A') && (c <= 'Z'));
-}
-
-inline bool isalphaAscii(sal_Unicode c)
-{
- return islowerAscii(c) || isupperAscii(c);
-}
-
-inline bool isalnumAscii(sal_Unicode c)
-{
- return isalphaAscii(c) || isdigitAscii(c);
-}
-
/** Compare two strings containing software version numbers
Inspired by the GNU strverscmp(), but there is no guarantee that the exact
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 125abb417753..764db1f61686 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2766,7 +2766,7 @@ bool ScCompiler::IsPredetectedReference(const OUString& rName)
return false; // :#REF!.AB42 or :#REF!42 or :#REF!#REF!
break;
default:
- if (comphelper::string::isalphaAscii(c) &&
+ if (rtl::isAsciiAlpha(c) &&
((mnPredetectedReference > 1 && ':' == c2) || 0 == c2))
return false; // AB#REF!: or AB#REF!
}
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index b4e66d5caf4c..88d14a6920f9 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -39,7 +39,6 @@
#include "fupoor.hxx"
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
-#include <comphelper/string.hxx>
namespace sd {
@@ -348,13 +347,13 @@ bool DrawDocShell::IsNewPageNameValid( OUString & rInOutPageName, bool bResetStr
}
}
else if (sRemainder.getLength() == 1 &&
- comphelper::string::islowerAscii(sRemainder[0]))
+ rtl::isAsciiLowerCase(sRemainder[0]))
{
// lower case, single character: reserved
bIsStandardName = true;
}
else if (sRemainder.getLength() == 1 &&
- comphelper::string::isupperAscii(sRemainder[0]))
+ rtl::isAsciiUpperCase(sRemainder[0]))
{
// upper case, single character: reserved
bIsStandardName = true;
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 081d6770cd04..233a2a03d093 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -18,7 +18,7 @@
*/
#include <config_features.h>
-
+#include <rtl/character.hxx>
#include <vcl/wrkwin.hxx>
#include <svl/rectitem.hxx>
#include <svl/eitem.hxx>
@@ -43,7 +43,6 @@
#include "helper.hxx"
#include <sfx2/docfile.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/string.hxx>
#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
#if defined WNT
@@ -55,7 +54,7 @@ OUString SfxDdeServiceName_Impl( const OUString& sIn )
for ( sal_uInt16 n = sIn.getLength(); n; --n )
{
sal_Unicode cChar = sIn[n-1];
- if (comphelper::string::isalnumAscii(cChar))
+ if (rtl::isAsciiAlphanumeric(cChar))
sReturn.append(cChar);
}
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 31175d156b3d..81e8bbb95ee5 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -24,7 +24,6 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/string.hxx>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
@@ -32,6 +31,7 @@
#include <com/sun/star/task/NoMasterException.hpp>
#include <osl/diagnose.h>
+#include <rtl/character.hxx>
#include <rtl/cipher.h>
#include <rtl/digest.h>
#include <rtl/byteseq.hxx>
@@ -60,7 +60,7 @@ static OUString createIndex(const vector< OUString >& lines)
while( *pLine )
{
- if (comphelper::string::isalnumAscii(*pLine))
+ if (rtl::isAsciiAlphanumeric(static_cast<unsigned char>(*pLine)))
{
aResult += OString( *pLine );
}
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 4ea4835aafb8..0158436859c8 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -418,12 +418,12 @@ int HTMLParser::FilterToken( int nToken )
return nToken;
}
-#define HTML_ISDIGIT( c ) comphelper::string::isdigitAscii(c)
-#define HTML_ISALPHA( c ) comphelper::string::isalphaAscii(c)
-#define HTML_ISALNUM( c ) comphelper::string::isalnumAscii(c)
+#define HTML_ISDIGIT( c ) rtl::isAsciiDigit(c)
+#define HTML_ISALPHA( c ) rtl::isAsciiAlpha(c)
+#define HTML_ISALNUM( c ) rtl::isAsciiAlphanumeric(c)
#define HTML_ISSPACE( c ) ( ' ' == c || (c >= 0x09 && c <= 0x0d) )
#define HTML_ISPRINTABLE( c ) ( c >= 32 && c != 127)
-#define HTML_ISHEXDIGIT( c ) comphelper::string::isxdigitAscii(c)
+#define HTML_ISHEXDIGIT( c ) rtl::isAsciiHexDigit(c)
int HTMLParser::ScanText( const sal_Unicode cBreak )
{
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index fc98b8781e60..00f15e585f63 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -17,20 +17,23 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+#include <rtl/character.hxx>
+#include <rtl/strbuf.hxx>
#include <rtl/tencinfo.h>
+#include <rtl/ustrbuf.hxx>
#include <tools/stream.hxx>
#include <tools/debug.hxx>
#include <svtools/rtftoken.h>
#include <svtools/rtfkeywd.hxx>
#include <svtools/parrtf.hxx>
-#include <comphelper/string.hxx>
const int MAX_STRING_LEN = 1024;
const int MAX_TOKEN_LEN = 128;
-#define RTF_ISDIGIT( c ) comphelper::string::isdigitAscii(c)
-#define RTF_ISALPHA( c ) comphelper::string::isalphaAscii(c)
+#define RTF_ISDIGIT( c ) rtl::isAsciiDigit(c)
+#define RTF_ISALPHA( c ) rtl::isAsciiAlpha(c)
SvRTFParser::SvRTFParser( SvStream& rIn, sal_uInt8 nStackSize )
: SvParser( rIn, nStackSize )
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx
index 80e382bfcfe2..633e6aebd10e 100644
--- a/sw/source/filter/html/parcss1.cxx
+++ b/sw/source/filter/html/parcss1.cxx
@@ -141,14 +141,14 @@ CSS1Token CSS1Parser::GetNextToken()
case '@': // '@import' | '@XXX'
{
cNextCh = GetNextChar();
- if (comphelper::string::isalphaAscii(cNextCh))
+ if (rtl::isAsciiAlpha(cNextCh))
{
// den naechsten Identifer scannen
OUStringBuffer sTmpBuffer(32);
do {
sTmpBuffer.append( cNextCh );
cNextCh = GetNextChar();
- } while( (comphelper::string::isalnumAscii(cNextCh) ||
+ } while( (rtl::isAsciiAlphanumeric(cNextCh) ||
'-' == cNextCh) && !IsEOF() );
aToken += sTmpBuffer.makeStringAndClear();
@@ -244,7 +244,7 @@ CSS1Token CSS1Parser::GetNextToken()
do {
sTmpBuffer.append( cNextCh );
cNextCh = GetNextChar();
- } while( (comphelper::string::isalnumAscii(cNextCh) ||
+ } while( (rtl::isAsciiAlphanumeric(cNextCh) ||
'-' == cNextCh) && !IsEOF() );
aToken += sTmpBuffer.makeStringAndClear();
@@ -388,7 +388,7 @@ CSS1Token CSS1Parser::GetNextToken()
do {
sTmpBuffer2.append( cNextCh );
cNextCh = GetNextChar();
- } while( (comphelper::string::isalnumAscii(cNextCh) ||
+ } while( (rtl::isAsciiAlphanumeric(cNextCh) ||
'-' == cNextCh) && !IsEOF() );
aIdent += sTmpBuffer2.makeStringAndClear();
@@ -583,7 +583,7 @@ CSS1Token CSS1Parser::GetNextToken()
// no break
default: // IDENT | syntax error
- if (comphelper::string::isalphaAscii(cNextCh))
+ if (rtl::isAsciiAlpha(cNextCh))
{
// IDENT
@@ -601,7 +601,7 @@ CSS1Token CSS1Parser::GetNextToken()
('a'<=cNextCh && 'f'>=cNextCh) );
}
cNextCh = GetNextChar();
- } while( (comphelper::string::isalnumAscii(cNextCh) ||
+ } while( (rtl::isAsciiAlphanumeric(cNextCh) ||
'-' == cNextCh) && !IsEOF() );
aToken += sTmpBuffer.makeStringAndClear();
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx
index 77fcfa15e3d2..e428a3a78f95 100644
--- a/sw/source/ui/vba/vbatemplate.cxx
+++ b/sw/source/ui/vba/vbatemplate.cxx
@@ -36,7 +36,7 @@ static OUString lcl_CheckGroupName( const OUString& rGroupName )
for( sal_Int32 i = 0; i < rGroupName.getLength(); i++ )
{
sal_Unicode cChar = rGroupName[i];
- if (comphelper::string::isalnumAscii(cChar) ||
+ if (rtl::isAsciiAlphanumeric(cChar) ||
cChar == '_' || cChar == 0x20)
{
sRet += OUString(cChar);
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index eb375626b297..df1f77ae5781 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -31,7 +31,6 @@
#include <svl/fstathelper.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/tempfile.hxx>
-#include <comphelper/string.hxx>
#include <swtypes.hxx>
#include <uitool.hxx>
#include <glosdoc.hxx>
@@ -64,7 +63,7 @@ OUString lcl_CheckFileName( const OUString& rNewFilePath,
for( sal_Int32 i=0; i < nLen; ++i )
{
const sal_Unicode cChar = rNewGroupName[i];
- if (comphelper::string::isalnumAscii(cChar) ||
+ if (rtl::isAsciiAlphanumeric(cChar) ||
cChar == '_' || cChar == 0x20)
{
aBuf.append(cChar);
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index 6967c1726651..26e29830af18 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -52,7 +52,6 @@
#include <svl/macitem.hxx>
#include <editeng/acorrcfg.hxx>
#include <comphelper/servicehelper.hxx>
-#include <comphelper/string.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <boost/scoped_ptr.hpp>
@@ -161,7 +160,7 @@ uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName(
for(sal_Int32 nPos = 0; nPos < aGroupName.getLength(); nPos++)
{
sal_Unicode cChar = aGroupName[nPos];
- if (comphelper::string::isalnumAscii(cChar) ||
+ if (rtl::isAsciiAlphanumeric(cChar) ||
(cChar == '_') ||
(cChar == 0x20) ||
(cChar == GLOS_DELIM) )
diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx
index 4b055a1448bb..41254c95f1d9 100644
--- a/ucb/source/regexp/regexp.cxx
+++ b/ucb/source/regexp/regexp.cxx
@@ -23,9 +23,9 @@
#include "osl/diagnose.h"
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <rtl/character.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
-#include <comphelper/string.hxx>
namespace unnamed_ucb_regexp {} using namespace unnamed_ucb_regexp;
// unnamed namespaces don't work well yet...
@@ -178,19 +178,17 @@ namespace unnamed_ucb_regexp {
bool isScheme(OUString const & rString, bool bColon)
{
- using comphelper::string::isalphaAscii;
- using comphelper::string::isdigitAscii;
// Return true if rString matches <scheme> (plus a trailing ":" if bColon
// is true) from RFC 2396:
sal_Unicode const * p = rString.getStr();
sal_Unicode const * pEnd = p + rString.getLength();
- if (p != pEnd && isalphaAscii(*p))
+ if (p != pEnd && rtl::isAsciiAlpha(*p))
for (++p;;)
{
if (p == pEnd)
return !bColon;
sal_Unicode c = *p++;
- if (!(isalphaAscii(c) || isdigitAscii(c)
+ if (!(rtl::isAsciiAlpha(c) || rtl::isAsciiDigit(c)
|| c == '+' || c == '-' || c == '.'))
return bColon && c == ':' && p == pEnd;
}
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index e9bcfbf30810..865528ace1c3 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -59,7 +59,6 @@
#include <com/sun/star/awt/XTopWindow.hpp>
#include <comphelper/storagehelper.hxx>
-#include <comphelper/string.hxx>
#include <vcl/svapp.hxx>
@@ -1456,7 +1455,7 @@ OUString ExtensionIteratorBase::implGetFileFromPackage(
inline bool isLetter( sal_Unicode c )
{
- return comphelper::string::isalphaAscii(c);
+ return rtl::isAsciiAlpha(c);
}
void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< OUString > &rv,
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index a13067b012b1..d8bae20cceb1 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -18,6 +18,7 @@
*/
#include <string.h>
+#include <rtl/character.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
#include "tvread.hxx"
@@ -35,7 +36,6 @@
#include <com/sun/star/uri/UriReferenceFactory.hpp>
#include <com/sun/star/uri/XVndSunStarExpandUrl.hpp>
#include <i18nlangtag/languagetag.hxx>
-#include <comphelper/string.hxx>
#include <unotools/pathoptions.hxx>
namespace treeview {
@@ -1038,7 +1038,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextBundledHelpP
inline bool isLetter( sal_Unicode c )
{
- return comphelper::string::isalphaAscii(c);
+ return rtl::isAsciiAlpha(c);
}
void ExtensionIteratorBase::implGetLanguageVectorFromPackage( ::std::vector< OUString > &rv,