After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 502968 - line graph looses color in excel export
line graph looses color in excel export
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export MS Excel (tm)
1.7.x
Other All
: Normal minor
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2007-12-11 02:51 UTC by Daniel Vianna
Modified: 2007-12-12 14:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes the issue. (447 bytes, patch)
2007-12-11 07:39 UTC, Jean Bréfort
none Details | Review
sample gnumeric file with straight line (27.14 KB, application/octet-stream)
2007-12-11 08:05 UTC, Daniel Vianna
  Details
a more comprehensive fix (11.53 KB, patch)
2007-12-11 08:23 UTC, Jean Bréfort
none Details | Review
takes into account all possible (and even impossible) patterns (8.18 KB, patch)
2007-12-12 12:14 UTC, Jean Bréfort
committed Details | Review

Description Daniel Vianna 2007-12-11 02:51:45 UTC
Please describe the problem:
After saving an xls export and reopening either in Excel or Gnumeric, the line graphs line style turns to empty (no line) and error bars disappear. Symbol colors  are preserved.

Steps to reproduce:
1. Create a line graph with error bars;
2. Save the spreadsheet as xls (MS Excel 97/2000/XP);
3. Restart Gnumeric and open the file.


Actual results:
The lines and error bars disappear.

Expected results:
The formatting should be preserved.

Does this happen every time?
Yes.

Other information:
Comment 1 Jean Bréfort 2007-12-11 06:50:58 UTC
Th lines do not disappear for me. But I confirm the error bar issue.
Comment 2 Jean Bréfort 2007-12-11 07:39:14 UTC
Created attachment 100742 [details] [review]
fixes the issue.

Excel did open correctly my test file. Anyway there was a confusion between dash_type and pattern in the line style. By the way, what the pattern field is for? It might probably be removed.
Comment 3 Daniel Vianna 2007-12-11 08:05:03 UTC
Created attachment 100745 [details]
sample gnumeric file with straight line

This is a more limited dataset from the original file where I found the issue
Comment 4 Daniel Vianna 2007-12-11 08:10:01 UTC
Here you can find a xls file created by saving the preceding attachment as xls:

http://www.bestsharing.com/files/KeTBJqy378501/graph%20issue.xls.html

This is what happened when I saved the previous gnumeric file as xls: The error bars vanished, and the lines changed from straight to dotted.

It seems the line pattern changes randomly (!).
Comment 5 Jean Bréfort 2007-12-11 08:20:06 UTC
The attached patch fixes that. We have two fields in line format for the same thing, and there was a confusion between the two when exporting to xls. Thanks for reporting.
Comment 6 Jean Bréfort 2007-12-11 08:23:02 UTC
Created attachment 100747 [details] [review]
a more comprehensive fix

This one completely drops the pattern field in line format (goffice itself never uses it). Please review.
Comment 7 Morten Welinder 2007-12-11 14:40:32 UTC
Looks good, although the lookups in dash_map perhaps should be guarded
against bogus values.
Comment 8 Jean Bréfort 2007-12-12 12:14:04 UTC
Created attachment 100825 [details] [review]
takes into account all possible (and even impossible) patterns

Needs review. Previous one was dangerous with patterns greater than 5, as Morten said.
Comment 9 Morten Welinder 2007-12-12 14:24:31 UTC
Looks good to me, visually, but please use >=G_N_ELEMENTS(dash_map) over
>5.

Apart from that, commit!
Comment 10 Jean Bréfort 2007-12-12 14:40:50 UTC
Fixed in svn. Thanks for reporting.