Bug 148026 - Hyperlinks non-functional when saving ODT to DOCX (URL becomes PATH) with links containing # (not with DOC)
Summary: Hyperlinks non-functional when saving ODT to DOCX (URL becomes PATH) with li...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: DOCX-Hyperlink
  Show dependency treegraph
 
Reported: 2022-03-16 09:28 UTC by Telesto
Modified: 2023-03-17 07:51 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (14.23 KB, application/vnd.oasis.opendocument.text)
2022-03-16 09:28 UTC, Telesto
Details
Example file created from scratch (15.74 KB, application/vnd.oasis.opendocument.text)
2022-09-29 09:16 UTC, Gabor Kelemen (allotropia)
Details
The example file saved to docx (4.81 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-09-29 09:20 UTC, Gabor Kelemen (allotropia)
Details
Reference file from Word 2010 with the same URL and target frame settings (12.88 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-09-29 09:22 UTC, Gabor Kelemen (allotropia)
Details
The reference docx in Word, and the example odt in Writer (152.22 KB, image/png)
2022-09-29 09:29 UTC, Gabor Kelemen (allotropia)
Details
attachment 182725 in Word 2010 and Writer (169.29 KB, image/png)
2022-09-29 09:55 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2022-03-16 09:28:03 UTC
Description:
Hyperlinks record with track changes deleted when saving ODT to DOCX  (URL becomes PATH)

Steps to Reproduce:
1. open the attached file
2. Save as DOCX
3. File reload
4. CTRL+Click on of the links

Actual Results:
Blank

Expected Results:
Functional link


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 3ccc4c123f5e78e0204d11abeab2d1a74278ca3e
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL Jumbo
Comment 1 Telesto 2022-03-16 09:28:17 UTC
Created attachment 178909 [details]
Example file
Comment 2 Telesto 2022-03-16 09:30:45 UTC
Also in
Version: 6.2.9.0.0+ (x86)
Build ID: 5f01fe15eb2661f1f9ce12d1d99dc2a705b462ee
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL

and in
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 3 Dieter 2022-03-30 06:13:21 UTC
I confirm it with

Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ar-SY (de_DE); UI: en-GB
Calc: CL

Same result, if you accept all changes before saving
Comment 4 Telesto 2022-03-30 08:15:32 UTC
And in
Versie: 4.1.0.4 
Build ID: 89ea49ddacd9aa532507cbf852f2bb22b1ace28

and in
3.5.7.2
Comment 5 Gabor Kelemen (allotropia) 2022-09-29 09:16:24 UTC
Created attachment 182724 [details]
Example file created from scratch

This happens if two conditions are met:
- the URL has to contain a # sign
- the Target Frame dropdown is not empty
Comment 6 Gabor Kelemen (allotropia) 2022-09-29 09:20:45 UTC
Created attachment 182725 [details]
The example file saved to docx

Saved from

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 0d3dd0aa54ad792f91d0905f3d46c13df3512d89
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (hu_HU); UI: de-DE
Calc: threaded
Comment 7 Gabor Kelemen (allotropia) 2022-09-29 09:22:33 UTC
Created attachment 182726 [details]
Reference file from Word 2010 with the same URL and target frame settings
Comment 8 Gabor Kelemen (allotropia) 2022-09-29 09:29:25 UTC
Created attachment 182727 [details]
The reference docx in Word, and the example odt in Writer
Comment 9 Gabor Kelemen (allotropia) 2022-09-29 09:55:14 UTC
Created attachment 182728 [details]
attachment 182725 [details] in Word 2010 and Writer

To my surprise attachment 182725 [details] looks better in Word than in Writer.

The target form setting is exported correctly in the first batch of links.
The ones with the hashmark are losing this setting in Word (but the URL is good), and it turns into a file path in the Writer import.
Comment 10 Commit Notification 2023-03-09 16:47:32 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#148026 DOCX export: fix link with target frame and anchor

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 11 NISZ LibreOffice Team 2023-03-17 07:51:40 UTC
VERIFIED IN:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 668c44e841a10cec8932a446a941e6d7c386bf3b
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL threaded