[gnumeric] Fix manual pagebreak handling when printing. [#631570]



commit 65e2595b89301faf31fc77cdf54eadda9d904ff8
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Oct 6 23:55:57 2010 -0600

    Fix manual pagebreak handling when printing. [#631570]
    
    2010-10-07  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/print-info.c (print_info_set_paper_orientation): correct
    	  argument description
    	* src/print-info.h (page_breaks): add comment
    	* src/print.c (compute_sheet_pages): switch vertical and horizontal
    	  page breaks

 ChangeLog        |    8 ++++++++
 NEWS             |    1 +
 src/print-info.c |    1 -
 src/print-info.h |    3 ++-
 src/print.c      |    8 ++++----
 5 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d811f9a..044510d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-10-07  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* src/print-info.c (print_info_set_paper_orientation): correct
+	  argument description
+	* src/print-info.h (page_breaks): add comment
+	* src/print.c (compute_sheet_pages): switch vertical and horizontal
+	  page breaks
+
 2010-10-04  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* src/commands.h (cmd_so_set_links): add argument
diff --git a/NEWS b/NEWS
index 85e07e6..85c30b0 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ Andreas:
 	  content. [#631327]
 	* Add option to sheet object lists and combos to enter values
 	  rather than index. [#629333]
+	* Fix manual pagebreak handling when printing. [#631570]
 
 --------------------------------------------------------------------------
 Gnumeric 1.10.11
diff --git a/src/print-info.c b/src/print-info.c
index d560967..c5464ce 100644
--- a/src/print-info.c
+++ b/src/print-info.c
@@ -1211,7 +1211,6 @@ print_info_set_paper_orientation (PrintInformation *pi,
  * print_info_set_breaks :
  * @pi : #PrintInformation
  * @breaks : #GnmPageBreaks
- * @is_col : Do @breaks split between columns or rows ?
  *
  * NOTE : Takes ownership of @breaks.  DO NOT FREE after calling.
  **/
diff --git a/src/print-info.h b/src/print-info.h
index 7544b5d..83c7187 100644
--- a/src/print-info.h
+++ b/src/print-info.h
@@ -87,7 +87,8 @@ struct _PrintInformation {
 	} error_display;
 
 	struct {
-		GnmPageBreaks *h, *v;
+		GnmPageBreaks *h,  /* between rows */
+			      *v;  /* between columns */
 	} page_breaks;
 	PrintHF		*header, *footer;
 
diff --git a/src/print.c b/src/print.c
index 51c213f..29cb77b 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1003,7 +1003,7 @@ compute_sheet_pages (GtkPrintContext   *context,
 					    col_header_height,
 					    repeat_top_use,
 					    repeat_top_start, repeat_top_end,
-					    pi->ignore_pb ? NULL : pinfo->page_breaks.v);
+					    pi->ignore_pb ? NULL : pinfo->page_breaks.h);
 		pxy = compute_scale_fit_to (sheet, print_area.start.col, print_area.end.col,
 					    page_width, sheet_col_get_info,
 					    sheet_col_get_distance_pts,
@@ -1011,7 +1011,7 @@ compute_sheet_pages (GtkPrintContext   *context,
 					    row_header_width,
 					    repeat_left_use,
 					    repeat_left_start, repeat_left_end,
-					    pi->ignore_pb ? NULL : pinfo->page_breaks.h);
+					    pi->ignore_pb ? NULL : pinfo->page_breaks.v);
 
 		pinfo->scaling.percentage.x = pxy * 100.;
 		pinfo->scaling.percentage.y = pxy * 100.;
@@ -1032,12 +1032,12 @@ compute_sheet_pages (GtkPrintContext   *context,
 		  usable_x - row_header_width,
 		  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.h, !pi->ignore_pb);
+		  pi->ignore_pb ? NULL : pinfo->page_breaks.v, !pi->ignore_pb);
 	paginate (&row_pagination, sheet, print_area.start.row, print_area.end.row,
 		  usable_y - col_header_height,
 		  repeat_top_use, repeat_top_start, repeat_top_end,
 		  sheet_row_get_distance_pts, sheet_row_get_info,
-		  pi->ignore_pb ? NULL : pinfo->page_breaks.v, !pi->ignore_pb);
+		  pi->ignore_pb ? NULL : pinfo->page_breaks.h, !pi->ignore_pb);
 
 	if (sheet->print_info->print_across_then_down)
 		compute_sheet_pages_across_then_down (pi, sheet,



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