diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-08-18 23:05:53 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-08-21 15:52:41 +0200 |
commit | 685442bf71440e56fa8ae5a572d62f0a1e2c3200 (patch) | |
tree | cb207dcd0cb8b52dfb77ea61df8c60fda68c713b /bean | |
parent | 38fa44435a428685b4ac59ee98972a8521942225 (diff) |
tdf#111524 sw: delete annotation marks when creating delete redline
Range annotations are represented by a SwPostItField at the end of the
annotated range, and a AnnotationMark that covers the range (including
the field).
During a normal delete, SwUndoDelete calls
SwUndoSaveContent::DelContentIndex(), which has a special case to remove
the AnnotationMark if the field is deleted.
The problem is that when change tracking is enabled, the AnnotationMark
survives, but the field is moved out of the paragraph when the redlines
are hidden (as happens during ODF export), hence
lcl_FillAnnotationStartArray() doesn't find its field.
There doesn't appear to be a good solution to this, because in ODF it's
also not possible to represent this, because the deleted content is
outside the text:p element.
It doesn't work to delete the annotation mark in DelBookmarks(), when
hiding the redline, because then no Undo is created to restore
the mark, and DelBookmarks() is also called from Undo code from
SwUndoDelete, which breaks with this change.
So delete the annotation mark when creating the redline in
DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl().
Fixes the assert and the subsequent crash, which is a regression
from 31c54fa7bb03768b425ae019096e0a0e26e9c736.
Change-Id: I361ffee8e6ab86de499c25f34a96ceeaf83d9e0b
Diffstat (limited to 'bean')
0 files changed, 0 insertions, 0 deletions