[gnumeric] Fix printing of erros as blanks if formulae are shown



commit cd982dce1abb8013055ce5287740482d079f4dad
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Jul 27 02:04:10 2011 -0600

    Fix printing of erros as blanks if formulae are shown
    
    2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/print-cell.c (print_cell_gtk): only replace errors by blanks if the
    	error wopuld in fact be shown, i.e. not if it is the result of a formula
    	and formulae are shown.

 ChangeLog        |    6 ++++++
 src/print-cell.c |    5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1a76256..6169336 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* src/print-cell.c (print_cell_gtk): only replace errors by blanks if the
+	error wopuld in fact be shown, i.e. not if it is the result of a formula
+	and formulae are shown.
+
+2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* src/print-cell.h (gnm_gtk_print_cell_range): change argument type
 	* src/print-cell.c (gnm_gtk_print_cell_range): change argument type
 	(print_cell_gtk): consider print-info and possibly print errors	as blank
diff --git a/src/print-cell.c b/src/print-cell.c
index 8153586..97028db 100644
--- a/src/print-cell.c
+++ b/src/print-cell.c
@@ -67,9 +67,10 @@ print_cell_gtk (GnmCell const *cell,
 	double const scale_h = 72. / gnm_app_display_dpi_get (TRUE);
 	double const scale_v = 72. / gnm_app_display_dpi_get (FALSE);
 
-	gboolean cell_has_error = (gnm_cell_is_error (cell) != NULL);
+	gboolean cell_shows_error = (gnm_cell_is_error (cell) != NULL)
+		&& !(gnm_cell_has_expr (cell) && sheet->display_formulas);
 
-	if (cell_has_error && pinfo->error_display == PRINT_ERRORS_AS_BLANK)
+	if (cell_shows_error && pinfo->error_display == PRINT_ERRORS_AS_BLANK)
 		return;
 
 	/* Get the sizes exclusive of margins and grids */



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