GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 6686dfa2 authored by Michael Meeks's avatar Michael Meeks

print preview fix.

parent ec6e6517
2000-01-06 Michael Meeks <mmeeks@gnu.org>
* src/sheet.c (sheet_get_extent): stop start.col/row going negative;
why they should I have no idea.
* src/sheet-style.c (sheet_style_get_extent): Ignore last global region.
2000-01-05 Michael Meeks <mmeeks@gnu.org>
* src/sheet.c (sheet_move_range, sheet_insert_cols, sheet_delete_cols),
......
2000-01-06 Michael Meeks <mmeeks@gnu.org>
* src/sheet.c (sheet_get_extent): stop start.col/row going negative;
why they should I have no idea.
* src/sheet-style.c (sheet_style_get_extent): Ignore last global region.
2000-01-05 Michael Meeks <mmeeks@gnu.org>
* src/sheet.c (sheet_move_range, sheet_insert_cols, sheet_delete_cols),
......
......@@ -1469,7 +1469,7 @@ sheet_style_get_extent (Range *r, Sheet const *sheet)
{
GList *l;
for (l = STYLE_LIST (sheet); l; l = g_list_next (l)) {
for (l = STYLE_LIST (sheet); l && l->next; l = g_list_next (l)) {
Range *sr = (Range *)l->data;
if (!range_is_infinite (sr))
......
......@@ -627,11 +627,15 @@ sheet_get_extent (Sheet const *sheet)
r.end.col = sheet->cols.max_used;
if (r.start.col > r.end.col)
r.start.col = r.end.col;
if (r.start.col < 0)
r.start.col = 0;
if (r.end.row > sheet->rows.max_used)
r.end.row = sheet->rows.max_used;
if (r.start.row > r.end.row)
r.start.row = r.end.row;
if (r.start.row < 0)
r.start.row = 0;
return r;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment