Bug 137367 - [FILEOPEN PPTX] direct hyperlink colors aren't supported
Summary: [FILEOPEN PPTX] direct hyperlink colors aren't supported
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Tibor Nagy (NISZ)
URL:
Whiteboard: target:7.2.0 target:7.1.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks: PPTX-Hyperlink
  Show dependency treegraph
 
Reported: 2020-10-09 10:17 UTC by Pablo
Modified: 2021-04-16 12:13 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
PPTX with hyperlinks (PowerPoint 2019) (31.92 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-10-09 10:18 UTC, Pablo
Details
PDF exported from PowerPoint 2019 (correct colors) (31.00 KB, application/pdf)
2020-10-09 10:19 UTC, Pablo
Details
PPTX with 4 hyperlinks in different colors (32.08 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-10-09 14:29 UTC, Pablo
Details
PPTX with 4 hyperlinks in different colors (32.07 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-10-09 14:33 UTC, Pablo
Details
PDF exported from PowerPoint 2019 with correct colors (34.80 KB, application/pdf)
2020-10-09 14:33 UTC, Pablo
Details
file-with-link (25.11 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-10-13 18:59 UTC, Xisco Faulí
Details
file-with-link exported from PowerPoint 2019 (16.78 KB, application/pdf)
2020-10-13 19:31 UTC, Pablo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo 2020-10-09 10:17:30 UTC
Description:
The attached PPTX has two hyperlinks. The first link uses the theme color and should be blue. The second link color was changed to red. Impress show both links as blue.

PowerPoint has a way to change hyperlink color throughout a presentation [1].
Beginning with PowerPoint 2016, is is also possible to change the color of an individual hyperlink by directly using the text color control [2]

[1] https://support.microsoft.com/en-us/office/change-the-color-of-hyperlink-text-throughout-a-presentation-77c55b2d-3b2e-4ec4-924c-3165972e1bfa
[2] https://support.microsoft.com/en-us/office/change-the-color-of-your-hyperlinks-988ed94c-82e9-4e2c-96a1-7ffd2c382ce8

The second link has additional element in the XML:
<a:solidFill>
  <a:srgbClr val="FF0000"/>
</a:solidFill>

The XML of the first hyperlink (default theme color):
<a:p>
  <a:pPr marL="0" indent="0">
    <a:buNone/>
  </a:pPr>
  <a:r>
    <a:rPr lang="en-US" dirty="0">
      <a:hlinkClick r:id="rId2"/>
    </a:rPr>
    <a:t>Link 1</a:t>
  </a:r>
  <a:endParaRPr lang="en-US" dirty="0"/>
</a:p>

The XML of the second hyperlink (individual red color):
<a:p>
  <a:pPr marL="0" indent="0">
    <a:buNone/>
  </a:pPr>
  <a:r>
    <a:rPr lang="en-US" dirty="0">
      <a:solidFill>
        <a:srgbClr val="FF0000"/>
      </a:solidFill>
      <a:hlinkClick r:id="rId2">
        <a:extLst>
          <a:ext uri="{A12FA001-AC4F-418D-AE19-62706E023703}">
            <ahyp:hlinkClr xmlns:ahyp="http://schemas.microsoft.com/office/drawing/2018/hyperlinkcolor" val="tx"/>
          </a:ext>
        </a:extLst>
      </a:hlinkClick>
    </a:rPr>
    <a:t>Link 2</a:t>
  </a:r>
  <a:endParaRPr lang="en-US" dirty="0">
    <a:solidFill>
      <a:srgbClr val="FF0000"/>
    </a:solidFill>
  </a:endParaRPr>
</a:p>

Steps to Reproduce:
1. Open the attached PPTX in Impress

Actual Results:
Both links are blue.

Expected Results:
The second link should be red.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+
Build ID: 75030b3a2d4336c494fbe799fb809a37ed7e582f
CPU threads: 1; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_IL); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2020-10-08_21:40:22
Calc: threaded
Comment 1 Pablo 2020-10-09 10:18:29 UTC
Created attachment 166232 [details]
PPTX with hyperlinks (PowerPoint 2019)
Comment 2 Pablo 2020-10-09 10:19:09 UTC
Created attachment 166233 [details]
PDF exported from PowerPoint 2019 (correct colors)
Comment 3 Pablo 2020-10-09 14:29:46 UTC
Created attachment 166240 [details]
PPTX with 4 hyperlinks in different colors
Comment 4 Pablo 2020-10-09 14:33:11 UTC
Created attachment 166241 [details]
PPTX with 4 hyperlinks in different colors
Comment 5 Pablo 2020-10-09 14:33:56 UTC
Created attachment 166242 [details]
PDF exported from PowerPoint 2019 with correct colors
Comment 6 Pablo 2020-10-09 14:37:41 UTC
colors.pdf has 4 hyperlinks:

1. Link 1 - default hyperlink color.
2. Link 2 - individual hyperlink color.
3. Link 3 - individual hyperlink color defined with <a:schemeClr/> instead of <a:srgbClr/>
<a:solidFill>
  <a:schemeClr val="bg1"/>
</a:solidFill>
4. Link 4 - individual hyperlink color set to the default theme text color (black) so it doesn't has the <a:solidFill> element.
Comment 7 Xisco Faulí 2020-10-12 12:20:32 UTC
Regression introduced by:

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

author	Matúš Kukan <matus.kukan@collabora.com>	2014-07-18 09:23:17 +0200
committer	Matúš Kukan <matus.kukan@collabora.com>	2014-07-18 09:52:40 +0200
commit	92f74f6ccb5a55807724db85815f7ea0c49370e0 (patch)
tree	965fcdc621dc5e39e549fc6943fe55194bb68b32
parent	09c95aba4a5208a23eaeca9f4408ff5d87c898b9 (diff)
bnc#887230: always use theme color for hyperlinks in Impress

Bisected with: bibisect-44max
Comment 8 Xisco Faulí 2020-10-13 18:59:00 UTC
Created attachment 166353 [details]
file-with-link
Comment 9 Xisco Faulí 2020-10-13 19:00:20 UTC
Hello Pablo, NISZ Team,
I'm curious to see how attachment 166353 [details] looks in Powerpoint 2016 or greater? Would you mind taking a screenshot for me ?
Comment 10 Pablo 2020-10-13 19:31:26 UTC
Created attachment 166355 [details]
file-with-link exported from PowerPoint 2019
Comment 11 Xisco Faulí 2020-10-13 19:35:51 UTC
Thanks
Comment 12 NISZ LibreOffice Team 2021-01-22 13:15:12 UTC
bug #134401 also shows some Impress-made colored hyperlinks in ODP. 
Those become default blue on saving to PPTX.
Comment 13 Commit Notification 2021-03-29 14:56:57 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137367 PPTX import: fix lost direct hyperlink colors

It will be available in 7.2.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 László Németh 2021-03-29 14:58:15 UTC
Note: PowerPoint 2016 hasn't supported these direct hyperlink colors, yet.
Comment 15 Xisco Faulí 2021-03-30 13:45:38 UTC
Verified in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 7da7f6ca37c92ab33e34a76fd25efab526b7c80a
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Tibor Nagy, thanks for fixing this issue!!
Comment 16 Commit Notification 2021-03-30 13:46:22 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#137367 PPTX import: fix lost direct hyperlink colors

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