gnumeric r16687 - branches/gnumeric-1-8/plugins/excel
- From: jbrefort svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16687 - branches/gnumeric-1-8/plugins/excel
- Date: Mon, 30 Jun 2008 13:31:11 +0000 (UTC)
Author: jbrefort
Date: Mon Jun 30 13:31:11 2008
New Revision: 16687
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16687&view=rev
Log:
2008-02-29 Jean Brefort <jean brefort normalesup org>
* ms-chart.c (chart_write_AI): Do not export non-existing values
(fixes some criticals, see #519888).
Modified:
branches/gnumeric-1-8/plugins/excel/ChangeLog
branches/gnumeric-1-8/plugins/excel/ms-chart.c
Modified: branches/gnumeric-1-8/plugins/excel/ms-chart.c
==============================================================================
--- branches/gnumeric-1-8/plugins/excel/ms-chart.c (original)
+++ branches/gnumeric-1-8/plugins/excel/ms-chart.c Mon Jun 30 13:31:11 2008
@@ -4117,30 +4117,32 @@
GSF_LE_SET_GUINT16 (buf+6, 0); /* placeholder length */
ms_biff_put_var_write (s->bp, buf, 8);
- if (ref_type == 2) {
- len = excel_write_formula (s->ewb, texpr,
- gnm_go_data_get_sheet (dim),
- 0, 0, EXCEL_CALLED_FROM_NAME);
- ms_biff_put_var_seekto (s->bp, 6);
- GSF_LE_SET_GUINT16 (lendat, len);
- ms_biff_put_var_write (s->bp, lendat, 2);
- } else if (ref_type == 1 && value) {
- if (n) {
- XLValue *xlval = g_new0 (XLValue, 1);
- xlval->series = s->cur_series;
- xlval->value = value;
- g_ptr_array_add (s->values[n - 1], xlval);
- } else {
- guint dat[2];
- char *str = (NULL != value && VALUE_IS_STRING (value))
- ? value_get_as_string (value) : go_data_as_str (dim);
+ if (value) {
+ if (ref_type == 2) {
+ len = excel_write_formula (s->ewb, texpr,
+ gnm_go_data_get_sheet (dim),
+ 0, 0, EXCEL_CALLED_FROM_NAME);
+ ms_biff_put_var_seekto (s->bp, 6);
+ GSF_LE_SET_GUINT16 (lendat, len);
+ ms_biff_put_var_write (s->bp, lendat, 2);
+ } else if (ref_type == 1 && value) {
+ if (n) {
+ XLValue *xlval = g_new0 (XLValue, 1);
+ xlval->series = s->cur_series;
+ xlval->value = value;
+ g_ptr_array_add (s->values[n - 1], xlval);
+ } else {
+ guint dat[2];
+ char *str = (NULL != value && VALUE_IS_STRING (value))
+ ? value_get_as_string (value) : go_data_as_str (dim);
- ms_biff_put_commit (s->bp);
- ms_biff_put_var_next (s->bp, BIFF_CHART_seriestext);
- GSF_LE_SET_GUINT16 (dat, 0);
- ms_biff_put_var_write (s->bp, (guint8*) dat, 2);
- excel_write_string (s->bp, STR_ONE_BYTE_LENGTH, str);
- g_free (str);
+ ms_biff_put_commit (s->bp);
+ ms_biff_put_var_next (s->bp, BIFF_CHART_seriestext);
+ GSF_LE_SET_GUINT16 (dat, 0);
+ ms_biff_put_var_write (s->bp, (guint8*) dat, 2);
+ excel_write_string (s->bp, STR_ONE_BYTE_LENGTH, str);
+ g_free (str);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]