Created attachment 196686 [details] The example file in Word 2016 and Writer master, with bookmarks visible This was noticed while looking at the example file bug 79435's attachment 100137 [details] (mentioned in bug 150037) This docx has 4 legacy text fields and Word creates a bookmark for each of them. Writer opens with only 3, making navigation to the first one difficult. 1. Open the above example file, look at the Navigator -> Bookmarks -> There are 3 bookmarks listed instead of 4 Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 5b54f68599d9a9b6f4d21fd8c0cdac746ea71ecb CPU threads: 14; OS: Windows 10 X86_64 (10.0 build 19045); UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: default Seems to have started in 6.2 with: https://git.libreoffice.org/core/+/579c0749bef8c980507229439715e72060c1b077%5E%21/#F2 commit 579c0749bef8c980507229439715e72060c1b077 [log] author Justin Luth <justin.luth@collabora.com> Tue Oct 09 14:03:37 2018 +0300 committer Justin Luth <justin_luth@sil.org> Fri Oct 12 05:56:01 2018 +0200 tdf120224 writerfilter: consume excess bookmark from fields Adding CC to: Justin Luth
Interesting - the difference is that the first bookmark comes after the field has already started [like how LO exports] <w:fldChar w:fldCharType="begin"> <w:ffData> <w:name w:val="Text1"/> ... <w:bookmarkStart w:id="0" w:name="Text1"/> while the other fields all start with the bookmark and then define the field [which is how MS Word exports], and thus they didn't pass if(IsOpenField()). If I understand this bug report correctly, there is no functionality break. It simply is a convenient fact that the legacy fields (which are not entities in the navigator sidebar) are typically wrapped with a bookmark (which IS an navigable entity). On the other hand, the avoidance of reading the presumably-LO-exported bookmark was also a convenience factor that tried to mitigate previous bad export behaviour. So I don't really see any reason why not to revert that commit...
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7f84c993d3d2b5f05b18e740fea960901da57f80 tdf#163154 revert "tdf120224 writerfilter: consume excess bookmark It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I don't see any reason to backport this...
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/9eacd3d6dda69b7c7c22c5168508287a10204b57 tdf#163154 revert "tdf120224 writerfilter: consume excess bookmark It will be available in 24.8.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/1a4baa7d2907a9a3317b25762cbe11ae27389fea tdf#163154 revert "tdf120224 writerfilter: consume excess bookmark It will be available in 24.2.7. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.