Bug 90511 - FILEOPEN: Data Bar imports wrong color
Summary: FILEOPEN: Data Bar imports wrong color
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.6.2 release
Hardware: Other All
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: target:5.0.0
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-08 01:29 UTC by Luke
Modified: 2019-04-16 17:17 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample XLSX showing issue with importing Data Bar (1.13 MB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2015-04-08 01:29 UTC, Luke
Details
90511_RetestFailed_Import In LO (291.61 KB, image/png)
2015-05-22 11:40 UTC, darshan.gandhi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2015-04-08 01:29:45 UTC
Created attachment 114686 [details]
Sample XLSX showing issue with importing Data Bar

Steps to reproduce:
1. Open WinterOlympics.xlsx in Excel
2. Open WinterOlympics.xlsx in Calc
3. Compare Row F5:F30

Note the color of the Data Bar is set to "Orange" in Excel but shows Green in Calc. In Calc, 
Format -> Manage Conditional Formatting -> F5:F30 -> Edit -> More shows the strange value of Red (negative) to White (positive). Editing these values has no effect.
Comment 1 Luke 2015-04-08 01:35:27 UTC
Added JP and bubli as you two have recently made some great progress on data bars support. Thanks!
Comment 2 raal 2015-04-08 09:19:01 UTC
I can confirm with LO 4.4.1.2, win7

Luke, what's your version of LO?
Comment 3 raal 2015-04-08 13:02:59 UTC
confirm in Version: 4.4.3.0.0+
Build ID: 3eba5eb1774ab621a1f0f4dcc7e82cce6c025b0a
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-4, Time: 2015-03-27_09:07:12

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e
Comment 4 Yousuf Philips (jay) (retired) 2015-04-08 14:56:10 UTC
The xlsx document was created in Excel 2013 and when i opened it in Excel 2010, it lists 5 data bar conditional formatting at F5:F30 and 1 data bar at F5:F29.

[1] F5:F30 - Orange Gradient Fill, No Border
[2] F5:F30 - Brown Gradient Fill, No Border
[4] F5:F30 - Orange Gradient Fill, No Border
[5] F5:F30 - Light Orange Gradient Fill, No Border
[5] F5:F30 - Blue Gradient Fill, With Border

[1] F5:F229 - Green Gradient Fill, With Border

Opening it in master only shows 1 data bar entry at F5:F30 with 5 conditions and 1 data bar at F5:F29.

[1] F5:F30 - White Gradient Fill
[2] F5:F30 - White Gradient Fill
[4] F5:F30 - White Gradient Fill
[5] F5:F30 - White Gradient Fill
[5] F5:F30 - Blue Gradient Fill

[1] F5:F229 - Blue Gradient Fill

Data bars only started appearing in 4.0.
Comment 5 A (Andy) 2015-04-09 18:54:27 UTC
Also for me reproducible with LO 4.4.1.2, Win 8.1.

Besides that issue, there also several further problems for which also a bug report could be opened.
Comment 6 Luke 2015-04-09 21:28:19 UTC
A (Andy),
I think I've reported them all,
Data Missing Err:509 is Bug 66377 - Feature request: Format As Table
Pie Chart label is Bug 90510 - Calc does not apply pie label settings

Added them to the See Also:
Comment 7 Markus Mohrhard 2015-04-15 15:23:08 UTC
Conditional formatting bugs are normally for me.

This one is a problem around theme color handling that I need to inspect.
Comment 8 Commit Notification 2015-04-15 16:48:30 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f3121049828596b369e3ea844355d61666e49795

use index as real index and not token, tdf#90511

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Yousuf Philips (jay) (retired) 2015-04-15 18:45:58 UTC
Look forward to verify this. Is it possible to backport this to 4.4?
Comment 10 Commit Notification 2015-04-16 02:06:26 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2a88873e96d5aa916146a74c20b34b2715418350

add test for tdf#90511

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Mike §chinagl 2015-05-21 15:53:52 UTC
This bug fix is mentioned in the release notes of the coming LibreOffice 5.0 (see release notes https://wiki.documentfoundation.org/ReleaseNotes/5.0). Therefore it would be wonderful if this feature really worked well, otherwise it should not be mentioned in the release notes. In the notes it reads:

Import of Data bars and Color Scales color values handles theme colors. tdf#90511 (Markus Mohrhard)
Comment 12 darshan.gandhi 2015-05-22 11:36:21 UTC
Verified today in LO Version: 5.0.0.0.beta1
Build ID: 0a16c3dda4150008d9be6f24cbd15ac198d116d3
Locale: en-US (en_US)

Its still reproducible.
Results are: Note the color of the Data Bar is set to "Orange" in Excel but shows Green in Calc. 

Please find attached screenshot.
Comment 13 darshan.gandhi 2015-05-22 11:40:59 UTC
Created attachment 115818 [details]
90511_RetestFailed_Import In LO
Comment 14 Markus Mohrhard 2015-05-22 11:51:07 UTC
(In reply to darshan.gandhi from comment #12)
> Verified today in LO Version: 5.0.0.0.beta1
> Build ID: 0a16c3dda4150008d9be6f24cbd15ac198d116d3
> Locale: en-US (en_US)
> 
> Its still reproducible.
> Results are: Note the color of the Data Bar is set to "Orange" in Excel but
> shows Green in Calc. 
> 
> Please find attached screenshot.

That is a totally different problem and has nothing to do with the imported color. The imported color has been fixed as part of this bug.

The difference that you see now in Calc vs Excel is a difference in selecting the conditional formatting when you have two overlapping conditional formats. There is no way to get this correct in all cases as Libreoffice and Excel use a different concept for how they represent conditional formats.
Comment 15 Markus Mohrhard 2015-05-22 11:51:54 UTC
Please don't reopen a bug that a developer marked as fix together with a commit unless you understand what you are doing.