From 5120d8c59dc019c09b38cd97c1581b7a4cbf9d2f Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Tue, 23 Oct 2012 22:48:10 +0200 Subject: basic: avoid String<>OUString issue by by-passing them completely Change-Id: If741661f1151950a2180fa5c6504957b44a7e998 --- basic/source/runtime/step0.cxx | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'basic') 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) -- cgit