I tried, and got single redline with all my text.
Such case like typing new text is cared by 
sw::DocumentRedlineManager::AppendRedline, which has lengthy code for any 
possible situation (like typing inside deleted text, adding to existing 
redline, etc.) It also calls CompresRedlines at the end, but many 
"compressions" are done by sw::DocumentRedlineManager::AppendRedline, so 
CompresRedlines doesn't do much

I think that the best solution for bug in question is to remove call to 
CompresRedlines from Undo/Redo. So Undo/Redo won't compress redlines and change 
indexes.
I don't like to change CompresRedlines as it called by AppendRedline and from 
several other places.
For me such solution can be safest.

PS Its funny, that if you type some text in single paragraph with change 
tracking = ON, you'll get new redline every single minute, even if you type 
continuously :-) This is by design, as AppendRedline calls CanCombine which 
only allows combining those text, which has been typed during single minute 
(https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/DocumentRedlineManager.cxx#861)

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

Hi,

On Sat, Jan 06, 2018 at 01:20:05AM +0000, Yemelyanenko Fyodor 
<fyodo...@hotmail.com<mailto:fyodo...@hotmail.com>> wrote:
 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.

Did you try typing "asdf" into a document without that merging enabled?
I think 4 redlines are created without this "merge changes from the same
minute" mechanism.

Regards,

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

Reply via email to