Bug 127579 - FILEOPEN DOCX: Hyperlink color and underlining gets lost when saving to DOCX
Summary: FILEOPEN DOCX: Hyperlink color and underlining gets lost when saving to DOCX
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:6.4.0 target:6.5.0 target:6.4....
Keywords: bibisected, bisected, regression
: 128909 (view as bug list)
Depends on:
Blocks: DOCX-Hyperlink
  Show dependency treegraph
 
Reported: 2019-09-16 15:13 UTC by Vedran Miletić
Modified: 2022-10-07 11:20 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT file (17.99 KB, application/vnd.oasis.opendocument.text)
2019-09-16 15:14 UTC, Vedran Miletić
Details
DOCX file (7.37 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-09-16 15:14 UTC, Vedran Miletić
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vedran Miletić 2019-09-16 15:13:33 UTC
Description:
Hyperlinks are lost when saving an ODT file created by Pandoc to DOCX. Hyperlinks work fine when ODT is used.

Steps to Reproduce:
1. Open ODT file.
2. Save as DOCX.
3. Close and open DOCX.

Actual Results:
Hyperlinks are lost.

Expected Results:
Hyperlinks should remain where they were in ODT.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Also happens in 6.3.0.2.
Comment 1 Vedran Miletić 2019-09-16 15:14:02 UTC
Created attachment 154198 [details]
ODT file
Comment 2 Vedran Miletić 2019-09-16 15:14:21 UTC
Created attachment 154199 [details]
DOCX file
Comment 3 MM 2019-09-16 18:11:35 UTC
Tested on windows 7 x64 with Version: 6.3.2.1 (x64)
Build ID: db810050ff08fd4774137f693d5a01d22f324dfd
CPU threads: 3; OS: Windows 6.1; UI render: default; VCL: win

There is nothing wrong with the hyperlinks. But instead, the underlining & font color of the hyperlinks are gone.
Comment 4 Vedran Miletić 2019-09-16 18:31:45 UTC
(In reply to MM from comment #3)
> Tested on windows 7 x64 with Version: 6.3.2.1 (x64)
> Build ID: db810050ff08fd4774137f693d5a01d22f324dfd
> CPU threads: 3; OS: Windows 6.1; UI render: default; VCL: win
> 
> There is nothing wrong with the hyperlinks. But instead, the underlining &
> font color of the hyperlinks are gone.

Indeed. I stand corrected.
Comment 5 MM 2019-09-16 21:10:32 UTC Comment hidden (obsolete)
Comment 6 Dieter 2019-09-17 17:13:44 UTC
I confirm it with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: f0c832acb53326ccc9a8c1a47401fbc9e1081feb
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-09-11_05:46:53
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

and also with

Version: 6.1.6.3 (x64)
Build-ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: group threaded
Comment 7 NISZ LibreOffice Team 2019-09-24 10:13:23 UTC
(In reply to MM from comment #3)
> Tested on windows 7 x64 with Version: 6.3.2.1 (x64)
> Build ID: db810050ff08fd4774137f693d5a01d22f324dfd
> CPU threads: 3; OS: Windows 6.1; UI render: default; VCL: win
> 
> There is nothing wrong with the hyperlinks. But instead, the underlining &
> font color of the hyperlinks are gone.

Analyzing the example files it seems that in Writer the underlining and font color comes from the character formatting of the hyperlinks. In Character - Hyperlink tab the Visited links and Unvisited links character styles are set, but the base character style of the hyperlinks is Definition.

This format is exported correctly to docx, but it does not have underlining and blue font color set. The Visited/Unvisited links level formatting is non-existent in Word, so those can not be exported.

Hyperlinks made in Writer have Internet Link character style and since that contains underlining and blue font setting, the docx files show those. 
Except that they do not change color on clicking on them in Word, that is bug #123628.
Comment 8 Timur 2019-10-03 11:26:30 UTC
Used to work. NOK from 6.0. I'll mark regression.
Comment 9 Xisco Faulí 2019-10-08 15:08:39 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=eaa9cf6a3069fba3d82c046f0041bfb537d9e648

author	Vasily Melenchuk <Vasily.Melenchuk@cib.de>	2017-08-18 22:14:08 +0300
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2017-11-10 02:01:57 +0100
commit eaa9cf6a3069fba3d82c046f0041bfb537d9e648 (patch)
tree 55806b023e2f7c380a877d0df6b0bd5bb53ad46e
parent 7f603dd111afcc30eec8bbec97efc16ad8b4c4d1 (diff)
tdf#43017: Support for DOCX hyperlinks character properties

Bisected with: bibisect-linux64-6.0

Adding Cc: to Vasily Melenchuk
Comment 10 Xisco Faulí 2019-10-08 15:10:58 UTC
Same commit that indroduced bug 127741 which already has a commit in gerrit < https://gerrit.libreoffice.org/#/c/80449/ > however the patch doesn't fix this one...


@Tünde Tóth, I thought you might be interested in this issue...
Comment 11 Commit Notification 2019-11-11 10:07: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/1d81d52b5da45f26e9d3adeb3b279eb9a488b94f

tdf#127579 DOCX export: fix losing color and underline of ODT hyperlinks

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 12 Dieter 2019-11-19 15:49:55 UTC
Verified with

Version: 6.4.0.0.beta1 (x64)
Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Tünde, thanks for fixing it!
Comment 13 Commit Notification 2019-11-21 20:38:21 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/122e2e0296d5060a2631867527817893f41384c4

Revert "tdf#127579 DOCX export: fix losing color of ... ODT hyperlinks"

It will be available in 6.5.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 14 Timur 2019-11-22 07:51:01 UTC
I reopen it after revert.
Comment 15 Commit Notification 2019-11-22 10:55:13 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/622896a19d9eac175d01d44a847cf331300ec070

Revert "tdf#127579 DOCX export: fix losing color of ... ODT hyperlinks"

It will be available in 6.4.0.1.

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 16 Timur 2019-11-22 14:15:51 UTC
*** Bug 128909 has been marked as a duplicate of this bug. ***
Comment 17 Commit Notification 2019-12-05 11:43:53 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#127579 DOCX export: fix losing color and underline of ODT hyperlinks

It will be available in 6.5.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 18 Xisco Faulí 2019-12-11 15:26:36 UTC
Issue verified in

Version: 6.5.0.0.alpha0+
Build ID: b9d6ea1dd7541c4bd866571f9e3f0aa894687c07
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Tünde Tóth, thanks for fixing this issue!!
Comment 19 Commit Notification 2019-12-11 15:28:40 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/4a76d2038a700ef97c0d0a261d2b83dafc37ca9c

tdf#127579 DOCX export: fix losing color and underline of ODT hyperlinks

It will be available in 6.4.0.1.

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 20 Commit Notification 2020-10-04 13:11:16 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

related: tdf#127579: make use of FindCharFormatByName more robust

It will be available in 7.1.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 21 Commit Notification 2020-10-06 07:43:27 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

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

related: tdf#127579: make use of FindCharFormatByName more robust

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