I gone deeper in this issue, and it not depends on Track changes Show/Hide.
Undo has RedlinesGuard, which sets show/hide to value, that been when Undo 
action created. So Undo works fine and I not going to purge Undo stack.

I think the problem is created by sw::DocumentRedlineManager::CompressRedlines 
(https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/DocumentRedlineManager.cxx#1792).
 As name states it compress redlines (merges two neighbor redlines if they have 
same author, type, second redline starts where first ends 
second.mark==first.point and so on). During compression it modifies indexes and 
Undo crushes LO.

Now I’m investigating CompresRedlines further. I think it can be changed so it 
merges only two neighbor redlines in the same node and not merge cross-node. Or 
maybe it should be completely removed, as it only merges redlines if they’ve 
been created in the same minute! 
(https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/docredln.cxx#946)
So chances that two redlines will be merged are very low.


------ Исходное сообщение ------
От: "Miklos Vajna" <vmik...@collabora.co.uk<mailto:vmik...@collabora.co.uk>>
Кому: 
libreoffice@lists.freedesktop.org<mailto:libreoffice@lists.freedesktop.org>
Отправлено: 05.01.2018 18:35:12
Тема: Re: Bug 83260

Hi,

On Thu, Jan 04, 2018 at 09:45:14AM +0800, "Matthew J. Francis" 
<mjay.fran...@gmail.com<mailto:mjay.fran...@gmail.com>> wrote:
 I use tracked changes on a regular basis, and would much rather this be
 treated as "maybe difficult but important to get right" than "too hard, so
 don't bother"

Perhaps a middle ground is to give up undo/redo only for the subset when
we know we would crash anyway? And sure, if somebody has the
time/motivation to look at the root cause of the crash (currently I
don't), that's even better.

Regards,

Miklos
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to