crashtesting: fix PDF export of tdf98567-1.docx
commitbd892f3ba96fae1f0a151734053da0b39ca69c86
authorMiklos Vajna <vmiklos@collabora.com>
Thu, 27 Oct 2022 13:38:28 +0000 (27 15:38 +0200)
committerMiklos Vajna <vmiklos@collabora.com>
Thu, 27 Oct 2022 14:31:35 +0000 (27 16:31 +0200)
treec4c83fd58a9039ffffb7ccc085b124f4b3df8ba9
parentb9ec72ff4d2fb89002ab81e363712fbfd4cbfd98
crashtesting: fix PDF export of tdf98567-1.docx

Importing tdf98567-1.docx crashed with debug STL since commit
47bc36c0f87ec2d0329260bcb98d62c7667a5dd1 (sw: make sure mark container
is sorted before calling equal_range(), 2022-10-24).

The problem is that sw::mark::MarkManager::deleteMark() calls
DeregisterFromDoc(), which can call selection change listeners, which
may mutate the container.

Fix the problem by delaying the DeregisterFromDoc call using
an ILazyDeleter for DDE bookmarks.

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