Commit 7c3ea51d authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

It makes no sense to create a filter for 1 header row.


2002-12-14  Jody Goldberg <jody@gnome.org>

	* src/workbook-control-gui.c (cb_auto_filter) : It makes no sense to
	  create a filter for 1 header row.

	* src/sheet-filter.c (filter_field_apply) : be more resilient about
	  bogus filters.
parent 0ca78a72
......@@ -6,15 +6,6 @@ release, and longer term bugs.
Release Critical
----------------
- Errors are saved localised.
1. Start gnumeric in, say, French locale.
2. A1=eek
3. Copy A1.
4. Paste special as value into B1.
5. Save.
==> #NOM? ends up in file.
- handle request to filter singleton
Pending Patches
---------------
......
2002-12-14 Jody Goldberg <jody@gnome.org>
* src/workbook-control-gui.c (cb_auto_filter) : It makes no sense to
create a filter for 1 header row.
* src/sheet-filter.c (filter_field_apply) : be more resilient about
bogus filters.
2002-12-13 Jody Goldberg <jody@gnome.org>
* src/input-msg.c (gnm_input_msg_get_msg) : new.
......
2002-12-14 Jody Goldberg <jody@gnome.org>
* src/workbook-control-gui.c (cb_auto_filter) : It makes no sense to
create a filter for 1 header row.
* src/sheet-filter.c (filter_field_apply) : be more resilient about
bogus filters.
2002-12-13 Jody Goldberg <jody@gnome.org>
* src/input-msg.c (gnm_input_msg_get_msg) : new.
......
2002-12-14 Jody Goldberg <jody@gnome.org>
* src/workbook-control-gui.c (cb_auto_filter) : It makes no sense to
create a filter for 1 header row.
* src/sheet-filter.c (filter_field_apply) : be more resilient about
bogus filters.
2002-12-13 Jody Goldberg <jody@gnome.org>
* src/input-msg.c (gnm_input_msg_get_msg) : new.
......
......@@ -807,6 +807,9 @@ filter_field_apply (GnmFilterField *field)
int const start_row = filter->r.start.row + 1;
int const end_row = filter->r.end.row;
if (start_row > end_row)
return;
if (field->cond == NULL ||
field->cond->op[0] == GNM_FILTER_UNUSED)
return;
......
......@@ -2808,6 +2808,10 @@ cb_auto_filter (GtkWidget *widget, WorkbookControlGUI *wbcg)
if (filter == NULL) {
Range const *src = selection_first_range (sv,
COMMAND_CONTEXT (wbcg), _("Add Filter"));
if (src == NULL || src->start.row == src->end.row)
gnumeric_error_invalid (COMMAND_CONTEXT (wbcg),
_("AutoFilter"), _("Requires more than 1 row"));
return;
gnm_filter_new (sv->sheet, src);
} else {
/* keep distinct to simplify undo/redo later */
......
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