[gnumeric] Fix pagination if formulae are shown



commit e2aa4f293f430e9a9247889be18ed82eed4ab5ab
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Jul 27 08:20:59 2011 -0600

    Fix pagination if formulae are shown
    
    2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/print.c (compute_sheet_pages): account for column width change
    	when formulae are shown.

 ChangeLog   |    5 +++++
 src/print.c |    3 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5a36f8b..f5c804a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* src/print.c (compute_sheet_pages): account for column width change
+	when formulae are shown.
+
+2011-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* src/style-border.c (gnm_style_borders_row_print_gtk): account for
 	column width change when formulae are shown.
 
diff --git a/src/print.c b/src/print.c
index f3629de..2867989 100644
--- a/src/print.c
+++ b/src/print.c
@@ -930,6 +930,7 @@ compute_sheet_pages (GtkPrintContext   *context,
 	GSList *row_pagination = NULL;
 	gboolean repeat_top_use, repeat_left_use;
 	int repeat_top_start, repeat_top_end, repeat_left_start, repeat_left_end;
+	double const hscale = sheet->display_formulas ? 2 : 1;
 
 	if (pinfo->print_titles) {
 		col_header_height = sheet->rows.default_style.size_pts;
@@ -1021,7 +1022,7 @@ compute_sheet_pages (GtkPrintContext   *context,
 	usable_y   = page_height / py;
 
 	paginate (&column_pagination, sheet, print_area.start.col, print_area.end.col,
-		  usable_x - row_header_width,
+		  (usable_x - row_header_width)/hscale,
 		  repeat_left_use, repeat_left_start, repeat_left_end,
 		  sheet_col_get_distance_pts, sheet_col_get_info,
 		  pi->ignore_pb ? NULL : pinfo->page_breaks.v, !pi->ignore_pb);



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