Bug 154956

Summary: FILEOPEN DOCX: Bookmark is duplicated (but duplicate is in the correct spot)
Product: LibreOffice Reporter: Justin L <jluth>
Component: WriterAssignee: Justin L <jluth>
Status: RESOLVED FIXED    
Severity: normal CC: jluth, michael.stahl
Priority: medium Keywords: bibisected, bisected, filter:docx
Version: 7.2.2.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=128106
Whiteboard: target:7.6.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 108288    
Attachments: fdo60957-2.docx: unit test from sw/qa/extras/ooxmlexport/ooxmlexport5.cxx

Description Justin L 2023-04-21 12:32:06 UTC
Created attachment 186841 [details]
fdo60957-2.docx: unit test from sw/qa/extras/ooxmlexport/ooxmlexport5.cxx

Starting in LO 7.2.2, when opening fdo60957.docx, the bookmark is duplicated. There is only one bookmark defined in the document. <w:bookmarkStart w:id="0" w:name="_GoBack"/>

Started with commit 4bf04dea9afb30a9395e80b07a81d1908937ee8b
Author: Michael Stahl on Fri Aug 27 14:38:18 2021 +0200
    tdf#128106 sw: copy bookmarks at start if whole node is copied

https://gerrit.libreoffice.org/c/core/+/121147

Prior to this, the bookmark only existed once, but it was in the wrong spot, so not a regression. Now the copied bookmark is pointing to the right text. This is a framePr paragraph, so it gets a text to frame conversion. Likely the problem is related to that.

CC: Michael
Comment 1 Justin L 2023-04-21 15:59:09 UTC
proposed fix at https://gerrit.libreoffice.org/c/core/+/150772
Comment 2 Commit Notification 2023-04-25 16:30:15 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/21b1dd42e9a817ae9b68e9e13ea57ce2491940c6

tdf#154956 sw: delete bookmarks at end if whole node is selected

It will be available in 7.6.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.
Comment 3 Commit Notification 2023-05-15 23:36:38 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/22950a9b008e1bb22fa9e54b5d45715e25fee764

tdf#154956 sw: delete bookmarks at end: fix crashtesting

It will be available in 7.6.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.