Bug 127362 - FILESAVE DOCX Image hyperlink to bookmark target with spaces broken after export
Summary: FILESAVE DOCX Image hyperlink to bookmark target with spaces broken after export
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0
Keywords:
Depends on:
Blocks: DOCX-Hyperlink
  Show dependency treegraph
 
Reported: 2019-09-05 10:30 UTC by NISZ LibreOffice Team
Modified: 2019-10-04 05:45 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the problem in Writer. (211.44 KB, image/png)
2019-09-05 10:31 UTC, NISZ LibreOffice Team
Details
Example ODT file from Writer. (30.39 KB, application/vnd.oasis.opendocument.text)
2019-09-05 10:31 UTC, NISZ LibreOffice Team
Details
The original file saved as DOCX. (24.01 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-09-05 10:32 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-09-05 10:30:15 UTC
Description:
Hyperlink inserted to image with bookmark target is broken after DOCX export when the bookmark name contains white space.

Steps to Reproduce:
    1. Create a new document in Writer.
    2. Choose Insert -> Bookmark.
    3. Click Insert.
    4. Type text.
    5. Insert a page break.
    6. Insert an image.
    7. Select the image.
    8. Choose Insert -> Hyperlink.
    9. Select Document and click on icon below Target in Document.
    10. Select the bookmark in Target in Document window.
    11. Click on Apply button, and then click on Close button in Target in Document window.
    12. Click on OK button.
    13. Save the file as DOCX.
    14. Reload the file.
    15. Ctrl+Click the image.

Actual Results:
The hyperlink doesn’t work.

Expected Results:
The hyperlink should work after export.


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details:
Version: 6.4.0.0.alpha0+ (x64)
Build ID: 1bad7f0b19e47a41a1919573f80785ec62c611af
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: threaded
Comment 1 NISZ LibreOffice Team 2019-09-05 10:31:25 UTC
Created attachment 153901 [details]
Screenshot of the problem in Writer.
Comment 2 NISZ LibreOffice Team 2019-09-05 10:31:52 UTC
Created attachment 153902 [details]
Example ODT file from Writer.
Comment 3 NISZ LibreOffice Team 2019-09-05 10:32:22 UTC
Created attachment 153903 [details]
The original file saved as DOCX.
Comment 4 Dieter 2019-09-06 06:29:11 UTC
It works for me with double-click. Do you get the same result?

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 01837a85004a6f891a09c0a63ed7eff75d634827
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-09-01_00:07:05
Locale: en-GB (de_DE); UI-Language: en-US
Calc: threaded
Comment 5 Tünde Tóth 2019-09-09 12:47:29 UTC
Confirmed with:

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 9670abc43051e1f7a3f2ed9369ca9a3748aa7a2b
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL
Comment 6 Dieter 2019-09-09 12:49:31 UTC
(In reply to Tünde Tóth from comment #5)
> Confirmed with:
> 
> Version: 6.4.0.0.alpha0+ (x64)
> Build ID: 9670abc43051e1f7a3f2ed9369ca9a3748aa7a2b
> CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
> Locale: hu-HU (hu_HU); UI-Language: en-US
> Calc: CL

Tünde, does it work for you with double-click or is it completely broken?
Comment 7 Tünde Tóth 2019-09-09 13:48:18 UTC
It works for me with Ctrl+double-click. But I click anywhere else, and then I Ctrl+double-click the image: the link broken.
Comment 8 Commit Notification 2019-09-10 06:17:48 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/745f4cc374297a73ff5243cdd42a839e469619e7%5E%21

tdf#127362 DOCX export: fix image hyperlink with space to bookmark target

It will be available in 6.4.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 9 Dieter 2019-10-04 05:45:36 UTC
Verified with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 460908269972fd1f89312a1e62897ed1503e9e98
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-09-30_09:18:03
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Tünde, thanks for fixing this!