[goffice] Revert previous and really fix.
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Revert previous and really fix.
- Date: Wed, 6 May 2015 18:23:48 +0000 (UTC)
commit c40bdab5a058e82d65f489eea44494a843e374f4
Author: Jean Brefort <jean brefort normalesup org>
Date: Wed May 6 20:23:09 2015 +0200
Revert previous and really fix.
ChangeLog | 4 ++--
goffice/utils/go-image.c | 5 +----
goffice/utils/go-pixbuf.c | 2 +-
3 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a9b81b7..d022a3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
2015-05-06 Jean Brefort <jean brefort normalesup org>
- * goffice/utils/go-image.c (go_image_save): save original pixbuf data.
- [see #748493, comments 13 and 14]
+ * goffice/utils/go-pixbuf.c (go_pixbuf_save): don't save when no data is
+ available [see #748493, comments 13 to 16]
2015-05-04 Morten Welinder <terra gnome org>
diff --git a/goffice/utils/go-image.c b/goffice/utils/go-image.c
index 7a9cb2e..d79eea8 100644
--- a/goffice/utils/go-image.c
+++ b/goffice/utils/go-image.c
@@ -770,10 +770,7 @@ go_image_save (GOImage *image, GsfXMLOut *output)
gsf_xml_out_add_cstr (output, "type", G_OBJECT_TYPE_NAME (image));
gsf_xml_out_add_int (output, "width", image->width);
gsf_xml_out_add_int (output, "height", image->height);
- if (image->data != NULL && image->data_length > 0)
- gsf_xml_out_add_base64 (output, NULL, image->data, image->data_length);
- else /* should this still happen? */
- ((GOImageClass *) G_OBJECT_GET_CLASS (image))->save (image, output);
+ ((GOImageClass *) G_OBJECT_GET_CLASS (image))->save (image, output);
gsf_xml_out_end_element (output);
}
diff --git a/goffice/utils/go-pixbuf.c b/goffice/utils/go-pixbuf.c
index 6d2e4c7..e46562b 100644
--- a/goffice/utils/go-pixbuf.c
+++ b/goffice/utils/go-pixbuf.c
@@ -85,7 +85,7 @@ static void
go_pixbuf_save (GOImage *image, GsfXMLOut *output)
{
GOPixbuf *pixbuf;
- g_return_if_fail (GO_IS_PIXBUF (image));
+ g_return_if_fail (GO_IS_PIXBUF (image) && image->data != NULL);
pixbuf = GO_PIXBUF (image);
if (pixbuf->type == NULL) {
pixbuf->type = g_strdup ("png");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]