• Mike Kaganski's avatar
    tdf#94810: fix reverse offset mapping · 4cf1d290
    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.
    
    Change-Id: I2066abc51fff7fb7323bc7f6198bdea06439d4f3
    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>
    4cf1d290
Adı
Son kayıt (commit)
Son güncelleme
..
cppunit Loading commit data...