[Libreoffice-commits] core.git: Branch 'aoo/trunk' - i18npool/source

Herbert Dürr hdu at apache.org
Mon Jun 24 09:07:39 PDT 2013


 i18npool/source/search/textsearch.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 8d5b2edaba1347c040b4fa12ad8e67cfda2832a4
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Jun 24 14:55:16 2013 +0000

    #i121880# fix case-sensitive non-regexp text search
    
    Patch by: Tsutomu Uchino <hanya.runo at gmail.com>
    Review by: Herbert Duerr <hdu at apache.org>

diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx
index f1c19c7..5c8dac6 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -64,7 +64,8 @@ static sal_Int32 COMPLEX_TRANS_MASK_TMP =
     TransliterationModules_ignoreKiKuFollowedBySa_ja_JP |
     TransliterationModules_ignoreProlongedSoundMark_ja_JP;
 static const sal_Int32 COMPLEX_TRANS_MASK = COMPLEX_TRANS_MASK_TMP | TransliterationModules_IGNORE_KANA | TransliterationModules_FULLWIDTH_HALFWIDTH;
-static const sal_Int32 SIMPLE_TRANS_MASK = ~(COMPLEX_TRANS_MASK | TransliterationModules_IGNORE_CASE | TransliterationModules_UPPERCASE_LOWERCASE | TransliterationModules_LOWERCASE_UPPERCASE);
+static const sal_Int32 SIMPLE_TRANS_MASK = ~COMPLEX_TRANS_MASK;
+static const sal_Int32 REGEX_TRANS_MASK = ~(COMPLEX_TRANS_MASK | TransliterationModules_IGNORE_CASE | TransliterationModules_UPPERCASE_LOWERCASE | TransliterationModules_LOWERCASE_UPPERCASE);
     // Above 2 transliteration is simple but need to take effect in
     // complex transliteration
 
@@ -705,7 +706,7 @@ void TextSearch::RESrchPrepare( const ::com::sun::star::util::SearchOptions& rOp
 {
     // select the transliterated pattern string
     const OUString& rPatternStr =
-        (rOptions.transliterateFlags & SIMPLE_TRANS_MASK) ? sSrchStr
+        (rOptions.transliterateFlags & REGEX_TRANS_MASK) ? sSrchStr
         : ((rOptions.transliterateFlags & COMPLEX_TRANS_MASK) ? sSrchStr2 : rOptions.searchString);
 
     sal_uInt32 nIcuSearchFlags = UREGEX_UWORD; // request UAX#29 unicode capability


More information about the Libreoffice-commits mailing list