diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-10-23 22:48:10 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-11-03 20:24:26 -0500 |
commit | 5120d8c59dc019c09b38cd97c1581b7a4cbf9d2f (patch) | |
tree | d8f93b63008433618e9a478da937f11c6f5054da /basic | |
parent | basic: clean-up String from eventatt.cxx (diff) | |
download | core-5120d8c59dc019c09b38cd97c1581b7a4cbf9d2f.tar.gz core-5120d8c59dc019c09b38cd97c1581b7a4cbf9d2f.zip |
basic: avoid String<>OUString issue by by-passing them completely
Change-Id: If741661f1151950a2180fa5c6504957b44a7e998
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/step0.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index 0b361973f91d..ee1404db6c2a 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -179,8 +179,26 @@ namespace { bool NeedEsc(sal_Unicode cCode) { - String sEsc(RTL_CONSTASCII_USTRINGPARAM(".^$+\\|{}()")); - return (STRING_NOTFOUND != sEsc.Search(cCode)); + if((cCode & 0xFF80)) + { + return false; + } + switch((sal_uInt8)(cCode & 0x07F)) + { + case '.': + case '^': + case '$': + case '+': + case '\\': + case '|': + case '{': + case '}': + case '(': + case ')': + return true; + default: + return false; + } } String VBALikeToRegexp(const String &rIn) |