diff options
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/rtftok/rtfdispatchdestination.cxx | 12 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtftokenizer.cxx | 10 |
2 files changed, 14 insertions, 8 deletions
diff --git a/writerfilter/source/rtftok/rtfdispatchdestination.cxx b/writerfilter/source/rtftok/rtfdispatchdestination.cxx index 0c44e25b4dd2..3863309b3601 100644 --- a/writerfilter/source/rtftok/rtfdispatchdestination.cxx +++ b/writerfilter/source/rtftok/rtfdispatchdestination.cxx @@ -13,6 +13,7 @@ #include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <filter/msfilter/escherex.hxx> +#include <rtl/character.hxx> #include <tools/stream.hxx> #include <dmapper/DomainMapperFactory.hxx> @@ -71,11 +72,16 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) Strm().ReadChar(ch); if ('\\' == ch) bInKeyword = true; - if (!bInKeyword && isalnum(ch)) + if (!bInKeyword + && rtl::isAsciiAlphanumeric(static_cast<unsigned char>(ch))) aBuf.append(ch); - else if (bInKeyword && isspace(ch)) + else if (bInKeyword + && rtl::isAsciiWhiteSpace( + static_cast<unsigned char>(ch))) bInKeyword = false; - if (!aBuf.isEmpty() && !isalnum(ch)) + if (!aBuf.isEmpty() + && !rtl::isAsciiAlphanumeric( + static_cast<unsigned char>(ch))) bFoundCode = true; } diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx index fd0fd2f9d44e..91b41eb5242e 100644 --- a/writerfilter/source/rtftok/rtftokenizer.cxx +++ b/writerfilter/source/rtftok/rtftokenizer.cxx @@ -166,7 +166,7 @@ RTFError RTFTokenizer::resolveParse() int RTFTokenizer::asHex(char ch) { int ret = 0; - if (isdigit(ch)) + if (rtl::isAsciiDigit(static_cast<unsigned char>(ch))) ret = ch - '0'; else { @@ -203,7 +203,7 @@ RTFError RTFTokenizer::resolveKeyword() if (Strm().IsEof()) return RTFError::UNEXPECTED_EOF; - if (!isalpha(ch)) + if (!rtl::isAsciiAlpha(static_cast<unsigned char>(ch))) { aBuf.append(ch); OString aKeyword = aBuf.makeStringAndClear(); @@ -211,7 +211,7 @@ RTFError RTFTokenizer::resolveKeyword() // without doing any SeekRel() return dispatchKeyword(aKeyword, bParam, nParam); } - while (isalpha(ch)) + while (rtl::isAsciiAlpha(static_cast<unsigned char>(ch))) { aBuf.append(ch); Strm().ReadChar(ch); @@ -234,13 +234,13 @@ RTFError RTFTokenizer::resolveKeyword() if (Strm().IsEof()) return RTFError::UNEXPECTED_EOF; } - if (isdigit(ch)) + if (rtl::isAsciiDigit(static_cast<unsigned char>(ch))) { OStringBuffer aParameter; // we have a parameter bParam = true; - while (isdigit(ch)) + while (rtl::isAsciiDigit(static_cast<unsigned char>(ch))) { aParameter.append(ch); Strm().ReadChar(ch); |