[gnumeric] show warning/error message when a caption is encountered.



commit cead17c9f23e1149d9ff0e60eb72baf0af53297f
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Thu Aug 2 17:27:13 2012 -0600

    show warning/error message when a caption is encountered.
    
    2012-08-02  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-read.c (odf_caption): new, copy of odf_rect + error
    	message
    	(odf_custom_shape): change error message
    	(opendoc_content_dtd): connect odf_caption

 plugins/openoffice/ChangeLog         |    7 +++++++
 plugins/openoffice/openoffice-read.c |   17 ++++++++++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 64f24a4..4ae8abd 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,12 @@
 2012-08-02  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* openoffice-read.c (odf_caption): new, copy of odf_rect + error
+	message
+	(odf_custom_shape): change error message
+	(opendoc_content_dtd): connect odf_caption
+
+2012-08-02  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* openoffice-read.c (opendoc_content_dtd): add draw:caption
 	and fix draw:custom-shape text handling
 
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 36c62a4..0e1ed3f 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -9034,6 +9034,17 @@ odf_so_filled (GsfXMLIn *xin, xmlChar const **attrs, gboolean is_oval)
 }
 
 static void
+odf_caption (GsfXMLIn *xin, xmlChar const **attrs)
+{
+	OOParseState *state = (OOParseState *)xin->user_state;
+
+	oo_warning (xin, _("An unsupported caption was encountered and "
+			   "converted to a text rectangle."));
+	odf_so_filled (xin, attrs, FALSE);
+	odf_push_text_p (state, FALSE);
+}
+
+static void
 odf_rect (GsfXMLIn *xin, xmlChar const **attrs)
 {
 	OOParseState *state = (OOParseState *)xin->user_state;
@@ -9056,8 +9067,8 @@ odf_custom_shape (GsfXMLIn *xin, xmlChar const **attrs)
 {
 	OOParseState *state = (OOParseState *)xin->user_state;
 		
-	oo_warning (xin , _("Encountered an unsupported custom shape, "
-			    "creating an ellipse instead."));
+	oo_warning (xin , _("An unsupported custom shape was encountered and "
+			    "converted to an ellipse."));
 
 	odf_so_filled (xin, attrs, TRUE);
 	odf_push_text_p (state, FALSE);
@@ -10281,7 +10292,7 @@ static GsfXMLInNode const opendoc_content_dtd [] =
 	      GSF_XML_IN_NODE (TABLE, TABLE_SOURCE, OO_NS_TABLE, "table-source", GSF_XML_NO_CONTENT, NULL, NULL),
 	      GSF_XML_IN_NODE (TABLE, TABLE_SHAPES, OO_NS_TABLE, "shapes", GSF_XML_NO_CONTENT, NULL, NULL),
 		  GSF_XML_IN_NODE (TABLE_SHAPES, DRAW_FRAME, OO_NS_DRAW, "frame", GSF_XML_NO_CONTENT, &od_draw_frame_start, &od_draw_frame_end),
-		  GSF_XML_IN_NODE (TABLE_SHAPES, DRAW_CAPTION, OO_NS_DRAW, "caption", GSF_XML_NO_CONTENT, &odf_rect, &od_draw_text_frame_end),
+		  GSF_XML_IN_NODE (TABLE_SHAPES, DRAW_CAPTION, OO_NS_DRAW, "caption", GSF_XML_NO_CONTENT, &odf_caption, &od_draw_text_frame_end),
 	            GSF_XML_IN_NODE (DRAW_CAPTION, TEXT_CONTENT, OO_NS_TEXT, "p", GSF_XML_NO_CONTENT, NULL, NULL), /* 2nd def */
 		  GSF_XML_IN_NODE (TABLE_SHAPES, DRAW_CUSTOM_SHAPE, OO_NS_DRAW, "custom-shape", GSF_XML_NO_CONTENT, &odf_custom_shape, &od_draw_text_frame_end),
 	            GSF_XML_IN_NODE (DRAW_CUSTOM_SHAPE, TEXT_CONTENT, OO_NS_TEXT, "p", GSF_XML_NO_CONTENT, NULL, NULL), /* 2nd def */



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