GNOME Bugzilla – Bug 628721
strange series names behaviour
Last modified: 2010-09-04 16:50:56 UTC
open samples/chart-tests.gnumeric go to the lines page select the second plot inthe first column open the properties dialog Under PlotLine1 you should see 5 series wit names such as "solid" select any one of those series, the name changes to "0"! This surely should not happen.
Oops, this is quite recent. Might be related to #627514, but this field is scalar, not vectorial.
Raising the priority since this seems quite serious.
Seems the issue comes from Graphs: fix problems with date axes. Morten Welinder diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c index fa77e60..1789cf5 100644 --- a/src/wbc-gtk.c +++ b/src/wbc-gtk.c @@ -5362,13 +5362,19 @@ cb_graph_dim_entry_changed (GraphDimEditor *editor) static void set_entry_contents (GnmExprEntry *entry, GOData *val) { - SheetControlGUI *scg = gnm_expr_entry_get_scg (entry); - Sheet const *sheet = scg_sheet (scg); - char *txt; - - txt = go_data_serialize (val, (gpointer)sheet->convs); - gnm_expr_entry_load_from_text (entry, txt); - g_free (txt); + if (go_data_get_n_dimensions (val) == 0 && + go_data_get_n_values (val) == 1) { + double d = go_data_get_scalar_value (val); + GODateConventions const *date_conv = go_data_date_conv (val); + gog_data_editor_set_value_double (GOG_DATA_EDITOR (entry), + d, date_conv); + } else { + SheetControlGUI *scg = gnm_expr_entry_get_scg (entry); + Sheet const *sheet = scg_sheet (scg); + char *txt = go_data_serialize (val, (gpointer)sheet->convs); + gnm_expr_entry_load_from_text (entry, txt); + g_free (txt); + } } static void Scalar values are now converted to a double whatever is inside. This is a serious regression.
Reverting above patch makes things work again, but probably breaks what it was introduced for.
Can we test if a godata contains a number? Anyway, why is this function being called for an element in the tree? I thought editors were for things like axes limits only.
For the record, we need this because converting to strings using go_data_serialize loses the format. (And probably accuracy.)
There is no general way to test what a GOData contains AFAIK. Editors are used for all instances of GOData used in the graph tree.
Morten, I really don't see the necessity for this change, can you provide a sample?
Created attachment 169489 [details] Graph with date axis On the x-axis property page, change maximum to automatic and notice that the minimum date changes to 34567 or some such. go_data_serialize was never meant to human consumption.
OK, we can have either GOData from do-data-simple.c (something I find not a good idea in gnumeric) or GnmGOData. Formatting only makes sense for the second case.
Created attachment 169491 [details] [review] Proposed patch Seems this will fix the issue.
Comment on attachment 169491 [details] [review] Proposed patch Looks good.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.