GNOME Bugzilla – Bug 610372
Floating point values in ODF
Last modified: 2010-02-18 22:13:50 UTC
I notice this: case VALUE_STRING: gsf_xml_out_add_float (state->xml, OFFICE "value", value_get_as_float (cell->value), -1); break; gsf_xml_out_add_float isn't the right function to use here. For one thing, it knows nothing about gnm_float. For another, it does not know about output convensions. Something built on top of value_get_as_gstring should be used. Also, the switch statement around here doesn't seem to handle VALUE_EMPTY.
Similarly odf_write_filter_cond should use value_get_as_gstring, not value_get_as_string.
What do output conventions have to do with this?
So we should be doing something like in xlsx? } else if (val->type != VALUE_BOOLEAN) { content = value_get_as_string (cell->value); gsf_xml_out_add_cstr (xml, NULL, content); g_free (content); } else
nah, we should fix xlsx too... Output conventions determine floating point format. Number of digits at present.
Created attachment 154172 [details] [review] proposed patch Proposed patch to fix this issue for the ODF exporter.
Created attachment 154173 [details] [review] proposed patch proposed patch to fix the xlsx case
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.