[gnumeric] Rendered values: take pango context argument.



commit 1652e0cb920d39e7115af70a553e69819fbe1264
Author: Morten Welinder <terra gnome org>
Date:   Mon May 3 14:37:04 2010 -0400

    Rendered values: take pango context argument.

 ChangeLog            |    3 +++
 src/cell.c           |    1 +
 src/print-cell.c     |    2 +-
 src/rendered-value.c |    3 +--
 src/rendered-value.h |    1 +
 5 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index be75381..e6a2913 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-05-03  Morten Welinder  <terra gnome org>
 
+	* src/rendered-value.c (gnm_rendered_value_new): Add a
+	PangoContext* argument.  All callers changed.
+
 	* src/item-edit.c (item_edit_realize): Use proper pango context.
 
 	* src/sheet.c (cb_sheet_cell_copy): Unwrap the array expression.
diff --git a/src/cell.c b/src/cell.c
index 98923be..05f6bda 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -494,6 +494,7 @@ gnm_cell_render_value (GnmCell const *cell, gboolean allow_variable_width)
 
 	sheet = cell->base.sheet;
 	rv = gnm_rendered_value_new (cell,
+				     sheet->rendered_values->context,
 				     allow_variable_width,
 				     sheet->last_zoom_factor_used);
 
diff --git a/src/print-cell.c b/src/print-cell.c
index ee062ed..d08c781 100644
--- a/src/print-cell.c
+++ b/src/print-cell.c
@@ -79,6 +79,7 @@ print_cell_gtk (GnmCell const *cell,
 		 */
 
 		rv100 = gnm_rendered_value_new ((GnmCell *)cell,
+						pango_layout_get_context (rv->layout),
 						rv->variable_width,
 						1.0);
 		rv = rv100;
@@ -88,7 +89,6 @@ print_cell_gtk (GnmCell const *cell,
 	   display.  */
 	rv->might_overflow = rv->numeric_overflow;
 
-
 	if (cell_calc_layout (cell, rv, -1,
 			      (int)(width * PANGO_SCALE / scale_h),
 			      (int)(height * PANGO_SCALE / scale_v),
diff --git a/src/rendered-value.c b/src/rendered-value.c
index 80986d1..1a89a28 100644
--- a/src/rendered-value.c
+++ b/src/rendered-value.c
@@ -181,6 +181,7 @@ gnm_rendered_value_remeasure (GnmRenderedValue *rv)
  **/
 GnmRenderedValue *
 gnm_rendered_value_new (GnmCell const *cell,
+			PangoContext *context,
 			gboolean allow_variable_width,
 			double zoom)
 {
@@ -191,14 +192,12 @@ gnm_rendered_value_new (GnmCell const *cell,
 	int              rotation;
 	Sheet const     *sheet;
 	gboolean         displayed_formula;
-	PangoContext *context;
 	GnmStyle const *mstyle;
 
 	g_return_val_if_fail (cell != NULL, NULL);
 
 	/* sheet->workbook can be NULL when called from preview-grid.c  */
 	sheet = cell->base.sheet;
-	context = sheet->context;
 
 	displayed_formula =
 		gnm_cell_has_expr (cell) && sheet->display_formulas;
diff --git a/src/rendered-value.h b/src/rendered-value.h
index a0c574a..51a0646 100644
--- a/src/rendered-value.h
+++ b/src/rendered-value.h
@@ -41,6 +41,7 @@ struct _GnmRenderedRotatedValue {
 };
 
 GnmRenderedValue *gnm_rendered_value_new       (GnmCell const *cell,
+						PangoContext *context,
 						gboolean variable_width,
 						double zoom);
 void              gnm_rendered_value_destroy   (GnmRenderedValue *rv);



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