-
Michael Stahl yazdı
* SwTOXBaseSection::Update(): refactor this to *first* collect the info from the document (creating CrossRefHeadingBookmark as a side effect) and *then* do the node deletion/insertion of the ToX itself * add new SwUndoUpdateIndex class for the update itself; it does 3 of the 4 required steps, the last one is done by a SwUndoDelSection that is already created when the original title section is deleted * SwUndoInsSection::RedoImpl() for a ToX should not Update the ToX because that's the job of SwUndoUpdateIndex * SwUndoSaveSection::RestoreSection()/MoveFromUndoNds() need to create frames for the moved nodes; not sure why other users of RestoreSection() don't do this currently so add a flag * SwUndoSaveContent::MoveToUndoNds() should *always* delete frames; seriously, why would leaving frames alive ever be a good idea? * SwUndoSaveSection::SaveSection() should not delete the surrounding section node of the ToX, so add a flag to prevent it This fixes tdf#123313, the SwUndoInsBookmark are now appended at the right time. This should fix the crash in i#42807 properly. In order to fix these bugs, implementing the feature requested in tdf#38703 was necessary. Change-Id: Ia976a118eb81ca37b0c48678825a1f5cd4031789 Reviewed-on: https://gerrit.libreoffice.org/71323 Tested-by: Jenkins Reviewed-by:
Michael Stahl <Michael.Stahl@cib.de>
41df42a8