Bug 129924 - Writer: DOCX: font color is not white
Summary: Writer: DOCX: font color is not white
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.5.0 target:6.4.1
Keywords: filter:docx
Depends on:
Blocks: DOCX-Character
  Show dependency treegraph
 
Reported: 2020-01-10 12:54 UTC by Serge Krot (CIB)
Modified: 2021-05-28 08:54 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
white text with black background (4.07 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-01-10 12:55 UTC, Serge Krot (CIB)
Details
DOCX as written with 7.1 (4.95 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-05-24 08:59 UTC, Thorsten Behrens (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Krot (CIB) 2020-01-10 12:54:46 UTC
Reproduce:
1.    create new document
2.    write some text
3.    mark some text in black colour
4.    font colour changes to white to be readable
5.    save file as "office Open XML Text (.docx)"
6.    open file in LO Writer: text color is not white
Expected: text color to be white
Comment 1 Serge Krot (CIB) 2020-01-10 12:55:28 UTC
Created attachment 157063 [details]
white text with black background
Comment 2 Roman Kuznetsov 2020-01-11 13:27:16 UTC
confirm in

Версия: 6.5.0.0.alpha0+ (x64)
ID сборки: 08a0ede627fbf9bea42165c3de63812e469306b4
Потоков ЦП: 4; ОС:Windows 10.0 Build 17763; Отрисовка ИП: GL; VCL: win; 
Локаль: ru-RU (ru_RU); Язык интерфейса: ru-RU
Calc: threaded
Comment 3 Serge Krot (CIB) 2020-01-13 13:41:34 UTC
Discussion about the topic in the past:
https://www.mail-archive.com/libreoffice@lists.freedesktop.org/msg137336.html
Comment 4 Commit Notification 2020-01-15 22:49:52 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9476dfe7d1b86b367966e7dedf67e11936c8d9d7

tdf#129924 docx import: set background color

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 5 Xisco Faulí 2020-01-17 12:41:19 UTC
Hi Serge,
If I open the attached document in

Version: 6.5.0.0.alpha0+
Build ID: cc36c115004cb75037b0e4fdadff09035f765cd5
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

the text is still black. is it a FILEOPEN issue or a FILESAVE issue ?
Comment 6 Commit Notification 2020-01-17 12:47:45 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

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

tdf#129924 critical fix: use SvxColorItem instead of SvxBrushItem

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 7 Commit Notification 2020-01-17 13:03:59 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

tdf#129924 docx import: set background color

It will be available in 6.4.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 8 Commit Notification 2020-01-17 15:25:39 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

tdf#129924 critical fix: use SvxColorItem instead of SvxBrushItem

It will be available in 6.4.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 9 Buovjaga 2021-05-24 05:42:51 UTC
Commit 9476dfe7d1b86b367966e7dedf67e11936c8d9d7 did not make the text colour white and it is still not white upon opening the file. Reopening this.
Comment 10 Thorsten Behrens (allotropia) 2021-05-24 08:59:52 UTC
Created attachment 172285 [details]
DOCX as written with 7.1

Bugdoc was perhaps misleading; authoritative was the initial reproduction description. Bug appears fixed, I attach sample output from a 7.1.3
Comment 11 BogdanB 2021-05-28 06:11:58 UTC
It's fixed.

Verified in 
Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 033fdd5aab3c44af26c7b53393afd2a7a8a056cd
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded
Comment 12 Xisco Faulí 2021-05-28 08:54:20 UTC
(In reply to Thorsten Behrens (allotropia) from comment #10)
> Created attachment 172285 [details]
> DOCX as written with 7.1
> 
> Bugdoc was perhaps misleading; authoritative was the initial reproduction
> description. Bug appears fixed, I attach sample output from a 7.1.3

Hi Thorsten, Serge,
Could you please explain the steps you followed to create the document? I would like to create a unittest for this issue but I fail to see what it fixes.
If I try with the following steps:
1. Type 'Hello World'
2. Select all
3. Change highlight colour to black -> font colour changes to white
4. Save it to DOCX

The behaviour is the same with and without Serge's commits. In fact, this is something that got fixed by another commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=a4c5e940881520834c19573c5b1119afa1c17744 ( bug 125268 ) so please explain what was fixed here