Kaydet (Commit) 854f4ad6 authored tarafından Herbert Dürr's avatar Herbert Dürr

#i121482# fix backwards regexp search for matches overlapping search start

üst e7fc6627
......@@ -816,9 +816,15 @@ SearchResult TextSearch::RESrchBkwrd( const OUString& searchStr,
// find the last match
int nLastPos = 0;
int nFoundEnd = 0;
do {
nLastPos = pRegexMatcher->start( nIcuErr);
} while( pRegexMatcher->find( nLastPos + 1, nIcuErr));
nFoundEnd = pRegexMatcher->end( nIcuErr);
if( nFoundEnd >= startPos)
break;
if( nFoundEnd == nLastPos)
++nFoundEnd;
} while( pRegexMatcher->find( nFoundEnd, nIcuErr));
// find last match again to get its details
pRegexMatcher->find( nLastPos, nIcuErr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment