[gnumeric] More xlsx version recognition
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] More xlsx version recognition
- Date: Thu, 16 Aug 2012 05:52:45 +0000 (UTC)
commit 024830caccd11711b6432fe03640f6b6915d1059
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Wed Aug 15 23:51:29 2012 -0600
More xlsx version recognition
2012-08-15 Andreas J. Guelzow <aguelzow pyrshep ca>
* xlsx-read.c (xlsx_webpub_begin): new
(xlsx_workbook_dtd): new
plugins/excel/ChangeLog | 5 +++++
plugins/excel/xlsx-read.c | 14 +++++++++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 81f1327..d0471a8 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-15 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * xlsx-read.c (xlsx_webpub_begin): new
+ (xlsx_workbook_dtd): new
+
2012-08-14 Andreas J. Guelzow <aguelzow pyrshep ca>
* xlsx-read.c (xlsx_border_begin_v2): new
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index 0274887..e661a5e 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -3388,6 +3388,18 @@ xlsx_wb_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
}
}
+static void
+xlsx_webpub_begin (GsfXMLIn *xin, xmlChar const **attrs)
+{
+ for (; attrs != NULL && attrs[0] && attrs[1] ; attrs += 2)
+ if (strcmp (attrs[0], "characterSet") == 0) {
+ XLSXReadState *state = (XLSXReadState *)xin->user_state;
+ state->version = ECMA_376_2008;
+ }
+}
+
+
+
static GsfXMLInNode const xlsx_workbook_dtd[] = {
GSF_XML_IN_NODE_FULL (START, START, -1, NULL, GSF_XML_NO_CONTENT, FALSE, TRUE, NULL, NULL, 0),
GSF_XML_IN_NODE_FULL (START, WORKBOOK, XL_NS_SS, "workbook", GSF_XML_NO_CONTENT, FALSE, TRUE, NULL, &xlsx_wb_end, 0),
@@ -3405,7 +3417,7 @@ GSF_XML_IN_NODE_FULL (START, WORKBOOK, XL_NS_SS, "workbook", GSF_XML_NO_CONTENT,
GSF_XML_IN_NODE (SHEETS, SHEET, XL_NS_SS, "sheet", GSF_XML_NO_CONTENT, &xlsx_sheet_begin, NULL),
GSF_XML_IN_NODE (WORKBOOK, FGROUPS, XL_NS_SS, "functionGroups", GSF_XML_NO_CONTENT, NULL, NULL),
GSF_XML_IN_NODE (FGROUPS, FGROUP, XL_NS_SS, "functionGroup", GSF_XML_NO_CONTENT, NULL, NULL),
- GSF_XML_IN_NODE (WORKBOOK, WEB_PUB, XL_NS_SS, "webPublishing", GSF_XML_NO_CONTENT, NULL, NULL),
+ GSF_XML_IN_NODE (WORKBOOK, WEB_PUB, XL_NS_SS, "webPublishing", GSF_XML_NO_CONTENT, xlsx_webpub_begin, NULL),
GSF_XML_IN_NODE (WORKBOOK, EXTERNS, XL_NS_SS, "externalReferences", GSF_XML_NO_CONTENT, NULL, NULL),
GSF_XML_IN_NODE (EXTERNS, EXTERN, XL_NS_SS, "externalReference", GSF_XML_NO_CONTENT, xlsx_wb_external_ref, NULL),
GSF_XML_IN_NODE (WORKBOOK, NAMES, XL_NS_SS, "definedNames", GSF_XML_NO_CONTENT, NULL, xlsx_wb_names_end),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]