Bug 123642

Summary: FILEOPEN | DOCX, Hyperlink in docx with bookmark target missing in LO.
Product: LibreOffice Reporter: NISZ LibreOffice Team <libreoffice>
Component: WriterAssignee: Vasily Melenchuk (CIB) <vasily.melenchuk>
Status: VERIFIED FIXED    
Severity: normal CC: kelemeng, nemeth, raal, thb
Priority: medium Keywords: filter:docx
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=75634
https://bugs.documentfoundation.org/show_bug.cgi?id=100566
Whiteboard: target:7.3.0 target:7.2.2
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107733, 125611    
Attachments: Example file from Word
Screenshot of the original document side by side in Word and Writer.

Description NISZ LibreOffice Team 2019-02-22 09:43:44 UTC
Description:
Hyperlink created in MSO with bookmark target missing when the docx is opened in LO.

Steps to Reproduce:
    1. Create a docx in MSO.
    2. Create a new page with Ctrl+Enter→ Insert→ Bookmark
    3. Go back to the first page→ Insert→ Hyperlink→ Place in this document→ Pick the Bookmark.
    4. Save and exit the file.
    5. Open it in LO.
    6. Try activating the Hyperlink then check the Navigator.

Actual Results:
The Hyperlink doesn’t do anything and there are no Bookmarks in the Navigator.

Expected Results:
The Hyperlink goes to the place of the Bookmark and the Bookmark is not missing.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2019-02-22 09:44:22 UTC
Created attachment 149504 [details]
Example file from Word
Comment 2 NISZ LibreOffice Team 2019-02-22 09:44:42 UTC
Created attachment 149505 [details]
Screenshot of the original document side by side in Word and Writer.
Comment 3 raal 2019-02-22 17:57:33 UTC
confirm with Version: 6.3.0.0.alpha0+
Build ID: 465939feb0e9c382e5581b53b72008979ece4807
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;
and Version: 4.1.0.0.alpha1+
Build ID: 863d38fbfa4fb4861e476828c46410602100919

works correct with format .doc
Comment 4 Adam Kovacs 2019-04-01 16:32:24 UTC
This is even not working, if you save it in Writer (to docx) and reopen it.

How to reproduce in Writer (6.3):
1. ctr + enter (new page)
2. insert menu, select bookmark, rename if needed, insert button
3. go back to first page
4. insert menu, hyperlink, document, target, bookmarks, your previously named bookmark, double click or apply button
5. in the hyperlink titled window click on OK button
6. save as docx and reopen
Comment 5 Timur 2019-12-11 11:15:47 UTC
Looks Inherited. Repro 6.5+.
In my test in bug 75634 I concluded that any bookmark from the body of MSO created DOCX is missing in LO. (Interesting that bookmark from the footnote is there.)
Note: LO saved DOCX opens fine with MSO 2013, and we see the LO created footer bookmark on inserting another, but we cannot go to it with Ctrl+G. This may be due to bookmarks being in footer, because if bookmark is created in MSO, it also doesn't offer bookmark from footer. But if saved with MSO, it's still there in LO.
Comment 6 Commit Notification 2021-09-12 22:37:48 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/daa1469e3e7bfe840efb6f3fad1bac63a2577e3f

tdf#123642: keep last bookmark at the document end

It will be available in 7.3.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 7 Commit Notification 2021-09-14 08:01:25 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/683842708664e37210eb0db5f974c042b1ee7ff6

tdf#123642: keep last bookmark at the document end

It will be available in 7.2.2.

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 8 Thorsten Behrens (allotropia) 2021-09-29 14:32:34 UTC
Seen fixed in 7.2.2.1