[gnumeric] Conflicts:



commit 90e51fda2631120fb095c214847221c5da4d7192
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Sun Apr 19 23:05:03 2009 -0600

    Conflicts:
    	ChangeLog
    	NEWS
---
 ChangeLog           |    5 +++++
 NEWS                |    1 +
 src/gnm-so-filled.c |   16 ++++++++++++++++
 3 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 81e5eed..b106d41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-04-19  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* src/gnm-so-filled.c (gnm_so_filled_draw_cairo): print text if
+	  available
+
+2009-04-19  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* src/sheet-object-widget.c (so_widget_view_set_bounds): Make sure that the 
 	  bounds are at least 6 wide  [#579152]
 
diff --git a/NEWS b/NEWS
index f806b72..96ed4da 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Andreas:
 	* Complete the list sheet object configuration dialog [#578557]
 	* Make all sheet object configurations undoable [#114098]
 	* Quieten GTK warning [#579152]
+	* Print text in sheet object label [#144787]
 
 Jean:
 	* Variable sheet sizes.
diff --git a/src/gnm-so-filled.c b/src/gnm-so-filled.c
index 85db2b0..bd5abeb 100644
--- a/src/gnm-so-filled.c
+++ b/src/gnm-so-filled.c
@@ -284,6 +284,22 @@ gnm_so_filled_draw_cairo (SheetObject const *so, cairo_t *cr,
 		UINT_RGBA_G(style->outline.color),
 		UINT_RGBA_A(style->outline.color));
 	cairo_stroke (cr);
+	/* Draw the text. */
+	if (sof->text != NULL && !sof->is_oval) {
+		PangoLayout *pl = pango_cairo_create_layout (cr);
+		double pl_height = (height - sof->margin_pts.top 
+				    - sof->margin_pts.bottom) * PANGO_SCALE;
+		double pl_width = (width - sof->margin_pts.left 
+				   - sof->margin_pts.right) * PANGO_SCALE;
+		cairo_move_to (cr, sof->margin_pts.left, 
+			       sof->margin_pts.top);
+		pango_layout_set_markup (pl, sof->text, -1);
+		pango_layout_set_attributes (pl, sof->markup);
+		pango_layout_set_width (pl, pl_width);
+		pango_layout_set_height (pl, pl_height);
+		pango_cairo_show_layout (cr, pl);
+		g_object_unref(G_OBJECT (pl));
+	}
 }
 
 static gboolean



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