Commit baa13c0c authored by Morten Welinder's avatar Morten Welinder

D-funcs: fix handling of blanks.

Also update expected values.  We still fail.
parent b0e899e0
2016-06-11 Morten Welinder <terra@gnome.org>
* src/value.c (find_rows_that_match): Fix blank handling.
2016-05-19 Morten Welinder <terra@gnome.org>
* src/stf-parse.c (stf_parse_options_guess_formats): Separate
......
2016-06-11 Morten Welinder <terra@gnome.org>
* functions.c (find_cells_that_match): Fix blank handling.
2016-06-10 Morten Welinder <terra@gnome.org>
* functions.c (database_find_values): Make the float case strict.
......
......@@ -103,6 +103,7 @@ find_cells_that_match (Sheet *sheet, GnmValue const *database,
gboolean add_flag;
GnmCell *cell;
int fake_col;
GnmValue const *empty = value_new_empty ();
cells = NULL;
/* TODO : Why ignore the first row ? What if there is no header ? */
......@@ -134,8 +135,7 @@ find_cells_that_match (Sheet *sheet, GnmValue const *database,
cond->column, row);
if (tmp != NULL)
gnm_cell_eval (tmp);
if (gnm_cell_is_empty (tmp) ||
!cond->fun (tmp->value, cond)) {
if (!cond->fun (tmp ? tmp->value : empty, cond)) {
add_flag = FALSE;
break;
}
......
......@@ -1958,6 +1958,7 @@ find_rows_that_match (Sheet *sheet, int first_col, int first_row,
gboolean add_flag;
char const *t1, *t2;
GnmCell *test_cell;
GnmValue const *empty = value_new_empty ();
for (row = first_row; row <= last_row; row++) {
add_flag = TRUE;
......@@ -1970,8 +1971,7 @@ find_rows_that_match (Sheet *sheet, int first_col, int first_row,
test_cell = sheet_cell_get (sheet, cond->column, row);
if (test_cell != NULL)
gnm_cell_eval (test_cell);
if (gnm_cell_is_empty (test_cell) ||
!cond->fun (test_cell->value, cond)) {
if (!cond->fun (test_cell ? test_cell->value : empty, cond)) {
add_flag = FALSE;
break;
}
......
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