diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-08-25 19:38:50 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-08-26 00:39:48 +0200 |
commit | e73c3942de474004b04c1d538c89354183d44ae9 (patch) | |
tree | 0eb10a4d35f1e83fde4331cd3e26f582547dea77 /i18npool | |
parent | 15a15c2eb07d5c0b521a03297cdb27e645063161 (diff) |
tdf#144089: Revert "tdf#137737 i18n search: don't expand start/end with regex ^ or $"
This reverts commit a511bffd67a9cebfdc878766581ac08c79d7ff51.
Reason for revert: See https://gerrit.libreoffice.org/c/core/+/120981
Change-Id: If8a445448976a9963f76623d3d968b8d5e3d74dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120990
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/search/textsearch.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx index e6ddd93c5be6..dcb31762e6c2 100644 --- a/i18npool/source/search/textsearch.cxx +++ b/i18npool/source/search/textsearch.cxx @@ -333,7 +333,7 @@ SearchResult TextSearch::searchForward( const OUString& searchStr, sal_Int32 sta // apply normal transliteration (1<->1, 1<->0) sal_Int32 nInStartPos = startPos; - if (pRegexMatcher && startPos > 0 && !aSrchPara.searchString.startsWith("^")) + if (pRegexMatcher && startPos > 0) { // tdf#89665, tdf#75806: An optimization to avoid transliterating the whole string, yet // transliterate enough of the leading text to allow sensible look-behind assertions. @@ -345,7 +345,7 @@ SearchResult TextSearch::searchForward( const OUString& searchStr, sal_Int32 sta nInStartPos -= std::min(nMaxLeadingLen, startPos); } sal_Int32 nInEndPos = endPos; - if (pRegexMatcher && endPos < searchStr.getLength() && !aSrchPara.searchString.endsWith("$")) + if (pRegexMatcher && endPos < searchStr.getLength()) { // tdf#65038: ditto for look-ahead assertions const sal_Int32 nMaxTrailingLen = aSrchPara.searchString.endsWith(")") ? 100 : 3; |