incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject svn commit: r1301596 - /incubator/ooo/trunk/main/i18npool/source/search/textsearch.cxx
Date Fri, 16 Mar 2012 15:27:37 GMT
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);



Mime
View raw message