[gnumeric] xls: don't generate value formats when reading.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: don't generate value formats when reading.
- Date: Sun, 2 Mar 2014 03:15:25 +0000 (UTC)
commit 8ebbf014ce71cbf5c029047bf733c1dce8e2464e
Author: Morten Welinder <terra gnome org>
Date: Sat Mar 1 13:11:44 2014 -0500
xls: don't generate value formats when reading.
NEWS | 1 +
plugins/excel/ChangeLog | 6 ++++++
plugins/excel/ms-excel-read.c | 36 +++++++++++++++++++++---------------
3 files changed, 28 insertions(+), 15 deletions(-)
---
diff --git a/NEWS b/NEWS
index d258173..c17a806 100644
--- a/NEWS
+++ b/NEWS
@@ -47,6 +47,7 @@ Morten:
* Improve the xls macro-roundtrip situation. [#725220]
* Improve ssdiff for sheet attributes.
* Fix split pane problem. [#725375]
+ * Don't generate value format during xls read. [#725453]
--------------------------------------------------------------------------
Gnumeric 1.12.11
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 0763987..b1f8dd7 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-01 Morten Welinder <terra gnome org>
+
+ * ms-excel-read.c (excel_sheet_insert_val): Don't set value
+ format. We already the the full style for the cell in
+ excel_set_xf. Fixes #725453.
+
2014-02-28 Morten Welinder <terra gnome org>
* crypt-md4.c: Add missing include. (From Gentoo.)
diff --git a/plugins/excel/ms-excel-read.c b/plugins/excel/ms-excel-read.c
index e8a1c27..55e0f70 100644
--- a/plugins/excel/ms-excel-read.c
+++ b/plugins/excel/ms-excel-read.c
@@ -3083,19 +3083,12 @@ excel_sheet_data_table (ExcelReadSheet const *esheet,
}
static void
-excel_sheet_insert_val (ExcelReadSheet *esheet, BiffQuery *q,
- GnmValue *v)
+excel_sheet_insert_val (ExcelReadSheet *esheet, BiffQuery *q, GnmValue *v)
{
GnmCell *cell = excel_cell_fetch (q, esheet);
if (cell) {
- BiffXFData const *xf = excel_set_xf (esheet, q);
-
- if (xf != NULL && xf->is_simple_format &&
- VALUE_FMT (v) == NULL &&
- !VALUE_IS_EMPTY (v) && /* We cannot set formats for */
- !VALUE_IS_BOOLEAN (v)) /* singetons. */
- value_set_fmt (v, xf->style_format);
+ (void)excel_set_xf (esheet, q);
gnm_cell_set_value (cell, v);
} else
value_release (v);
@@ -6451,6 +6444,7 @@ excel_read_LABELSST (BiffQuery *q, ExcelReadSheet *esheet)
if (NULL != str) {
go_string_ref (str);
v = value_new_string_str (str);
+ d (2, g_printerr ("str=%s\n", str->str););
} else
v = value_new_string ("");
if (esheet->container.importer->sst[i].markup != NULL)
@@ -6504,17 +6498,29 @@ excel_read_sheet (BiffQuery *q, GnmXLImporter *importer,
case BIFF_DIMENSIONS_v2: excel_read_DIMENSIONS (q, esheet); break;
case BIFF_BLANK_v0:
- case BIFF_BLANK_v2: excel_set_xf (esheet, q); break;
+ case BIFF_BLANK_v2:
+ (void)excel_set_xf (esheet, q);
+ break;
- case BIFF_INTEGER: excel_read_INTEGER (q, esheet); break;
- case BIFF_NUMBER_v0: excel_read_NUMBER (q, esheet, 7); break;
- case BIFF_NUMBER_v2: excel_read_NUMBER (q, esheet, 6); break;
+ case BIFF_INTEGER:
+ excel_read_INTEGER (q, esheet);
+ break;
+ case BIFF_NUMBER_v0:
+ excel_read_NUMBER (q, esheet, 7);
+ break;
+ case BIFF_NUMBER_v2:
+ excel_read_NUMBER (q, esheet, 6);
+ break;
case BIFF_LABEL_v0:
- case BIFF_LABEL_v2: excel_read_LABEL (q, esheet, FALSE); break;
+ case BIFF_LABEL_v2:
+ excel_read_LABEL (q, esheet, FALSE);
+ break;
case BIFF_BOOLERR_v0:
- case BIFF_BOOLERR_v2: excel_read_BOOLERR (q, esheet); break;
+ case BIFF_BOOLERR_v2:
+ excel_read_BOOLERR (q, esheet);
+ break;
case BIFF_FORMULA_v0:
case BIFF_FORMULA_v2:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]