[gnumeric] Import inline text from xlsx files. [#668936]



commit d2e7aa8a7cfaa7b208d2d66814534b7cdb6eb0ff
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Sun Jan 29 15:52:14 2012 -0700

    Import inline text from xlsx files. [#668936]
    
    2012-01-29 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* xlsx-read.c (xlsx_cell_inline_text_end): new
    	(xlsx_sheet_dtd): connect the above

 NEWS                      |    1 +
 plugins/excel/ChangeLog   |    5 +++++
 plugins/excel/xlsx-read.c |   10 ++++++++++
 3 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index ae90a61..9028cf8 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Andreas:
 	* Implement ctrl-click cell deselection. [#610696]
 	* Fix LaTeX export of cyrillic. [#666340]
 	* Fix function tool tip. [#668685]
+	* Import inline text from xlsx files. [#668936]
 
 Jean:
 	* Fix formula interpretation in plot series (with Morten's help). [#662237]
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 8878f1c..be785c7 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-29 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* xlsx-read.c (xlsx_cell_inline_text_end): new
+	(xlsx_sheet_dtd): connect the above
+
 2011-12-27  Jean Brefort  <jean brefort normalesup org>
 
 	* xlsx-read-drawing.c (xlsx_chart_text_start),
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index 728a8d6..8d8c86b 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -1174,6 +1174,14 @@ xlsx_get_dxf (GsfXMLIn *xin, int dxf)
 /****************************************************************************/
 
 static void
+xlsx_cell_inline_text_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
+{
+	XLSXReadState	*state = (XLSXReadState *)xin->user_state;
+
+	state->val = value_new_string (xin->content->str);
+}
+
+static void
 xlsx_cell_val_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
 {
 	XLSXReadState	*state = (XLSXReadState *)xin->user_state;
@@ -2654,6 +2662,8 @@ GSF_XML_IN_NODE_FULL (START, SHEET, XL_NS_SS, "worksheet", GSF_XML_NO_CONTENT, F
       GSF_XML_IN_NODE (ROW, CELL, XL_NS_SS, "c", GSF_XML_NO_CONTENT, &xlsx_cell_begin, &xlsx_cell_end),
 	GSF_XML_IN_NODE (CELL, VALUE, XL_NS_SS, "v", GSF_XML_CONTENT, NULL, &xlsx_cell_val_end),
 	GSF_XML_IN_NODE (CELL, FMLA, XL_NS_SS,  "f", GSF_XML_CONTENT, &xlsx_cell_expr_begin, &xlsx_cell_expr_end),
+        GSF_XML_IN_NODE (CELL, TEXTINLINE, XL_NS_SS,  "is", GSF_XML_NO_CONTENT, NULL, NULL),
+	  GSF_XML_IN_NODE (TEXTINLINE, TEXTRUN, XL_NS_SS,  "t", GSF_XML_CONTENT, NULL, &xlsx_cell_inline_text_end),
 
   GSF_XML_IN_NODE (SHEET, CALC_PR, XL_NS_SS, "sheetCalcPr", GSF_XML_NO_CONTENT, NULL, NULL),
   GSF_XML_IN_NODE (SHEET, CT_SortState, XL_NS_SS, "sortState", GSF_XML_NO_CONTENT, NULL, NULL),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]