[gnumeric] xlsx: fix export of images.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xlsx: fix export of images.
- Date: Wed, 4 Mar 2015 16:10:25 +0000 (UTC)
commit 8c7abe084767862ef3d6c54365f639b1df02be0d
Author: Morten Welinder <terra gnome org>
Date: Wed Mar 4 11:09:56 2015 -0500
xlsx: fix export of images.
XL is now happy to read the image.
plugins/excel/ChangeLog | 5 +++++
plugins/excel/xlsx-write-drawing.c | 6 +++++-
plugins/excel/xlsx-write.c | 2 ++
3 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index dfc4d79..1cee105 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-04 Morten Welinder <terra gnome org>
+
+ * xlsx-write-drawing.c (xlsx_write_drawing_objects): Fix
+ relationship. Write a prstGeom for the image.
+
2015-03-01 Morten Welinder <terra gnome org>
* ms-excel-read.c (ms_sheet_realize_obj): Don't let the sheet
diff --git a/plugins/excel/xlsx-write-drawing.c b/plugins/excel/xlsx-write-drawing.c
index 639a839..469b22f 100644
--- a/plugins/excel/xlsx-write-drawing.c
+++ b/plugins/excel/xlsx-write-drawing.c
@@ -1263,7 +1263,7 @@ xlsx_write_drawing_objects (XLSXWriteState *state, GsfOutput *sheet_part,
NULL);
rId1 = gsf_outfile_open_pkg_relate (GSF_OUTFILE_OPEN_PKG (image_part),
GSF_OUTFILE_OPEN_PKG (drawing_part),
- ns_rel_chart);
+ ns_rel_image);
sheet_object_write_image (so, NULL, -1, image_part, NULL);
gsf_output_close (image_part);
g_object_unref (image_part);
@@ -1369,6 +1369,10 @@ xlsx_write_drawing_objects (XLSXWriteState *state, GsfOutput *sheet_part,
gsf_xml_out_end_element (xml); /* </xdr:blipFill> */
gsf_xml_out_start_element (xml, "xdr:spPr");
+ gsf_xml_out_start_element (xml, "a:prstGeom");
+ gsf_xml_out_add_cstr (xml, "prst", "rect");
+ gsf_xml_out_simple_element (xml, "a:avLst", NULL);
+ gsf_xml_out_end_element (xml); /* </a:prstGeom> */
gsf_xml_out_end_element (xml); /* </xdr:spPr> */
gsf_xml_out_end_element (xml); /* </xdr:pic> */
diff --git a/plugins/excel/xlsx-write.c b/plugins/excel/xlsx-write.c
index ca89c2c..5d19972 100644
--- a/plugins/excel/xlsx-write.c
+++ b/plugins/excel/xlsx-write.c
@@ -109,6 +109,8 @@ static char const *ns_rel_draw = "http://schemas.openxmlformats.org/officeDocum
static char const *ns_rel_leg_draw =
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing";
static char const *ns_rel_chart =
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart";
static char const *ns_rel_com =
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
+static char const *ns_rel_image =
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
+
typedef struct {
unsigned int count;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]