Created attachment 136603 [details] sample steps: 1. open attached document 2. cursor should be placed at the beginning of line 2 Relevant XML <w:p w:rsidR="003D1584" w:rsidRDefault="003D1584"> <w:bookmarkStart w:id="0" w:name="_GoBack" /> <w:bookmarkEnd w:id="0" /> <w:r> <w:t>Testing 2</w:t> </w:r> </w:p> Version: 6.0.0.0.alpha0+ Build ID: 8d2a287da3abb0576512406227d0a3acd602123e CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; Locale: en-US (en_US.UTF-8); Calc: group
I see in MSO 2013 that it opens DOCX on the beginning, but is offering "Pick up where you left off". Meaning that it already saves position, as explained here. LO doesn't move cursor to that position, as with .odt. Test master 6.5+.
ODT has that ability. Cursor Position In general, all documents open with the cursor at the start of the document. One exception appears when the author of a Writer text document saves and reopens a document: The cursor will be at the same position where it has been when the document was saved. This only works when the name of the author was entered in Tools - Options - LibreOffice - User Data. Press Shift+F5 to set the cursor to the last saved position.
Shift-F5 is SID_RESTORE_EDITING_VIEW. We somehow need to call SetRestorePosition if we have the bookmark _GoBack I guess. OK - that's easy. It is always called. Look at ZoomFactor in writerfilter's ApplySettingsTable for the place to set those variables. In ODT these are stored in settings.xml as ViewLeft and ViewTop (and IsSelectedFrame). However, it will be INCREDIBLY hard to convert a bookmark into a LO Cursor position. Possibly a better alternative would be to extend LO itself to ALSO look for a _GoBack bookmark when SID_RESTORE_EDITING_VIEW is called. (However, LO won't change _GoBack bookmarks at save time, so that position would never be updated by LO.)
Shift-F5 suggested implementation here: https://gerrit.libreoffice.org/c/core/+/136409/1
Does MS Word save _GoBack as a selection? -2010: yes -2019: no - no _GoBack saved at all. Does MS Word prompt to jump to _GoBack -2010: no -2013: yes (according to comment 1) -2019: no, but it does prompt based on some (likely) internally stored data. Based on this inconsistency and abandonment by MS, I don't see any point in implementing this for DOCX.