summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2020-01-03 21:12:25 +0100
committerEike Rathke <erack@redhat.com>2020-01-03 21:13:29 +0100
commitace8602466986e0249aa41845dce4e7da4fcafba (patch)
tree2d345e02641464da173017db729194dbfa6cf90c /i18npool
parent12b4590f3a9ba64bcc27e60185ee7366d9894cc7 (diff)
Elaborate comment what happens, tdf#78840 follow-up
Change-Id: I30bfc2891e422e8cfcb83f01136c654e3a1b03f5
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/search/textsearch.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx
index 9c3bf63eeb64..de0f74ad2cb9 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -131,8 +131,15 @@ void TextSearch::setOptions2( const SearchOptions2& rOptions )
maWildcardReversePattern2.clear();
TransliterationFlags transliterateFlags = static_cast<TransliterationFlags>(aSrchPara.transliterateFlags);
if (aSrchPara.AlgorithmType2 == SearchAlgorithms2::REGEXP)
- // RESrchPrepare will consider SearchAlgorithms2::REGEXP in aSrchPara.transliterateFlags
+ {
+ // RESrchPrepare will consider aSrchPara.transliterateFlags when
+ // picking the actual regex pattern
+ // (sSrchStr|sSrchStr2|SearchOptions2::searchString) and setting
+ // case-insensitivity. Create transliteration instance, if any, without
+ // ignore-case so later in TextSearch::searchForward() the string to
+ // match is not case-altered, leave case-(in)sensitive to regex engine.
transliterateFlags &= ~TransliterationFlags::IGNORE_CASE;
+ }
// Create Transliteration class
if( isSimpleTrans( transliterateFlags) )