aboutsummaryrefslogtreecommitdiff
path: root/math/gnumeric
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2009-08-08 21:35:28 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2009-08-08 21:35:28 +0000
commit0561f1fd6075d82f35b2799e80bc2ddd243576c1 (patch)
tree430aeb4ffc7731f7723956b9b18749fe8cd58673 /math/gnumeric
parent1e74a4277f7caf4a08e300ae34eb9b5f2fcda0e5 (diff)
downloadports-0561f1fd6075d82f35b2799e80bc2ddd243576c1.tar.gz
ports-0561f1fd6075d82f35b2799e80bc2ddd243576c1.zip
Merge a patch from GNOME git to fix a crash with printing.
Reported by: Kevin Oberman <oberman@es.net>
Notes
Notes: svn path=/head/; revision=239184
Diffstat (limited to 'math/gnumeric')
-rw-r--r--math/gnumeric/Makefile2
-rw-r--r--math/gnumeric/files/patch-print-crash69
2 files changed, 70 insertions, 1 deletions
diff --git a/math/gnumeric/Makefile b/math/gnumeric/Makefile
index 1afa80cef5c0..f7481b778564 100644
--- a/math/gnumeric/Makefile
+++ b/math/gnumeric/Makefile
@@ -8,7 +8,7 @@
PORTNAME= gnumeric
PORTVERSION= 1.9.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= math gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
diff --git a/math/gnumeric/files/patch-print-crash b/math/gnumeric/files/patch-print-crash
new file mode 100644
index 000000000000..dc9e7c4930d7
--- /dev/null
+++ b/math/gnumeric/files/patch-print-crash
@@ -0,0 +1,69 @@
+From f4d534730632873339ad0a16419edc835b9c771a Mon Sep 17 00:00:00 2001
+From: Andreas J. Guelzow <aguelzow@pyrshep.ca>
+Date: Mon, 22 Jun 2009 23:54:08 +0000
+Subject: Fix printing crash. [#586672]
+
+2009-06-22 Andreas J. Guelzow <aguelzow@pyrshep.ca>
+
+ * src/print-info.c (gnm_page_breaks_clean): we can't and don't need
+ to clean a non-existing breaks array.
+ * src/print.c (compute_sheet_pages): fix sense of test anc combine
+ code
+---
+--- src/print-info.c
++++ src/print-info.c
+@@ -1441,6 +1441,10 @@ void
+ gnm_page_breaks_clean (GnmPageBreaks *breaks)
+ {
+ guint i;
++
++ if (breaks == NULL)
++ return;
++
+ for (i = 0; i < breaks->details->len; i++) {
+ GnmPageBreak *pbreak = &g_array_index (breaks->details,
+ GnmPageBreak, i);
+diff --git a/src/print.c b/src/print.c
+index 2c0afd4..5fb815a 100644
+--- src/print.c
++++ src/print.c
+@@ -953,9 +953,18 @@ compute_sheet_pages (GtkPrintContext *context,
+ repeat_left_start = repeat_left_use ? r.start.col : 0;
+ repeat_left_end = repeat_left_use ? r.end.col : 0;
+
+- if (pi->ignore_pb) {
+- gnm_page_breaks_clean (pinfo->page_breaks.h);
+- gnm_page_breaks_clean (pinfo->page_breaks.v);
++ if (!pi->ignore_pb) {
++ if (pinfo->page_breaks.h == NULL)
++ print_info_set_breaks (pinfo,
++ gnm_page_breaks_new (FALSE));
++ else
++ gnm_page_breaks_clean (pinfo->page_breaks.h);
++ if (pinfo->page_breaks.v == NULL)
++ print_info_set_breaks (pinfo,
++ gnm_page_breaks_new (TRUE));
++ else
++ gnm_page_breaks_clean (pinfo->page_breaks.v);
++
+ }
+
+ if (pinfo->scaling.type == PRINT_SCALE_FIT_PAGES) {
+@@ -995,15 +1004,6 @@ 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,
+--
+cgit v0.8.2