[gnumeric] more ECMA v1 vs v2 differences
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] more ECMA v1 vs v2 differences
- Date: Fri, 17 Aug 2012 04:09:19 +0000 (UTC)
commit 184a1245f41ed9cb49d941d1671930087b98501e
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Thu Aug 16 22:07:48 2012 -0600
more ECMA v1 vs v2 differences
2012-08-16 Andreas J. Guelzow <aguelzow pyrshep ca>
* xlsx-read-pivot.c (xlsx_CT_pivotCacheDefinition): also look for
refreshedDateIso
plugins/excel/ChangeLog | 5 +++++
plugins/excel/xlsx-read-pivot.c | 20 +++++++++++++++-----
2 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 8e6f22d..8605b54 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,10 @@
2012-08-16 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * xlsx-read-pivot.c (xlsx_CT_pivotCacheDefinition): also look for
+ refreshedDateIso
+
+2012-08-16 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* plugin.xml.in: refer to ISO/IEC 29500:2008 and emphasize the
Standards compliance
diff --git a/plugins/excel/xlsx-read-pivot.c b/plugins/excel/xlsx-read-pivot.c
index 9abef67..1a60476 100644
--- a/plugins/excel/xlsx-read-pivot.c
+++ b/plugins/excel/xlsx-read-pivot.c
@@ -852,6 +852,7 @@ xlsx_CT_pivotCacheDefinition (GsfXMLIn *xin, xmlChar const **attrs)
XLSXReadState *state = (XLSXReadState *)xin->user_state;
char const *refreshedBy = NULL;
GOVal *refreshedDate = NULL;
+ GOVal *date = NULL;
unsigned int createdVersion = 0;
unsigned int refreshedVersion = 0;
gboolean upgradeOnRefresh = FALSE;
@@ -862,11 +863,20 @@ xlsx_CT_pivotCacheDefinition (GsfXMLIn *xin, xmlChar const **attrs)
if (gsf_xml_in_namecmp (xin, attrs[0], XL_NS_DOC_REL, "id"))
state->pivot.cache_record_part_id = g_strdup (attrs[1]);
else if (0 == strcmp (attrs[0], "refreshedBy")) refreshedBy = attrs[1];
- else if (attr_float (xin, attrs, "refreshedDate", &v)) {
- /* idiots : why not use an actual date ?
- * Assume that this is in the same date convention as the workbook */
- refreshedDate = value_new_float (v);
- value_set_fmt (refreshedDate, state->date_fmt);
+ else if (attr_float (xin, attrs, "refreshedDate", &v)) {
+ /* idiots : why not use an actual date ?
+ * Assume that this is in the same date convention as the workbook */
+ if (refreshedDate == NULL) {
+ refreshedDate = value_new_float (v);
+ value_set_fmt (refreshedDate, state->date_fmt);
+ } else
+ xlsx_warning (xin, _("Encountered both the \"refreshedDate\" and "
+ "the \"refreshedDateIso\" attributes!"));
+ } else if ((date = attr_datetime (xin, attrs, "refreshedDateIso")) != NULL) {
+ if (refreshedDate)
+ go_val_free (refreshedDate);
+ refreshedDate = date;
+ state->version = ECMA_376_2008;
} else if (attr_int (xin, attrs, "createdVersion", &createdVersion)) ;
else if (attr_int (xin, attrs, "refreshedVersion", &refreshedVersion)) ;
else if (attr_bool (xin, attrs, "upgradeOnRefresh", &upgradeOnRefresh)) ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]