Author: hdu
Date: Fri Mar 30 09:43:07 2012
New Revision: 1307336
URL: http://svn.apache.org/viewvc?rev=1307336&view=rev
Log:
textsearch.cxx: unify for compiler independency
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=1307336&r1=1307335&r2=1307336&view=diff
==============================================================================
--- incubator/ooo/trunk/main/i18npool/source/search/textsearch.cxx (original)
+++ incubator/ooo/trunk/main/i18npool/source/search/textsearch.cxx Fri Mar 30
09:43:07 2012
@@ -720,11 +720,7 @@ void TextSearch::RESrchPrepare( const ::
nIcuSearchFlags |= UREGEX_CASE_INSENSITIVE;
UErrorCode nIcuErr = U_ZERO_ERROR;
// assumption: transliteration didn't mangle regexp control chars
-#ifdef OS2
IcuUniString aIcuSearchPatStr( (const UChar*)rPatternStr.getStr(),
rPatternStr.getLength());
-#else
- IcuUniString aIcuSearchPatStr( rPatternStr.getStr(),
rPatternStr.getLength());
-#endif
#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 \>
@@ -756,11 +752,7 @@ SearchResult TextSearch::RESrchFrwrd( co
// use the ICU RegexMatcher to find the matches
UErrorCode nIcuErr = U_ZERO_ERROR;
-#ifdef OS2
const IcuUniString aSearchTargetStr( (const UChar*)searchStr.getStr(),
endPos);
-#else
- const IcuUniString aSearchTargetStr( searchStr.getStr(), endPos);
-#endif
pRegexMatcher->reset( aSearchTargetStr);
// search until there is a valid match
for(;;)
@@ -810,11 +802,7 @@ SearchResult TextSearch::RESrchBkwrd( co
// TODO: use ICU's backward searching once it becomes available
// as its replacement using forward search is not as good as the
real thing
UErrorCode nIcuErr = U_ZERO_ERROR;
-#ifdef OS2
const IcuUniString aSearchTargetStr( (const UChar*)searchStr.getStr(),
startPos);
-#else
- const IcuUniString aSearchTargetStr( searchStr.getStr(), startPos);
-#endif
pRegexMatcher->reset( aSearchTargetStr);
if( !pRegexMatcher->find( endPos, nIcuErr))
return aRet;