Bug 155321 - FILEOPEN XLSX Colour scale changes colour on import
Summary: FILEOPEN XLSX Colour scale changes colour on import
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Tibor Nagy
URL:
Whiteboard: target:7.6.0 target:7.5.5
Keywords:
Depends on:
Blocks: XLSX-Conditional-Formatting
  Show dependency treegraph
 
Reported: 2023-05-15 12:21 UTC by NISZ LibreOffice Team
Modified: 2023-06-05 11:21 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file (8.00 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-05-15 12:21 UTC, NISZ LibreOffice Team
Details
Compaire the problem Writer and Excel (250.80 KB, image/png)
2023-05-15 12:23 UTC, NISZ LibreOffice Team
Details
More percentile values (4.84 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-05-26 14:21 UTC, László Németh
Details
Same colors in Google Sheets (31.07 KB, image/png)
2023-05-31 12:23 UTC, László Németh
Details
But not for the non-terminating repeating values (32.62 KB, image/png)
2023-05-31 12:25 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2023-05-15 12:21:09 UTC
Description:
In a document created in MS Excel, the colour scale changes after opening in writer.

Steps to Reproduce:
1. Open attached file in Calc.
2. Compare the file opened in Excel.

Actual Results:
The colour scale changed.

Expected Results:
The colour scale is not changed.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 6f1534940ac12ff8e46f4782e18cfb6cf585da39
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL threaded
Comment 1 NISZ LibreOffice Team 2023-05-15 12:21:46 UTC
Created attachment 187288 [details]
Sample file
Comment 2 NISZ LibreOffice Team 2023-05-15 12:23:13 UTC
Created attachment 187289 [details]
Compaire the problem Writer and Excel
Comment 3 Xisco Faulí 2023-05-22 13:35:25 UTC
Also reproduced in

Version: 7.3.0.0.alpha1+ / LibreOffice Community
Build ID: 229123ccc6f90ebf66b3e659bebbd53f8a9bdd3a
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 4 László Németh 2023-05-26 14:20:21 UTC
This is a difference in the visualization of the percentile values: LibreOffice chooses the lowest color, MSO the highest one from the possible values. See the second test file: middle cells are yellow in LibreOffice, and light green in MSO.
Comment 5 László Németh 2023-05-26 14:21:01 UTC
Created attachment 187527 [details]
More percentile values
Comment 6 László Németh 2023-05-26 14:59:41 UTC
(In reply to László Németh from comment #4)
> This is a difference in the visualization of the percentile values:
> LibreOffice chooses the lowest color, MSO the highest one from the possible
> values. See the second test file: middle cells are yellow in LibreOffice,
> and light green in MSO.

Also yellow in Google Docs.
Comment 7 László Németh 2023-05-31 10:16:36 UTC
(In reply to László Németh from comment #6)
> (In reply to László Németh from comment #4)
> > This is a difference in the visualization of the percentile values:
> > LibreOffice chooses the lowest color, MSO the highest one from the possible
> > values. See the second test file: middle cells are yellow in LibreOffice,
> > and light green in MSO.
> 
> Also yellow in Google Docs.

But not the original file. It seems, Google Sheets uses the end of the color scale in the case of the last repeating percentile value, so it's OK to do only that in Calc, as the proposed fix does in https://gerrit.libreoffice.org/c/core/+/152117 

@Tibor: many thanks for the fix!
Comment 8 László Németh 2023-05-31 12:23:15 UTC
Created attachment 187617 [details]
Same colors in Google Sheets
Comment 9 László Németh 2023-05-31 12:25:29 UTC
Created attachment 187618 [details]
But not for the non-terminating repeating values

Yellow are light green in MSO.
Comment 10 Commit Notification 2023-05-31 18:17:53 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6a059f8d1b0a7a5b64bd272e1e7b8291979bcd56

tdf#155321 sc: fix color of the highest value on percentile color scale

It will be available in 7.6.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 11 BogdanB 2023-06-01 17:27:50 UTC
Tibor, thanks for fixing this.

Green in 
Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: d7d2b172065f90aa2f61c0216f3722e868ae76a1
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Yellow in (tested for reference)
Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 12 Commit Notification 2023-06-05 11:21:24 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/808cc62e2f43e638598fc1f4869735138ccf8217

tdf#155321 sc: fix color of the highest value on percentile color scale

It will be available in 7.5.5.

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.