summaryrefslogtreecommitdiff
path: root/sd/qa/unit/import-tests.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-07-28 23:44:53 +0200
committerCaolán McNamara <caolanm@redhat.com>2017-08-02 10:22:03 +0200
commit75a1dce57f7038bc88c74c4e50dd22306be8cf61 (patch)
tree170e0c049b85b2105db4d9b93a06eb0758e6d8f7 /sd/qa/unit/import-tests.cxx
parentdef36294754a7263101b421166195eb1b95d6d6f (diff)
tdf#105705 sw: sort bookmarks in ContentIdxStoreImpl::RestoreBkmks()
The problem here is that the SplitNode() calls in SwRTFReader::Read() destroy the order of the bookmarks, which causes an assert later from the std::lower_bound() when a new mark is created. The 2 marks that cause the problem are: SwPosition (node 5, offset 0) SwPosition (node 5, offset 0), SwPosition (node 5, offset 0) During the 2 SplitNode calls, the second one is corrected by ContentIdxStore and remains on 5, but the first one is not and becomes: SwPosition (node 7, offset 0) ContentIdxStoreImpl::SaveBkmks() does different things when a mark position is exactly on the parameter position: if it has only one position, it is ignored, but if it has a second position, then both its positions are corrected. It is not possible to change the sort order so that marks with one position are sorted behind marks with 2 positions, because while SplitNode() corrects marks "backward", JoinNode() uses ContentIdxStore to correct marks "forward"; hence manually sort the marks. Change-Id: If5b35f18bfd47ffe98c0f67e84d380ca801411a3 (cherry picked from commit f2d2093b2198bd4c65475a60329a5a6a7a8575f1) Reviewed-on: https://gerrit.libreoffice.org/40544 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/qa/unit/import-tests.cxx')
0 files changed, 0 insertions, 0 deletions