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 683801 - incorrect export of custom number format "" to ODF
incorrect export of custom number format "" to ODF
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export OOo / OASIS
git master
Other Linux
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-09-11 14:37 UTC by Andreas J. Guelzow
Modified: 2012-09-11 22:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas J. Guelzow 2012-09-11 14:37:41 UTC
The blank custom format is incorrectly saved to ODF as

<office:styles><number:number-style style:name="ND.0"><number:number number:decimal-places="2"/></number:number-style>
Comment 1 Andreas J. Guelzow 2012-09-11 14:52:25 UTC
This happens in go_format_output_to_odf.

We do not recognize the format family and so use:

	default: {
		/* We need to output something and we don't need any details for this */
		int date = 0, digit = 0;
		char const *str = go_format_as_XL (fmt);
		while (*str != '\0') {
			switch (*str) {
			case 'd': case 'm': case 'y': case 'h': case 's':
				date++;
				break;
			case '#': case '.': case '0': case 'e':
				digit++;
				break;
			default:
				break;
			}
			str++;
		}
		if (digit < date)
			go_format_output_date_to_odf (xout, act_fmt, name,
						      GO_FORMAT_DATE, with_extension);
		else
			go_format_output_general_to_odf (xout, name, cond_part);
		result = FALSE;
		break;

Which effectively outputs a default format string.
Comment 2 Andreas J. Guelzow 2012-09-11 22:26:31 UTC
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.