Bug 123628 - FILESAVE DOCX Hyperlink in docx saved in LO as docx and opened in MSO doesn’t change colors
Summary: FILESAVE DOCX Hyperlink in docx saved in LO as docx and opened in MSO doesn’t...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: low minor
Assignee: Tünde Tóth
URL:
Whiteboard: target:6.4.0
Keywords: filter:docx
Depends on:
Blocks: Hyperlink DOCX-Hyperlink
  Show dependency treegraph
 
Reported: 2019-02-21 14:46 UTC by NISZ LibreOffice Team
Modified: 2020-05-06 15:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Saved from the original file in LO. (16.73 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-02-21 14:47 UTC, NISZ LibreOffice Team
Details
Original file in Word. (17.40 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-02-21 14:47 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer. (199.02 KB, image/png)
2019-02-21 14:47 UTC, NISZ LibreOffice Team
Details
Screenshot of example files in Word and Writer (91.34 KB, image/png)
2019-09-24 07:35 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-02-21 14:46:33 UTC
Description:
Hyperlink in docx created in MSO and saved again in LO as docx and opened in MSO doesn’t work as usual in MSO because when it gets clicked it doesn’t change its colors to bright red.

Steps to Reproduce:
    1. Create a docx in MSO.
    2. Insert→ Hyperlink→ Adress: https://libreoffice.org→ Ok.
    3. Save and exit the file.
    4. Open the file in LO and save it as docx.
    5. Close the file.
    6. Open the file in MSO.
    7. Try activating the Hyperlink.

Actual Results:
The Hyperlink stays as its basic dark blue color.

Expected Results:
The Hyperlink changes to its already visited bright red color.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2019-02-21 14:47:11 UTC
Created attachment 149483 [details]
Saved from the original file in LO.
Comment 2 NISZ LibreOffice Team 2019-02-21 14:47:41 UTC
Created attachment 149484 [details]
Original file in Word.
Comment 3 NISZ LibreOffice Team 2019-02-21 14:47:56 UTC
Created attachment 149485 [details]
Screenshot of the original document side by side in Word and Writer.
Comment 4 Durgapriyanka 2019-02-22 19:09:13 UTC
Thank you for reporting the bug. I can confirm the bug present in

Version: 6.3.0.0.alpha0+
Build ID: b6b28931435e44aca92b8c0e1659f701e3ed1a87
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-01-30_06:57:04
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 5 Buovjaga 2019-03-20 13:36:06 UTC
Repro with LibO 3.3.0 and MSO 2013.
Comment 6 NISZ LibreOffice Team 2019-09-24 07:35:26 UTC
Created attachment 154407 [details]
Screenshot of example files in Word and Writer

This is happening because Word uses the character style "Hyperlink" to format hyperlinks, and it recolors them on clicking.
Writer on the other hand uses the character style "Internet Link" to format hyperlinks and Word is not prepared to handle that the same way as Hyperlink.

Manually changing this "Internet Link" character style in Word to "Hyperlink" made the example link colored as visited. 
So we should probably just export this character style with a different name.
Comment 7 Commit Notification 2019-10-01 13:10:47 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0ddd856af3a9383dc2c6a9a95fd5dc4bfdfeaf7d

tdf#123628 DOCX export: fix color change of unvisited 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 8 Timur 2019-10-03 11:08:55 UTC
After the fix, when LO-saved DOCX is opened in MSO, link color changes on click. I'll set Verified. 

Observations: 
- link color change is not saved in MSO, 
- link color is not changed in LO.
Comment 9 László Németh 2019-10-04 12:08:53 UTC
(In reply to Timur from comment #8)
> After the fix, when LO-saved DOCX is opened in MSO, link color changes on
> click. I'll set Verified. 
> 
> Observations: 
> - link color change is not saved in MSO, 
> - link color is not changed in LO.

@Timur: thanks for your review and feedback.

It seems, the real problem is still the bad import of the plain hyperlinks. Importing hyperlinks from an ODT file doesn't change the "Default" character style of the hyperlink. Maybe this related to the hardwired "Internet_20_link".

I suggest to transform the next bug 127925 into the real issue (and we can revert this fix later, if needed).