[gnumeric] Fix import of sxc files. [#703249]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix import of sxc files. [#703249]
- Date: Fri, 28 Jun 2013 18:28:17 +0000 (UTC)
commit 60785ba8ca733bb789c0a256fd0a573690603400
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Fri Jun 28 12:27:42 2013 -0600
Fix import of sxc files. [#703249]
2013-06-28 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (odf_text_content_end): check for null
stack
(ooo1_content_dtd): also connect oo_cell_content_start
(openoffice_file_open): initialize text_p_stack
NEWS | 1 +
plugins/openoffice/ChangeLog | 7 +++++++
plugins/openoffice/openoffice-read.c | 8 ++++++--
3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index c7c9f5f..0ecb7a5 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Andreas:
* Fix documentation of r.q* and r.*nbinom. [#703164]
* Add Excel 2010's BETA.DIST.
* Fix crash on corrupted files. [#703149] [#703215]
+ * Fix import of sxc files. [#703249]
Jean:
* Don't attempt to add a path item when there is no path objecte. [#703052]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 755482c..088b3bc 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,10 @@
+2013-06-28 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * openoffice-read.c (odf_text_content_end): check for null
+ stack
+ (ooo1_content_dtd): also connect oo_cell_content_start
+ (openoffice_file_open): initialize text_p_stack
+
2013-06-25 Morten Welinder <terra gnome org>
* Release 1.12.3
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 66842ea..b4fda93 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -1640,7 +1640,10 @@ static void
odf_text_content_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
{
OOParseState *state = (OOParseState *)xin->user_state;
- oo_text_p_t *ptr = state->text_p_stack->data;
+ oo_text_p_t *ptr;
+
+ g_return_if_fail ( state->text_p_stack != NULL);
+ ptr = state->text_p_stack->data;
g_return_if_fail (ptr != NULL);
g_return_if_fail (xin->content != NULL);
@@ -10701,7 +10704,7 @@ GSF_XML_IN_NODE (START, OFFICE, OO_NS_OFFICE, "document-content", GSF_XML_NO_CON
GSF_XML_IN_NODE (TABLE, TABLE_ROW, OO_NS_TABLE, "table-row", GSF_XML_NO_CONTENT, &oo_row_start,
&oo_row_end),
GSF_XML_IN_NODE (TABLE_ROW, TABLE_CELL, OO_NS_TABLE, "table-cell", GSF_XML_NO_CONTENT,
&oo_cell_start, &oo_cell_end),
GSF_XML_IN_NODE (TABLE_CELL, CELL_CONTROL, OO_NS_DRAW, "control", GSF_XML_NO_CONTENT, NULL, NULL),
- GSF_XML_IN_NODE (TABLE_CELL, CELL_TEXT, OO_NS_TEXT, "p", GSF_XML_CONTENT, NULL,
&oo_cell_content_end),
+ GSF_XML_IN_NODE (TABLE_CELL, CELL_TEXT, OO_NS_TEXT, "p", GSF_XML_CONTENT, &oo_cell_content_start,
&oo_cell_content_end),
GSF_XML_IN_NODE (CELL_TEXT, CELL_TEXT_S, OO_NS_TEXT, "s", GSF_XML_NO_CONTENT, NULL, NULL),
GSF_XML_IN_NODE (CELL_TEXT, CELL_TEXT_SPAN, OO_NS_TEXT, "span", GSF_XML_SHARED_CONTENT, NULL,
NULL),
GSF_XML_IN_NODE (TABLE_CELL, CELL_OBJECT, OO_NS_DRAW, "object", GSF_XML_NO_CONTENT, NULL, NULL),
/* ignore for now */
@@ -12028,6 +12031,7 @@ openoffice_file_open (G_GNUC_UNUSED GOFileOpener const *fo, GOIOContext *io_cont
state.cur_control = NULL;
state.chart_list = NULL;
+ state.text_p_stack = NULL;
state.text_p_for_cell.permanent = TRUE;
state.text_p_for_cell.span_style_stack = NULL;
state.text_p_for_cell.gstr = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]