Commit f8457ef2 authored by Michael Meeks's avatar Michael Meeks

Fixed up inter-sheet dependencies again, hmm....

Put new sheet selection macro through all the functions code where needed.
Fixup REPT and insert VDB.
Fix silly fatal bug in externsheet_name.
parent b2762230
This diff is collapsed.
This diff is collapsed.
1999-07-10 Michael Meeks <michael@edenproject.org>
* ms-formula-read.c (formula_func_data): Fix REPT = 2 args,
add VDB = var arg.
* ms-excel-read.c (biff_get_externsheet_name): Silly but fatal bug
a child could spot: written by yours truly :-)
1999-07-09 Jody Goldberg <jgoldberg@home.com>
* ms-obj.c : Conditionalize the debug info for text objects.
......
......@@ -2418,8 +2418,10 @@ biff_get_externsheet_name(ExcelWorkbook *wb, guint16 idx, gboolean get_first)
index = get_first ? bed->first_tab : bed->last_tab;
bsd = g_hash_table_lookup (wb->boundsheet_data_by_index, &index);
if (!bsd)
if (!bsd || !bsd->sheet) {
printf ("Duff sheet index %d\n", index);
return NULL;
}
return bsd->sheet->gnum_sheet;
}
......
......@@ -95,7 +95,7 @@ FormulaFuncData formula_func_data[FORMULA_FUNC_DATA_LEN] =
/* 27 */ { "ROUND", 2 },
/* 28 */ { "LOOKUP", -1 },
/* 29 */ { "INDEX", },
/* 30 */ { "REPT", -1 },
/* 30 */ { "REPT", 2 },
/* 31 */ { "MID", 3 },
/* 32 */ { "LEN", 1 },
/* 33 */ { "VALUE", 1 },
......@@ -287,7 +287,7 @@ FormulaFuncData formula_func_data[FORMULA_FUNC_DATA_LEN] =
/* 219 */ { "ADDRESS", -1 }, /* abs_num is optional */
/* 220 */ { "DAYS360", -1 }, /* method is optional */
/* 221 */ { "TODAY", 0 },
/* 222 Unknown*/{ "UnknownFunction222", -2 },
/* 222 */ { "VDB", -1 },
/* 223 Unknown*/{ "UnknownFunction223", -2 },
/* 224 Unknown*/{ "UnknownFunction224", -2 },
/* 225 Unknown*/{ "UnknownFunction225", -2 },
......
......@@ -102,7 +102,7 @@ criteria_test_greater_or_equal(Value *x, Value *y)
/* Finds a column index of a field.
*/
static int
find_column_of_field(Value *database, Value *field)
find_column_of_field (const EvalPosition *ep, Value *database, Value *field)
{
Sheet *sheet;
Cell *cell;
......@@ -119,7 +119,7 @@ find_column_of_field(Value *database, Value *field)
if (field->type != VALUE_STRING)
return -1;
sheet = database->v.cell_range.cell_a.sheet;
sheet = eval_sheet (database->v.cell_range.cell_a.sheet, ep->sheet);
field_name = value_get_as_string (field);
column = -1;
......@@ -206,7 +206,7 @@ parse_criteria(char *criteria, criteria_test_fun_t *fun, Value **test_value)
/* Parses the criteria cell range.
*/
static GSList *
parse_database_criteria(Value *database, Value *criteria)
parse_database_criteria (const EvalPosition *ep, Value *database, Value *criteria)
{
Sheet *sheet;
database_criteria_t *new_criteria;
......@@ -217,7 +217,7 @@ parse_database_criteria(Value *database, Value *criteria)
int b_col, b_row, e_col, e_row;
int field_ind;
sheet = database->v.cell_range.cell_a.sheet;
sheet = eval_sheet (database->v.cell_range.cell_a.sheet, ep->sheet);
b_col = criteria->v.cell_range.cell_a.col;
b_row = criteria->v.cell_range.cell_a.row;
e_col = criteria->v.cell_range.cell_b.col;
......@@ -231,7 +231,7 @@ parse_database_criteria(Value *database, Value *criteria)
if (cell == NULL || cell->value == NULL)
continue;
new_criteria = g_new(database_criteria_t, 1);
field_ind = find_column_of_field(database, cell->value);
field_ind = find_column_of_field (ep, database, cell->value);
if (field_ind == -1) {
free_criterias(criterias);
return NULL;
......@@ -269,12 +269,12 @@ parse_database_criteria(Value *database, Value *criteria)
/* Finds the cells from the given column that match the criteria.
*/
static GSList *
find_cells_that_match(Value *database, int field, GSList *criterias)
find_cells_that_match (const EvalPosition *ep, Value *database, int field, GSList *criterias)
{
Sheet *sheet;
GSList *current, *conditions, *cells;
int row, first_row, last_row, add_flag;
sheet = database->v.cell_range.cell_a.sheet;
sheet = eval_sheet (database->v.cell_range.cell_a.sheet, ep->sheet);
last_row = database->v.cell_range.cell_b.row;
cells = NULL;
first_row = database->v.cell_range.cell_a.row + 1;
......@@ -356,15 +356,15 @@ gnumeric_daverage (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
return function_error (ei, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
current = cells;
count = 0;
......@@ -420,15 +420,15 @@ gnumeric_dcount (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
return function_error (ei, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
current = cells;
count = 0;
......@@ -483,15 +483,15 @@ gnumeric_dcounta (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
return function_error (ei, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
current = cells;
count = 0;
......@@ -549,17 +549,17 @@ gnumeric_dget (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
error_message_set (ei->error, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
current = cells;
count = 0;
......@@ -619,15 +619,15 @@ gnumeric_dmax (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
return function_error (ei, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
if (cells == NULL)
return function_error (ei, gnumeric_err_NUM);
......@@ -688,15 +688,15 @@ gnumeric_dmin (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
return function_error (ei, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
if (cells == NULL)
return function_error (ei, gnumeric_err_NUM);
......@@ -757,16 +757,16 @@ gnumeric_dproduct (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
return function_error (ei, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
if (cells == NULL)
return function_error (ei, gnumeric_err_NUM);
......@@ -829,15 +829,15 @@ gnumeric_dstdev (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
return function_error (ei, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
if (cells == NULL)
return function_error (ei, gnumeric_err_NUM);
......@@ -900,15 +900,15 @@ gnumeric_dstdevp (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
return function_error (ei, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
if (cells == NULL)
return function_error (ei, gnumeric_err_NUM);
......@@ -969,15 +969,15 @@ gnumeric_dsum (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
return function_error (ei, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
if (cells == NULL)
return function_error (ei, gnumeric_err_NUM);
......@@ -1039,15 +1039,15 @@ gnumeric_dvar (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
return function_error (ei, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
if (cells == NULL)
return function_error (ei, gnumeric_err_NUM);
......@@ -1111,16 +1111,16 @@ gnumeric_dvarp (FunctionEvalInfo *ei, Value **argv)
database = argv[0];
criteria = argv[2];
field = find_column_of_field(database, argv[1]);
field = find_column_of_field (&ei->pos, database, argv[1]);
if (field < 0)
return function_error (ei, gnumeric_err_NUM);
criterias = parse_database_criteria(database, criteria);
criterias = parse_database_criteria (&ei->pos, database, criteria);
if (criterias == NULL)
return function_error (ei, gnumeric_err_NUM);
cells = find_cells_that_match(database, field, criterias);
cells = find_cells_that_match (&ei->pos, database, field, criterias);
if (cells == NULL)
return function_error (ei, gnumeric_err_NUM);
......
......@@ -147,7 +147,7 @@ static char *help_countblank = {
};
static Value *
gnumeric_countblank (FunctionEvalInfo *s, Value **args)
gnumeric_countblank (FunctionEvalInfo *ei, Value **args)
{
Sheet *sheet;
Value *range;
......@@ -156,7 +156,7 @@ gnumeric_countblank (FunctionEvalInfo *s, Value **args)
int count;
range = args[0];
sheet = range->v.cell_range.cell_a.sheet;
sheet = eval_sheet (range->v.cell_range.cell_a.sheet, ei->pos.sheet);
col_a = range->v.cell_range.cell_a.col;
col_b = range->v.cell_range.cell_b.col;
row_a = range->v.cell_range.cell_a.row;
......
......@@ -516,8 +516,7 @@ gnumeric_countif (FunctionEvalInfo *ei, Value **argv)
tmpvalue = items.test_value;
}
if (!(sheet = range->v.cell_range.cell_a.sheet))
sheet = ei->pos.sheet;
sheet = eval_sheet (range->v.cell_range.cell_a.sheet, ei->pos.sheet);
ret = sheet_cell_foreach_range (
sheet, TRUE,
range->v.cell_range.cell_a.col,
......@@ -633,13 +632,13 @@ gnumeric_sumif (FunctionEvalInfo *ei, Value **argv)
items.actual_range = FALSE;
ret = sheet_cell_foreach_range (
range->v.cell_range.cell_a.sheet, TRUE,
range->v.cell_range.cell_a.col,
range->v.cell_range.cell_a.row,
range->v.cell_range.cell_b.col,
range->v.cell_range.cell_b.row,
callback_function_criteria,
&items);
eval_sheet (range->v.cell_range.cell_a.sheet, ei->pos.sheet), TRUE,
range->v.cell_range.cell_a.col,
range->v.cell_range.cell_a.row,
range->v.cell_range.cell_b.col,
range->v.cell_range.cell_b.row,
callback_function_criteria,
&items);
if (tmpvalue)
value_release (tmpvalue);
......@@ -663,13 +662,14 @@ gnumeric_sumif (FunctionEvalInfo *ei, Value **argv)
items.current = items.list;
items.sum = items.total_num = 0;
ret = sheet_cell_foreach_range (
actual_range->v.cell_range.cell_a.sheet, TRUE,
actual_range->v.cell_range.cell_a.col,
actual_range->v.cell_range.cell_a.row,
actual_range->v.cell_range.cell_b.col,
actual_range->v.cell_range.cell_b.row,
callback_function_sumif,
&items);
eval_sheet (actual_range->v.cell_range.cell_a.sheet, ei->pos.sheet),
TRUE,
actual_range->v.cell_range.cell_a.col,
actual_range->v.cell_range.cell_a.row,
actual_range->v.cell_range.cell_b.col,
actual_range->v.cell_range.cell_b.row,
callback_function_sumif,
&items);
sum = items.sum;
}
......@@ -1893,14 +1893,15 @@ gnumeric_sumx2my2 (FunctionEvalInfo *ei, Value **argv)
if (values_x->type == VALUE_CELLRANGE) {
ret = sheet_cell_foreach_range (
values_x->v.cell_range.cell_a.sheet, TRUE,
values_x->v.cell_range.cell_a.col,
values_x->v.cell_range.cell_a.row,
values_x->v.cell_range.cell_b.col,
values_x->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_x);
eval_sheet (values_x->v.cell_range.cell_a.sheet, ei->pos.sheet),
TRUE,
values_x->v.cell_range.cell_a.col,
values_x->v.cell_range.cell_a.row,
values_x->v.cell_range.cell_b.col,
values_x->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_x);
if (ret == FALSE)
return function_error (ei, gnumeric_err_VALUE);
} else
......@@ -1908,13 +1909,13 @@ gnumeric_sumx2my2 (FunctionEvalInfo *ei, Value **argv)
if (values_y->type == VALUE_CELLRANGE) {
ret = sheet_cell_foreach_range (
values_y->v.cell_range.cell_a.sheet, TRUE,
values_y->v.cell_range.cell_a.col,
values_y->v.cell_range.cell_a.row,
values_y->v.cell_range.cell_b.col,
values_y->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_y);
eval_sheet (values_y->v.cell_range.cell_a.sheet, ei->pos.sheet), TRUE,
values_y->v.cell_range.cell_a.col,
values_y->v.cell_range.cell_a.row,
values_y->v.cell_range.cell_b.col,
values_y->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_y);
if (ret == FALSE)
return function_error (ei, gnumeric_err_VALUE);
} else
......@@ -1980,13 +1981,14 @@ gnumeric_sumx2py2 (FunctionEvalInfo *ei, Value **argv)
if (values_x->type == VALUE_CELLRANGE) {
ret = sheet_cell_foreach_range (
values_x->v.cell_range.cell_a.sheet, TRUE,
values_x->v.cell_range.cell_a.col,
values_x->v.cell_range.cell_a.row,
values_x->v.cell_range.cell_b.col,
values_x->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_x);
eval_sheet (values_x->v.cell_range.cell_a.sheet, ei->pos.sheet),
TRUE,
values_x->v.cell_range.cell_a.col,
values_x->v.cell_range.cell_a.row,
values_x->v.cell_range.cell_b.col,
values_x->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_x);
if (ret == FALSE)
return function_error (ei, gnumeric_err_VALUE);
} else
......@@ -1994,13 +1996,13 @@ gnumeric_sumx2py2 (FunctionEvalInfo *ei, Value **argv)
if (values_y->type == VALUE_CELLRANGE) {
ret = sheet_cell_foreach_range (
values_y->v.cell_range.cell_a.sheet, TRUE,
values_y->v.cell_range.cell_a.col,
values_y->v.cell_range.cell_a.row,
values_y->v.cell_range.cell_b.col,
values_y->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_y);
eval_sheet (values_y->v.cell_range.cell_a.sheet, ei->pos.sheet), TRUE,
values_y->v.cell_range.cell_a.col,
values_y->v.cell_range.cell_a.row,
values_y->v.cell_range.cell_b.col,
values_y->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_y);
if (ret == FALSE)
return function_error (ei, gnumeric_err_VALUE);
} else
......@@ -2066,13 +2068,13 @@ gnumeric_sumxmy2 (FunctionEvalInfo *ei, Value **argv)
if (values_x->type == VALUE_CELLRANGE) {
ret = sheet_cell_foreach_range (
values_x->v.cell_range.cell_a.sheet, TRUE,
values_x->v.cell_range.cell_a.col,
values_x->v.cell_range.cell_a.row,
values_x->v.cell_range.cell_b.col,
values_x->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_x);
eval_sheet (values_x->v.cell_range.cell_a.sheet, ei->pos.sheet), TRUE,
values_x->v.cell_range.cell_a.col,
values_x->v.cell_range.cell_a.row,
values_x->v.cell_range.cell_b.col,
values_x->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_x);
if (ret == FALSE)
return function_error (ei, gnumeric_err_VALUE);
} else
......@@ -2080,13 +2082,13 @@ gnumeric_sumxmy2 (FunctionEvalInfo *ei, Value **argv)
if (values_y->type == VALUE_CELLRANGE) {
ret = sheet_cell_foreach_range (
values_y->v.cell_range.cell_a.sheet, TRUE,
values_y->v.cell_range.cell_a.col,
values_y->v.cell_range.cell_a.row,
values_y->v.cell_range.cell_b.col,
values_y->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_y);
eval_sheet (values_y->v.cell_range.cell_a.sheet, ei->pos.sheet), TRUE,
values_y->v.cell_range.cell_a.col,
values_y->v.cell_range.cell_a.row,
values_y->v.cell_range.cell_b.col,
values_y->v.cell_range.cell_b.row,
callback_function_sumxy,
&items_y);
if (ret == FALSE)
return function_error (ei, gnumeric_err_VALUE);
} else
......@@ -2354,23 +2356,21 @@ validate_range_numeric_matrix (const EvalPosition *ep, Value * matrix,
return FALSE;
if (matrix->v.cell_range.cell_a.sheet !=
matrix->v.cell_range.cell_b.sheet)
{
matrix->v.cell_range.cell_b.sheet) {
*error_string = _("#3D MULT?");
return TRUE;
}
res = sheet_cell_foreach_range (
matrix->v.cell_range.cell_a.sheet, TRUE,
matrix->v.cell_range.cell_a.col,
matrix->v.cell_range.cell_a.row,
matrix->v.cell_range.cell_b.col,
matrix->v.cell_range.cell_b.row,
callback_function_mmult_validate,
&cell_count);
if (!res || cell_count != (*rows * *cols))
{
eval_sheet (matrix->v.cell_range.cell_a.sheet, ep->sheet), TRUE,
matrix->v.cell_range.cell_a.col,
matrix->v.cell_range.cell_a.row,
matrix->v.cell_range.cell_b.col,
matrix->v.cell_range.cell_b.row,
callback_function_mmult_validate,
&cell_count);
if (!res || cell_count != (*rows * *cols)) {
/* As specified in the Excel Docs */
*error_string = gnumeric_err_VALUE;
return TRUE;
......
......@@ -236,7 +236,7 @@ gnumeric_rank (FunctionEvalInfo *ei, Value **argv)
p.order = 0;
p.rank = 1;
ret = sheet_cell_foreach_range (
argv[1]->v.cell_range.cell_a.sheet, TRUE,
eval_sheet (argv[1]->v.cell_range.cell_a.sheet, ei->pos.sheet), TRUE,
argv[1]->v.cell_range.cell_a.col,
argv[1]->v.cell_range.cell_a.row,
argv[1]->v.cell_range.cell_b.col,
......@@ -1291,7 +1291,7 @@ gnumeric_chitest (FunctionEvalInfo *ei, Value **argv)
GSList *tmp;
int col, row, ret, dof;
sheet = argv[0]->v.cell.sheet;
sheet = eval_sheet (argv[0]->v.cell.sheet, ei->pos.sheet);
col = argv[0]->v.cell.col;
row = argv[0]->v.cell.row;
p1.cols = argv[0]->v.cell_range.cell_b.col -
......@@ -2346,13 +2346,13 @@ gnumeric_prob (FunctionEvalInfo *ei, Value **argv)
if (range_x->type == VALUE_CELLRANGE) {
ret = sheet_cell_foreach_range (
range_x->v.cell_range.cell_a.sheet, TRUE,
range_x->v.cell_range.cell_a.col,
range_x->v.cell_range.cell_a.row,
range_x->v.cell_range.cell_b.col,
range_x->v.cell_range.cell_b.row,
callback_function_list,
&items_x);
eval_sheet (range_x->v.cell_range.cell_a.sheet, ei->pos.sheet), TRUE,
range_x->v.cell_range.cell_a.col,
range_x->v.cell_range.cell_a.row,
range_x->v.cell_range.cell_b.col,
range_x->v.cell_range.cell_b.row,
callback_function_list,
&items_x);
if (ret == FALSE) {
list1 = items_x.list;
list2 = items_prob.list;
......@@ -2374,13 +2374,13 @@ gnumeric_prob (FunctionEvalInfo *ei, Value **argv)
if (prob_range->type == VALUE_CELLRANGE) {
ret = sheet_cell_foreach_range (
prob_range->v.cell_range.cell_a.sheet, TRUE,
prob_range->v.cell_range.cell_a.col,