• Mike Kaganski's avatar
    tdf#94810: fix reverse offset mapping · 230e9978
    Mike Kaganski yazdı
    With simple transliteration, TextSearch::searchForward used to use
    whole string to perform the search, then started to create substring
    to search. But it left the precautions from
    commit c00601da by Eike Rathke:
    searching for $ may actually return a result set pointing behind the
    search string which it does with the ICU regex engine.
    The precaution made it to skip reverse mapping if index was 0.
    
    Commit 9aae521b by Michael Stahl
    didn't consider the case when nStop is 0, and startPos > 0. Then it
    tried to get offset[-1].
    
    Anyway, using value of startPos in those conditions seems illogical.
    
    Removed those precautions (and made assertions for that).
    Fixed handling zero indexes.
    
    Reviewed-on: https://gerrit.libreoffice.org/19840Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
    Tested-by: 's avatarEike Rathke <erack@redhat.com>
    (cherry picked from commit 4cf1d290)
    
    remove comment that makes no sense, tdf#94810 follow-up
    
    nStart should not become <0, not even when searching for $ end.
    
    (cherry picked from commit 67ab2ce3)
    
    similar to searchForward() use the correct offsets, tdf#94810 related
    
    (cherry picked from commit ce91f3c1)
    
    Change-Id: I2066abc51fff7fb7323bc7f6198bdea06439d4f3
    79586471f1a7908372fa3ee044a6f66499b1790f
    cb5a45acaad9029e0998594de8b3dc2e9211866e
    Reviewed-on: https://gerrit.libreoffice.org/20136Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarMike Kaganski <mikekaganski@hotmail.com>
    
    (cherry picked from commit 028d7d84)
    230e9978
Adı
Son kayıt (commit)
Son güncelleme
..
inc Loading commit data...
qa/cppunit Loading commit data...
source Loading commit data...
util Loading commit data...
CppunitTest_i18npool_test_breakiterator.mk Loading commit data...
CppunitTest_i18npool_test_characterclassification.mk Loading commit data...
CppunitTest_i18npool_test_ordinalsuffix.mk Loading commit data...
CppunitTest_i18npool_test_textsearch.mk Loading commit data...
CustomTarget_breakiterator.mk Loading commit data...
CustomTarget_collator.mk Loading commit data...
CustomTarget_indexentry.mk Loading commit data...
CustomTarget_localedata.mk Loading commit data...
CustomTarget_textconversion.mk Loading commit data...
Executable_gencoll_rule.mk Loading commit data...
Executable_genconv_dict.mk Loading commit data...
Executable_gendict.mk Loading commit data...
Executable_genindex_data.mk Loading commit data...
Executable_saxparser.mk Loading commit data...
Library_collator_data.mk Loading commit data...
Library_dict_ja.mk Loading commit data...
Library_dict_zh.mk Loading commit data...
Library_i18npool.mk Loading commit data...
Library_i18nsearch.mk Loading commit data...
Library_index_data.mk Loading commit data...
Library_localedata_en.mk Loading commit data...
Library_localedata_es.mk Loading commit data...
Library_localedata_euro.mk Loading commit data...
Library_localedata_others.mk Loading commit data...
Library_textconv_dict.mk Loading commit data...
Makefile Loading commit data...
Module_i18npool.mk Loading commit data...
README Loading commit data...
Rdb_saxparser.mk Loading commit data...