summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-10-23 22:48:10 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-11-03 20:24:26 -0500
commit5120d8c59dc019c09b38cd97c1581b7a4cbf9d2f (patch)
treed8f93b63008433618e9a478da937f11c6f5054da
parentac476e78848ad02fd399633acbe9cb72e40d1235 (diff)
basic: avoid String<>OUString issue by by-passing them completely
Change-Id: If741661f1151950a2180fa5c6504957b44a7e998
-rw-r--r--basic/source/runtime/step0.cxx22
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)