Apache OpenOffice (AOO) Bugzilla – Issue 101182
Last cursor position wrong after reloading document with redlines
Last modified: 2017-05-20 11:18:07 UTC
Writer is supposed to save the current cursor position along with the document and to reopen the document at this position. If the document contains (more than a trivial amount of) text edited using the "track changes" function (redlined text), Writer "misses" the correct cursor position by a variable degree when reopening the document. Sometimes the cursor is placed correctly, sometimes a few characters/lines before or after the last cursor location, sometimes several pages. This seems to depend on the amount of redlined text that was before the cursor position when saving. I noticed this bug with StarOffice 8 (Windows) and OpenOffice 3.0.1 (OOO300m15) and 2.0.4 (Linux). In my daily work with large documents, I notice this behaviour constantly, but when producing a test case document, I found it difficult to reproduce this error easily. Cursor position is restored correctly with a moderate number of redlined text, it requires a fairly complex document with heavier redlined editing for this bug to show up.
Created attachment 61658 [details] test case doc (cursor was in heading on page 8 when doc was saved)
@OD: (- Make sure you have user data entered in Tools - Options) - open the sample doc - go to "Placed cursor here when saving: []" - type something in the brackets - Save reload -> the cursor is in the paragrpah above "Long integer variables can store any whole number between..." Also reproducible when typing 1 character at the first position of the doc, save, reload: The cursor is then 12 characters after where it should be.
First guess for a root cause: The actual cursor position is stored as a certain position in the document. It seems that this position is searched before the view is in its final state. Workaround: Hit <Shift-F5> to jump to the last cursor position.
.
OD->OS: please take over as discussed.
Deeper investigation reveals that the data in the layout-cache (binary data about the layout of a text document additionally written to the ODF file) is not correct. But, correct data of the layout-cache is needed to place the cursor at the last position without formatting the complete text document.
Reassigned to od
Reset assigne to the default "issues@openoffice.apache.org".