Commit df232960 authored by Morten Welinder's avatar Morten Welinder

SheetFilter: fix insert col/row problem.

parent 905a9cce
2018-10-04 Morten Welinder <terra@gnome.org>
* src/sheet-filter.c (gnm_sheet_filter_insdel_colrow): Shorten
filter if it would otherwise go beyond the end of the sheet.
Fixes #359.
2018-10-02 Morten Welinder <terra@gnome.org>
* src/sheet-view.c (sv_real_dispose): Fix typo.
......
......@@ -4,6 +4,7 @@ Morten:
* Fix SWITCH's default argument. [#354]
* Fix problem with setting auto-func. [#357]
* Fix problem reading really old xls format.
* Fix sheet filter problem. [#359]
--------------------------------------------------------------------------
Gnumeric 1.12.43
......
......@@ -1095,7 +1095,9 @@ gnm_sheet_filter_insdel_colrow (Sheet *sheet,
if (is_insert) {
/* INSERTING COLUMNS */
filter->r.end.col += count;
filter->r.end.col
MIN (gnm_sheet_get_last_col (sheet),
filter->r.end.col + count);
/* inserting in the middle of a filter adds
* fields. Everything else just moves it */
if (start > filter->r.start.col &&
......@@ -1142,7 +1144,9 @@ gnm_sheet_filter_insdel_colrow (Sheet *sheet,
if (is_insert) {
/* INSERTING ROWS */
filter->r.end.row += count;
filter->r.end.row =
MIN (gnm_sheet_get_last_row (sheet),
filter->r.end.row + count);
if (start < filter->r.start.row)
filter->r.start.row += count;
} else {
......
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