aboutsummaryrefslogtreecommitdiffstats
path: root/math/gnumeric
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2009-08-09 05:35:28 +0800
committermarcus <marcus@FreeBSD.org>2009-08-09 05:35:28 +0800
commitb45bfecb5c3018a7b0fdb34cad06e94b4c7fd238 (patch)
tree793c3dbb588d564ef48c03e038df989a79f53311 /math/gnumeric
parent32d7d7ddce532b71ff9827ff4e5cf3883a0969b8 (diff)
downloadfreebsd-ports-gnome-b45bfecb5c3018a7b0fdb34cad06e94b4c7fd238.tar.gz
freebsd-ports-gnome-b45bfecb5c3018a7b0fdb34cad06e94b4c7fd238.tar.zst
freebsd-ports-gnome-b45bfecb5c3018a7b0fdb34cad06e94b4c7fd238.zip
Merge a patch from GNOME git to fix a crash with printing.
Reported by: Kevin Oberman <oberman@es.net>
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