[gnumeric] Fixed build after goffice API breakage.
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fixed build after goffice API breakage.
- Date: Wed, 26 Oct 2011 10:10:42 +0000 (UTC)
commit 1fbde375a17b55312af286cf07a270ba7e29c5f7
Author: Jean Brefort <jean brefort normalesup org>
Date: Wed Oct 26 12:10:02 2011 +0200
Fixed build after goffice API breakage.
ChangeLog | 6 ++++++
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-write.c | 2 +-
src/gnm-so-filled.c | 8 +-------
src/sheet-object-image.c | 13 +++----------
5 files changed, 16 insertions(+), 18 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e901a79..9796c0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-26 Jean Brefort <jean brefort normalesup org>
+
+ * src/gnm-so-filled.c (gnm_so_filled_draw_cairo): make things build again
+ after goffice changes.
+ * src/sheet-object-image.c (gnm_soi_draw_cairo): ditto.
+
2011-10-25 Jean Brefort <jean brefort normalesup org>
* configure.in: cleaned dead-kittens.h.
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index a1bc4c5..9e2319b 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-26 Jean Brefort <jean brefort normalesup org>
+
+ * openoffice-write.c (odf_match_image): make things build again
+ after goffice changes.
+
2011-10-01 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (identified_google_docs): new
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 1199c35..775b433 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -6513,7 +6513,7 @@ odf_get_gradient_name (GnmOOExport *state, GOStyle const* style)
static gboolean
odf_match_image (GOImage *old, GOImage *new)
{
- return go_image_same_pixbuf (old, new);
+ return !go_image_differ (old, new);
}
diff --git a/src/gnm-so-filled.c b/src/gnm-so-filled.c
index cfd8ba5..2f09cf5 100644
--- a/src/gnm-so-filled.c
+++ b/src/gnm-so-filled.c
@@ -255,7 +255,6 @@ gnm_so_filled_draw_cairo (SheetObject const *so, cairo_t *cr,
{
GnmSOFilled *sof = GNM_SO_FILLED (so);
GOStyle const *style = sof->style;
- cairo_pattern_t *pat = NULL;
cairo_new_path (cr);
if (sof->is_oval) {
@@ -272,12 +271,7 @@ gnm_so_filled_draw_cairo (SheetObject const *so, cairo_t *cr,
cairo_close_path (cr);
}
/* Fill the shape */
- pat = go_style_create_cairo_pattern (style, cr);
- if (pat) {
- cairo_set_source (cr, pat);
- cairo_fill_preserve (cr);
- cairo_pattern_destroy (pat);
- }
+ go_style_fill (style, cr, TRUE);
/* Draw the line */
if (go_style_set_cairo_line (style, cr))
cairo_stroke (cr);
diff --git a/src/sheet-object-image.c b/src/sheet-object-image.c
index 6fa4c78..24d3758 100644
--- a/src/sheet-object-image.c
+++ b/src/sheet-object-image.c
@@ -552,24 +552,17 @@ gnm_soi_draw_cairo (SheetObject const *so, cairo_t *cr,
if (!pixbuf || width == 0. || height == 0.)
return;
cairo_save (cr);
- img = go_image_new_from_pixbuf (pixbuf);
- cr_pattern = go_image_create_cairo_pattern (img);
+ img = (GOImage *) go_pixbuf_new_from_pixbuf (pixbuf);
w = gdk_pixbuf_get_width (pixbuf);
h = gdk_pixbuf_get_height (pixbuf);
- cairo_matrix_init_scale (&cr_matrix,
- w / width,
- h / height);
- cairo_pattern_set_matrix (cr_pattern, &cr_matrix);
- cairo_rectangle (cr, 0., 0., width, height);
- cairo_set_source (cr, cr_pattern);
- cairo_fill (cr);
+ cairo_scale (cr, width / w, height / h);
+ go_image_draw (img, cr);
/*
* We need to unset the source before we destroy the pattern.
* cairo_restore will do that. See #632439.
*/
cairo_restore (cr);
- cairo_pattern_destroy (cr_pattern);
g_object_unref (img);
g_object_unref (pixbuf);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]