sw: make sure mark container is sorted before calling equal_range()
commit47bc36c0f87ec2d0329260bcb98d62c7667a5dd1
authorMiklos Vajna <vmiklos@collabora.com>
Mon, 24 Oct 2022 13:03:18 +0000 (24 15:03 +0200)
committerMiklos Vajna <vmiklos@collabora.com>
Mon, 24 Oct 2022 15:16:05 +0000 (24 17:16 +0200)
treebc879e321835f3fb5cd92e1af48b40daba84fea5
parent3875cc3056a0955293042cd4eaaaef7d8f7e2ee8
sw: make sure mark container is sorted before calling equal_range()

ooo89390-1.doc from crashtesting failed to export to ODT due to this.

The trouble is that equal_range() needs a sorted container, but a
listener may make the container unsorted.

Fix the problem by re-sorting the container after calling the listener.

A full ODT export is not needed to trigger the crash, it's enough to
hide deletions.

Change-Id: Id5601d7659d534c0bbfa84845abf0e6bb8e94c6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141765
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
sw/qa/core/doc/data/bookmark-delete-redline.doc [new file with mode: 0644]
sw/qa/core/doc/doc.cxx
sw/source/core/doc/docbm.cxx