You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2012/03/16 16:27:37 UTC
svn commit: r1301596 -
/incubator/ooo/trunk/main/i18npool/source/search/textsearch.cxx
Author: hdu
Date: Fri Mar 16 15:27:36 2012
New Revision: 1301596
URL: http://svn.apache.org/viewvc?rev=1301596&view=rev
Log:
#i118925# fix old word-boundary emulation
Modified:
incubator/ooo/trunk/main/i18npool/source/search/textsearch.cxx
Modified: incubator/ooo/trunk/main/i18npool/source/search/textsearch.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/i18npool/source/search/textsearch.cxx?rev=1301596&r1=1301595&r2=1301596&view=diff
==============================================================================
--- incubator/ooo/trunk/main/i18npool/source/search/textsearch.cxx (original)
+++ incubator/ooo/trunk/main/i18npool/source/search/textsearch.cxx Fri Mar 16 15:27:36 2012
@@ -725,11 +725,11 @@ void TextSearch::RESrchPrepare( const ::
#else
IcuUniString aIcuSearchPatStr( rPatternStr.getStr(), rPatternStr.getLength());
#endif
-#if 1
+#ifndef DISABLE_WORDBOUND_EMULATION
// for conveniance specific syntax elements of the old regex engine are emulated
// by using regular word boundary matching \b to replace \< and \>
- static const IcuUniString aChevronPattern( "\\<|\\>", -1, IcuUniString::kInvariant);
- static const IcuUniString aChevronReplace( "\\b", -1, IcuUniString::kInvariant);
+ static const IcuUniString aChevronPattern( "\\\\<|\\\\>", -1, IcuUniString::kInvariant);
+ static const IcuUniString aChevronReplace( "\\\\b", -1, IcuUniString::kInvariant);
static RegexMatcher aChevronMatcher( aChevronPattern, 0, nIcuErr);
aChevronMatcher.reset( aIcuSearchPatStr);
aIcuSearchPatStr = aChevronMatcher.replaceAll( aChevronReplace, nIcuErr);