printing bugs and small patch

When my sister wanted to print the accounts for her choir, she got
1759 pages of output, not the 21 she really wanted :-)

The problems seems to be that she has set default styles on columns
and rows, and the code to look for content in each tile triggers on
that.  I don't have a proper fix (add flag to mstyle_visible_in_blank
to ignore default styles?), but this reduces the badness in most

RCS file: /cvs/gnome/gnumeric/src/print.c,v
retrieving revision 1.74
diff -u -r1.74 print.c
--- print.c     2001/02/09 18:54:07     1.74
+++ print.c     2001/02/11 23:16:54
@@ -983,8 +983,8 @@
        print_job_info_init_sheet (sheet, pj);
        extent = sheet_get_extent (sheet);
        sheet_style_get_extent (sheet, &extent);
-       extent.end.col++;
-       extent.end.row++;
+       extent.end.col = MIN (extent.end.col, sheet->cols.max_used) + 1;
+       extent.end.row = MIN (extent.end.row, sheet->rows.max_used) + 1;
        print_sheet_range (sheet, extent, pj, TRUE);

While creating the PostScript, I also got a lot (1175040 lines) of
** CRITICAL **: file sheet.c: line 1706 (sheet_col_get): assertion `pos < SHEET_MAX_COLS' failed.

(without the above patch, the number of lines is much higher)

For this sheet:
(gdb) print sheet->cols.max_used
$1 = 42
(gdb) print sheet->rows.max_used
$2 = 152

Hmm, 180 times per cell, that really _is_ a lot :-)

Finally, the 1761 page output uncovered another bug: It does not work
to pick page 1720..1734 from the resulting PostScript (using gv or
similar).  There are probably some function definitions or font
selections put into the first page, rather than the preamble.
Selecting 1,1720..1734 works.

Kjetil T.

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