[gnumeric] Bug 585176 – gnm_page_breaks_set_break criticals



commit 2461232de9769d71c3af83d5d7fc850bc5516c1c
Author: Andreas J. Guelzow <aguelzow math concordia ab ca>
Date:   Mon Jun 8 12:58:48 2009 -0600

    Bug 585176 â?? gnm_page_breaks_set_break criticals
    
    2009-06-08  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/print.c (compute_sheet_pages): make sure we have
    	  page breaks allocated before we try to save any.
---
 ChangeLog   |    5 +++++
 src/print.c |    9 +++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bf0e658..9d7d0ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-06-08  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* src/print.c (compute_sheet_pages): make sure we have
+	  page breaks allocated before we try to save any.
+
+2009-06-08  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* src/print-info.c (gnm_page_breaks_get_next_manual_break):
 	  fix unsigned issue
 	(gnm_page_breaks_set_break): ditto
diff --git a/src/print.c b/src/print.c
index e780440..eb2f778 100644
--- a/src/print.c
+++ b/src/print.c
@@ -996,6 +996,15 @@ compute_sheet_pages (GtkPrintContext   *context,
 	usable_x   = page_width / px;
 	usable_y   = page_height / py;
 
+	if (!pi->ignore_pb) {
+		if (pinfo->page_breaks.h == NULL)
+		        print_info_set_breaks (pinfo, 
+					       gnm_page_breaks_new (FALSE));
+		if (pinfo->page_breaks.v == NULL)
+		        print_info_set_breaks (pinfo, 
+					       gnm_page_breaks_new (TRUE));
+	}
+
 	paginate (&column_pagination, sheet, r.start.col, r.end.col,
 		  usable_x - row_header_width,
 		  repeat_left_use, repeat_left_start, repeat_left_end,



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