Bug 158626 - Cell background colour (from "Office" document theme) is changed on xlsx-ods-xlsx conversion
Summary: Cell background colour (from "Office" document theme) is changed on xlsx-ods-...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.2 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Document-Themes Calc-Cells
  Show dependency treegraph
 
Reported: 2023-12-10 11:50 UTC by nhatthinh.phan
Modified: 2024-09-28 15:38 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple test colour (9.19 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-12-10 11:51 UTC, nhatthinh.phan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nhatthinh.phan 2023-12-10 11:50:38 UTC
Description:
[FILESAVE]
We cannot keep the original colour after we convert from xlsx to ods, then ods to xlsx. The original colour of cell background will be changed to a new colour.

Steps to Reproduce:
1. Open Excel. Select a cell and set background colour of this cell.

2. Save file in xlsx format and close this file. E.g. "test color.xlsx". 

3. Open "test color.xlsx" by LibreOffice Calc, save this file to "test color - save to ods.ods" and close this file.

4. Open "test color - save to ods.ods", save this file to "test color - to ods - to xlsx again.xlsx" and close this file.

5. Open "test color - to ods - to xlsx again.xlsx" by LibreOffice Calc or Excel.

Actual Results:
We will see the original background colour has been changed.

Expected Results:
We want see the original background colour.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
None
Comment 1 nhatthinh.phan 2023-12-10 11:51:58 UTC
Created attachment 191345 [details]
Simple test colour
Comment 2 ady 2023-12-10 18:39:38 UTC
With LO 24.2 alpha, no repro.
With LO 7.6.3.2, repro.

I have not tested with LO 7.6.4 nor with a recent LO 7.6 dev version.

I would suggest to the reporter to update and re-test.


FWIW, JIC...

Testing with:

Version: 7.6.3.2 (X86_64) / LibreOffice Community
Build ID: 29d686fea9f6705b262d369fede658f824154cc0
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (es_AR); UI: en-US
Calc: CL threaded


Calc reads the background color in cell A1 in attachment 191345 [details] as

r:  91
g: 155
b: 213

hex: 5b9bd5

After saving it to ods, the values remain in the ods file.

After _exporting_ from the new ods file to a new xlsx, the values are:

r:  24
g: 163
b:   3

hex: 18a303

Again, I would suggest updating LO and re-testing.
Comment 3 Stéphane Guillou (stragu) 2023-12-30 00:21:34 UTC
Repro in:

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

No repro in:

Version: 7.5.9.2 (X86_64) / LibreOffice Community
Build ID: cdeefe45c17511d326101eed8008ac4092f278a9
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 24.2.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 5f390384195b7264c6e52add9e90a39790285249
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

The sample document uses the "Office" theme. Document theme support started in 7.6. 

Regression in 7.6, bibisected with linux-64-7.6 repo to first bad build commit [fb25f633a4a67a4e33ab61651f34b8e9f555a5bb] which points to core commit f47b0920f1add470a7c54845768e83dce2427eab which is a cherrypick of:

commit dceeb9550dfd4e40e93180b7e10f2539b594529f
author	Tomaž Vajngerl 	Tue Jul 18 13:23:29 2023 +0900
committer	Tomaž Vajngerl 	Tue Jul 18 15:11:11 2023 +0200
sc: ODF import/export of background cell complex color
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154571

In 24.2, it was fixed by b36f7769dd07a6b6f55cdf4ce76e2f39ed186e89 but this commit wasn't cherrypicked to 7.6.

Quikee, can you please have a look if this regression can be fixed in 7.6 too? I imagine b36f7769dd0 is too big as it is?
Comment 4 nhatthinh.phan 2024-02-13 23:14:51 UTC
Hi team,

> In 24.2, it was fixed by b36f7769dd07a6b6f55cdf4ce76e2f39ed186e89 but this commit wasn't cherrypicked to 7.6.

> Quikee, can you please have a look if this regression can be fixed in 7.6 too? I imagine b36f7769dd0 is too big as it is?

I would appriciate so much if you can cherry pick the pick to 7.6 version. Can you please help resolve the issue?

Thank you very much,
Thinh
Comment 5 Justin L 2024-09-28 15:38:49 UTC
The 7.6 branch is no longer getting updates from TDF. 24.2 is now considered the supported, stable version. So I guess the status is FIXED...