Bug 165085 - Automatic font color does not change to white on dark backgrounds in printed or directly exported to PDF documents.
Summary: Automatic font color does not change to white on dark backgrounds in printed ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.0.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Heiko Tietze
URL:
Whiteboard: target:25.8.0 target:25.2.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2025-02-06 18:48 UTC by Romualdas Mincevičius
Modified: 2025-03-28 10:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple Calc file to repreoduce the bug (9.19 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-02-07 00:09 UTC, Romualdas Mincevičius
Details
PDF exported from AAA.ods (13.37 KB, application/pdf)
2025-02-07 00:09 UTC, Romualdas Mincevičius
Details
Exported PDF (7.91 KB, application/pdf)
2025-02-07 01:40 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Romualdas Mincevičius 2025-02-06 18:48:38 UTC
Description:
When cell font color set to Automatic and Background Color is set to dark color, printed or directly exported to PDF document has black text on dark background.

Steps to Reproduce:
1. Set Font Color to Automatic
2. Write some text to cell
3. Set that cell color to any dark (Black, for example)
4. Press on Export Directly as PDF in Toolbar or choose Export as PDF in File menu (alternatively press Print, choose printer 'Microsoft Print to PDF' and print the document to file)
5. Set file name and press Save.
6. Open saved file in PDF viewer.

Actual Results:
Black cell.

Expected Results:
White text on black cell.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Print Preview shows text color correctly.
Comment 1 m_a_riosv 2025-02-06 23:28:35 UTC
Please attach a sample file, reduce the size as much as possible without private information, and paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Comment 2 Romualdas Mincevičius 2025-02-07 00:09:17 UTC
Created attachment 199024 [details]
Simple Calc file to repreoduce the bug
Comment 3 Romualdas Mincevičius 2025-02-07 00:09:57 UTC
Created attachment 199025 [details]
PDF exported from AAA.ods
Comment 4 Romualdas Mincevičius 2025-02-07 00:12:06 UTC
(In reply to m_a_riosv from comment #1)
> Please attach a sample file, reduce the size as much as possible without
> private information, and paste the information in Menu/Help/About
> LibreOffice, there is a copy icon.

Version: 25.2.0.3 (X86_64) / LibreOffice Community
Build ID: e1cf4a87eb02d755bce1a01209907ea5ddc8f069
CPU threads: 2; OS: Windows 10 X86_64 (10.0 build 19044); UI render: Skia/Raster; VCL: win
Locale: lt-LT (lt_LT); UI: en-US
Calc: threaded

Attached two sample files:
1. AAA.ods - simple Calc file to reproduce the bug
2. AAA.pdf - exported from AAA.ods
Comment 5 m_a_riosv 2025-02-07 01:40:38 UTC
Created attachment 199028 [details]
Exported PDF

With sample file works fine for me.

Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 6 m_a_riosv 2025-02-07 01:40:55 UTC
Please test in safe mode, Menu/Help/Restart in Safe Mode
Comment 7 Romualdas Mincevičius 2025-02-07 01:52:08 UTC
(In reply to m_a_riosv from comment #5)
> Created attachment 199028 [details]
> Exported PDF
> 
> With sample file works fine for me.
> 
> Version: 24.8.4.2 (X86_64) / LibreOffice Community
> Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
> CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render:
> Skia/Raster; VCL: win
> Locale: es-ES (es_ES); UI: en-US
> Calc: CL threaded

You are using version 24.8.4
I have specified version 25.2.0 in bug description because it is relevant to that new version. It is a regression.
Comment 8 m_a_riosv 2025-02-07 02:12:36 UTC
Right, reproducible with
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d723103ff8404ddadb3314dd3b67439602799d6c
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: default; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: threaded
Comment 9 BogdanB 2025-02-07 05:50:01 UTC
Confirmed bases on comment 8.
Comment 10 BogdanB 2025-02-07 06:04:42 UTC
Similar to this one?
https://bugs.documentfoundation.org/show_bug.cgi?id=165080
Comment 11 Saburo 2025-02-07 08:08:01 UTC
bibisected
source 8534ad7b7b9aae2520d731cf748ff0aadfe2f0ed
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Mon Jul 22 04:20:03 2024 -0700
Comment 12 Romualdas Mincevičius 2025-02-07 09:42:45 UTC
(In reply to BogdanB from comment #10)
> Similar to this one?
> https://bugs.documentfoundation.org/show_bug.cgi?id=165080

I don't think those two bugs are similar, although they may be related. The bug 165080 is manifested on screen, whereas this bug is noticeable when directly exported to PDF or printed out.
Comment 13 BogdanB 2025-02-07 15:43:55 UTC
commit 8534ad7b7b9aae2520d731cf748ff0aadfe2f0ed	[log]
author	Heiko Tietze <tietze.heiko@gmail.com>	Thu Jul 04 14:31:09 2024 +0200
committer	Heiko Tietze <heiko.tietze@documentfoundation.org>	Mon Jul 22 13:01:43 2024 +0200
tree 2210d9246bde102a4ff911793aa69bc64b2f8bfd
parent ba9f87966feb61ba093f080d41e19b408a8355ff [diff]
Resolves tdf#159541 - Fix font color must not change depending on background

Change-Id: I954c9e3f8502a5243c664ed0bf066fb4c4cb4ccc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169991
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Comment 14 Heiko Tietze 2025-02-10 09:02:48 UTC
https://gerrit.libreoffice.org/c/core/+/181327
Comment 15 Commit Notification 2025-03-10 08:07:38 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/684658df943b9cb8e25e9727af1147d22e396078

Resolves tdf#165085 - Automatic font color on PDF document

It will be available in 25.8.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 16 Commit Notification 2025-03-20 09:29:25 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/9c9cf0ed8045e4fb638b2c7d7db954dc4f601c01

Resolves tdf#165085 - Automatic font color on PDF document

It will be available in 25.2.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.
Comment 17 Commit Notification 2025-03-21 13:46:24 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "libreoffice-25-2-2":

https://git.libreoffice.org/core/commit/1192b06586bc3c3d4ad0b49d9553616560f215b2

Resolves tdf#165085 - Automatic font color on PDF document

It will be available in 25.2.2.

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.