[gnumeric] Some basic custom-shape support in ODF import.
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Some basic custom-shape support in ODF import.
- Date: Thu, 2 Aug 2012 20:26:00 +0000 (UTC)
commit 73ebc23a93a5ea1a66849ee365b54bdaefc85559
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Thu Aug 2 14:25:13 2012 -0600
Some basic custom-shape support in ODF import.
2012-08-02 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (odf_custom_shape): new
(opendoc_content_dtd): connect odf_custom_shape
NEWS | 1 +
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-read.c | 15 +++++++++++++++
3 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index c4d287b..0c196a8 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Andreas:
* Fix layering of sheet objects in ODF export and import.
[Part of #681009]
* Export/import opacity of fill-colours to/from ODF. [Part of #681009]
+ * Some basic custom-shape support in ODF import.
Jean:
* Fix component references issues. [#680190]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index f5fd8f9..eaef003 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,10 @@
2012-08-02 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * openoffice-read.c (odf_custom_shape): new
+ (opendoc_content_dtd): connect odf_custom_shape
+
+2012-08-02 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* openoffice-read.c (object_offset_t): add field
(odf_set_z_index): deleted
(odf_z_idx_compare): use object_offset_t
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 9ccf9c2..c06f7ee 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -9038,6 +9038,18 @@ odf_ellipse (GsfXMLIn *xin, xmlChar const **attrs)
odf_push_text_p (state, FALSE);
}
+static void
+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."));
+
+ odf_so_filled (xin, attrs, TRUE);
+ odf_push_text_p (state, FALSE);
+}
+
static GOArrow *
odf_get_arrow_marker (OOParseState *state, char const *name)
{
@@ -10256,6 +10268,9 @@ 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_CUSTOM_SHAPE, OO_NS_DRAW, "custom-shape", GSF_XML_NO_CONTENT, &odf_custom_shape, &od_draw_frame_end),
+ GSF_XML_IN_NODE (DRAW_CUSTOM_SHAPE, TEXT_CONTENT, OO_NS_TEXT, "p", GSF_XML_NO_CONTENT, NULL, NULL), /* 2nd def */
+ GSF_XML_IN_NODE (DRAW_CUSTOM_SHAPE, DRAW_ENHANCED_GEOMETRY, OO_NS_DRAW, "enhanced-geometry", GSF_XML_NO_CONTENT, NULL, NULL),
GSF_XML_IN_NODE (TABLE_SHAPES, DRAW_ELLIPSE, OO_NS_DRAW, "ellipse", GSF_XML_NO_CONTENT, &odf_ellipse, &od_draw_text_frame_end),
GSF_XML_IN_NODE (DRAW_ELLIPSE, TEXT_CONTENT, OO_NS_TEXT, "p", GSF_XML_NO_CONTENT, NULL, NULL), /* 2nd def */
GSF_XML_IN_NODE (TABLE_SHAPES, DRAW_LINE, OO_NS_DRAW, "line", GSF_XML_NO_CONTENT, &odf_line, &odf_line_end),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]