Commit c2687829 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Rename ea_status -> selection_descriptor Moved ea_entry here and called it


2000-04-24  Jody Goldberg <jgoldberg@home.com>

	* src/workbook-private.h : Rename ea_status -> selection_descriptor
	Moved ea_entry here and called it edit_line.
	* src/workbook.c (workbook_get_entry) : new routine.

	* src/dialogs/function-select.glade : Made this a dialog, not a popup.

	* src/summary.c (summary_item_free) : format police.
	* src/value-sheet.c (value_area_foreach) : Ditto.

	* src/sheet.c (sheet_new) : Init the update flags to FALSE, rather
	  than TRUE now that the system seems to be getting their initial
	  state correct when importing, paging and the like.
	(sheet_load_cell_val) : Use workbook_get_entry.
	(sheet_find_boundary_horizontal) : format police.
	(sheet_find_boundary_vertical) : Ditto.
	(sheet_range_splits_array) : Ditto.
	(sheet_delete_{cols,rows}) : Ditto.
	(sheet_restore_row_col_sizes) : Ditto.
	(sheet_col_get_distance_{pixels,pts}) : Ditto.
	(sheet_row_get_distance_pixels) : Ditto.
	(sheet_row_get_distance_pts) : Ditto, Init accumulator.

	* src/selection.c (sheet_selection_set) : format police.
	(selection_check_for_array) : Ditto.
	(sheet_selection_walk_step) : Ditto.
	* src/sheet-view.c (horizontal_scroll_event) : Ditto.
	(vertical_scroll_event) : Ditto.
	* src/dialogs/dialog-cell-format.c : Ditto.
	* src/dialogs/dialog-printer.c : Ditto.
	* src/dialogs/dialog-workbook-attr.c : Ditto.
	* src/functions/fn-eng.c : Ditto.
	* src/functions/fn-lookup.c : Ditto.
	* src/functions/fn-string.c : Ditto.

	* src/pattern.c (gnumeric_sheet_patterns) : Add a few patterns for
	  applix.  More are needed, and these are not available in the format
	  dialog yet.

	* src/number-match.c (compute_value) : Use g_strtod.
	(format_match) : Ditto.

	* src/item-edit.c : Use workbook_get_entry.

	* src/item-bar.c (item_bar_event) : format police.

	* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_sheet) : Do not set
	  the focus directly.  Leave that to workbook_start_editing.
	(gnumeric_sheet_new) : Use workbook_get_entry.

	* src/format.c (render_number) : format police.

	* src/complex.c (complex_from_string) : Use g_strtod.
	* src/functions/fn-database.c : Ditto.

	* src/colrow.c (cb_row_col_visibility) : format police.

	* src/main.c (gnumeric_main) : Move the workbook_style_test to the
	  empty case.

	* src/mstyle.c (mstyle_set_pattern) : Add some safety.

	* src/number-match.c (format_match) : Handle empties.
parent d68b0219
2000-04-24 Jody Goldberg <jgoldberg@home.com>
* src/workbook-private.h : Rename ea_status -> selection_descriptor
Moved ea_entry here and called it edit_line.
* src/workbook.c (workbook_get_entry) : new routine.
* src/dialogs/function-select.glade : Made this a dialog, not a popup.
* src/summary.c (summary_item_free) : format police.
* src/value-sheet.c (value_area_foreach) : Ditto.
* src/sheet.c (sheet_new) : Init the update flags to FALSE, rather
than TRUE now that the system seems to be getting their initial
state correct when importing, paging and the like.
(sheet_load_cell_val) : Use workbook_get_entry.
(sheet_find_boundary_horizontal) : format police.
(sheet_find_boundary_vertical) : Ditto.
(sheet_range_splits_array) : Ditto.
(sheet_delete_{cols,rows}) : Ditto.
(sheet_restore_row_col_sizes) : Ditto.
(sheet_col_get_distance_{pixels,pts}) : Ditto.
(sheet_row_get_distance_pixels) : Ditto.
(sheet_row_get_distance_pts) : Ditto, Init accumulator.
* src/selection.c (sheet_selection_set) : format police.
(selection_check_for_array) : Ditto.
(sheet_selection_walk_step) : Ditto.
* src/sheet-view.c (horizontal_scroll_event) : Ditto.
(vertical_scroll_event) : Ditto.
* src/dialogs/dialog-cell-format.c : Ditto.
* src/dialogs/dialog-printer.c : Ditto.
* src/dialogs/dialog-workbook-attr.c : Ditto.
* src/functions/fn-eng.c : Ditto.
* src/functions/fn-lookup.c : Ditto.
* src/functions/fn-string.c : Ditto.
* src/pattern.c (gnumeric_sheet_patterns) : Add a few patterns for
applix. More are needed, and these are not available in the format
dialog yet.
* src/number-match.c (compute_value) : Use g_strtod.
(format_match) : Ditto.
* src/item-edit.c : Use workbook_get_entry.
* src/item-bar.c (item_bar_event) : format police.
* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_sheet) : Do not set
the focus directly. Leave that to workbook_start_editing.
(gnumeric_sheet_new) : Use workbook_get_entry.
* src/format.c (render_number) : format police.
* src/complex.c (complex_from_string) : Use g_strtod.
* src/functions/fn-database.c : Ditto.
* src/colrow.c (cb_row_col_visibility) : format police.
* src/main.c (gnumeric_main) : Move the workbook_style_test to the
empty case.
* src/mstyle.c (mstyle_set_pattern) : Add some safety.
* src/number-match.c (format_match) : Handle empties.
2000-04-22 Michael Meeks <michael@helixcode.com>
* src/test.c (zero_stats, dump_stats): implement.
......
2000-04-24 Jody Goldberg <jgoldberg@home.com>
* src/workbook-private.h : Rename ea_status -> selection_descriptor
Moved ea_entry here and called it edit_line.
* src/workbook.c (workbook_get_entry) : new routine.
* src/dialogs/function-select.glade : Made this a dialog, not a popup.
* src/summary.c (summary_item_free) : format police.
* src/value-sheet.c (value_area_foreach) : Ditto.
* src/sheet.c (sheet_new) : Init the update flags to FALSE, rather
than TRUE now that the system seems to be getting their initial
state correct when importing, paging and the like.
(sheet_load_cell_val) : Use workbook_get_entry.
(sheet_find_boundary_horizontal) : format police.
(sheet_find_boundary_vertical) : Ditto.
(sheet_range_splits_array) : Ditto.
(sheet_delete_{cols,rows}) : Ditto.
(sheet_restore_row_col_sizes) : Ditto.
(sheet_col_get_distance_{pixels,pts}) : Ditto.
(sheet_row_get_distance_pixels) : Ditto.
(sheet_row_get_distance_pts) : Ditto, Init accumulator.
* src/selection.c (sheet_selection_set) : format police.
(selection_check_for_array) : Ditto.
(sheet_selection_walk_step) : Ditto.
* src/sheet-view.c (horizontal_scroll_event) : Ditto.
(vertical_scroll_event) : Ditto.
* src/dialogs/dialog-cell-format.c : Ditto.
* src/dialogs/dialog-printer.c : Ditto.
* src/dialogs/dialog-workbook-attr.c : Ditto.
* src/functions/fn-eng.c : Ditto.
* src/functions/fn-lookup.c : Ditto.
* src/functions/fn-string.c : Ditto.
* src/pattern.c (gnumeric_sheet_patterns) : Add a few patterns for
applix. More are needed, and these are not available in the format
dialog yet.
* src/number-match.c (compute_value) : Use g_strtod.
(format_match) : Ditto.
* src/item-edit.c : Use workbook_get_entry.
* src/item-bar.c (item_bar_event) : format police.
* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_sheet) : Do not set
the focus directly. Leave that to workbook_start_editing.
(gnumeric_sheet_new) : Use workbook_get_entry.
* src/format.c (render_number) : format police.
* src/complex.c (complex_from_string) : Use g_strtod.
* src/functions/fn-database.c : Ditto.
* src/colrow.c (cb_row_col_visibility) : format police.
* src/main.c (gnumeric_main) : Move the workbook_style_test to the
empty case.
* src/mstyle.c (mstyle_set_pattern) : Add some safety.
* src/number-match.c (format_match) : Handle empties.
2000-04-22 Michael Meeks <michael@helixcode.com>
* src/test.c (zero_stats, dump_stats): implement.
......
2000-04-24 Jody Goldberg <jgoldberg@home.com>
* src/workbook-private.h : Rename ea_status -> selection_descriptor
Moved ea_entry here and called it edit_line.
* src/workbook.c (workbook_get_entry) : new routine.
* src/dialogs/function-select.glade : Made this a dialog, not a popup.
* src/summary.c (summary_item_free) : format police.
* src/value-sheet.c (value_area_foreach) : Ditto.
* src/sheet.c (sheet_new) : Init the update flags to FALSE, rather
than TRUE now that the system seems to be getting their initial
state correct when importing, paging and the like.
(sheet_load_cell_val) : Use workbook_get_entry.
(sheet_find_boundary_horizontal) : format police.
(sheet_find_boundary_vertical) : Ditto.
(sheet_range_splits_array) : Ditto.
(sheet_delete_{cols,rows}) : Ditto.
(sheet_restore_row_col_sizes) : Ditto.
(sheet_col_get_distance_{pixels,pts}) : Ditto.
(sheet_row_get_distance_pixels) : Ditto.
(sheet_row_get_distance_pts) : Ditto, Init accumulator.
* src/selection.c (sheet_selection_set) : format police.
(selection_check_for_array) : Ditto.
(sheet_selection_walk_step) : Ditto.
* src/sheet-view.c (horizontal_scroll_event) : Ditto.
(vertical_scroll_event) : Ditto.
* src/dialogs/dialog-cell-format.c : Ditto.
* src/dialogs/dialog-printer.c : Ditto.
* src/dialogs/dialog-workbook-attr.c : Ditto.
* src/functions/fn-eng.c : Ditto.
* src/functions/fn-lookup.c : Ditto.
* src/functions/fn-string.c : Ditto.
* src/pattern.c (gnumeric_sheet_patterns) : Add a few patterns for
applix. More are needed, and these are not available in the format
dialog yet.
* src/number-match.c (compute_value) : Use g_strtod.
(format_match) : Ditto.
* src/item-edit.c : Use workbook_get_entry.
* src/item-bar.c (item_bar_event) : format police.
* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_sheet) : Do not set
the focus directly. Leave that to workbook_start_editing.
(gnumeric_sheet_new) : Use workbook_get_entry.
* src/format.c (render_number) : format police.
* src/complex.c (complex_from_string) : Use g_strtod.
* src/functions/fn-database.c : Ditto.
* src/colrow.c (cb_row_col_visibility) : format police.
* src/main.c (gnumeric_main) : Move the workbook_style_test to the
empty case.
* src/mstyle.c (mstyle_set_pattern) : Add some safety.
* src/number-match.c (format_match) : Handle empties.
2000-04-22 Michael Meeks <michael@helixcode.com>
* src/test.c (zero_stats, dump_stats): implement.
......
2000-04-24 Jody Goldberg <jgoldberg@home.com>
* src/workbook-private.h : Rename ea_status -> selection_descriptor
Moved ea_entry here and called it edit_line.
* src/workbook.c (workbook_get_entry) : new routine.
* src/dialogs/function-select.glade : Made this a dialog, not a popup.
* src/summary.c (summary_item_free) : format police.
* src/value-sheet.c (value_area_foreach) : Ditto.
* src/sheet.c (sheet_new) : Init the update flags to FALSE, rather
than TRUE now that the system seems to be getting their initial
state correct when importing, paging and the like.
(sheet_load_cell_val) : Use workbook_get_entry.
(sheet_find_boundary_horizontal) : format police.
(sheet_find_boundary_vertical) : Ditto.
(sheet_range_splits_array) : Ditto.
(sheet_delete_{cols,rows}) : Ditto.
(sheet_restore_row_col_sizes) : Ditto.
(sheet_col_get_distance_{pixels,pts}) : Ditto.
(sheet_row_get_distance_pixels) : Ditto.
(sheet_row_get_distance_pts) : Ditto, Init accumulator.
* src/selection.c (sheet_selection_set) : format police.
(selection_check_for_array) : Ditto.
(sheet_selection_walk_step) : Ditto.
* src/sheet-view.c (horizontal_scroll_event) : Ditto.
(vertical_scroll_event) : Ditto.
* src/dialogs/dialog-cell-format.c : Ditto.
* src/dialogs/dialog-printer.c : Ditto.
* src/dialogs/dialog-workbook-attr.c : Ditto.
* src/functions/fn-eng.c : Ditto.
* src/functions/fn-lookup.c : Ditto.
* src/functions/fn-string.c : Ditto.
* src/pattern.c (gnumeric_sheet_patterns) : Add a few patterns for
applix. More are needed, and these are not available in the format
dialog yet.
* src/number-match.c (compute_value) : Use g_strtod.
(format_match) : Ditto.
* src/item-edit.c : Use workbook_get_entry.
* src/item-bar.c (item_bar_event) : format police.
* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_sheet) : Do not set
the focus directly. Leave that to workbook_start_editing.
(gnumeric_sheet_new) : Use workbook_get_entry.
* src/format.c (render_number) : format police.
* src/complex.c (complex_from_string) : Use g_strtod.
* src/functions/fn-database.c : Ditto.
* src/colrow.c (cb_row_col_visibility) : format police.
* src/main.c (gnumeric_main) : Move the workbook_style_test to the
empty case.
* src/mstyle.c (mstyle_set_pattern) : Add some safety.
* src/number-match.c (format_match) : Handle empties.
2000-04-22 Michael Meeks <michael@helixcode.com>
* src/test.c (zero_stats, dump_stats): implement.
......
2000-04-24 Jody Goldberg <jgoldberg@home.com>
* src/workbook-private.h : Rename ea_status -> selection_descriptor
Moved ea_entry here and called it edit_line.
* src/workbook.c (workbook_get_entry) : new routine.
* src/dialogs/function-select.glade : Made this a dialog, not a popup.
* src/summary.c (summary_item_free) : format police.
* src/value-sheet.c (value_area_foreach) : Ditto.
* src/sheet.c (sheet_new) : Init the update flags to FALSE, rather
than TRUE now that the system seems to be getting their initial
state correct when importing, paging and the like.
(sheet_load_cell_val) : Use workbook_get_entry.
(sheet_find_boundary_horizontal) : format police.
(sheet_find_boundary_vertical) : Ditto.
(sheet_range_splits_array) : Ditto.
(sheet_delete_{cols,rows}) : Ditto.
(sheet_restore_row_col_sizes) : Ditto.
(sheet_col_get_distance_{pixels,pts}) : Ditto.
(sheet_row_get_distance_pixels) : Ditto.
(sheet_row_get_distance_pts) : Ditto, Init accumulator.
* src/selection.c (sheet_selection_set) : format police.
(selection_check_for_array) : Ditto.
(sheet_selection_walk_step) : Ditto.
* src/sheet-view.c (horizontal_scroll_event) : Ditto.
(vertical_scroll_event) : Ditto.
* src/dialogs/dialog-cell-format.c : Ditto.
* src/dialogs/dialog-printer.c : Ditto.
* src/dialogs/dialog-workbook-attr.c : Ditto.
* src/functions/fn-eng.c : Ditto.
* src/functions/fn-lookup.c : Ditto.
* src/functions/fn-string.c : Ditto.
* src/pattern.c (gnumeric_sheet_patterns) : Add a few patterns for
applix. More are needed, and these are not available in the format
dialog yet.
* src/number-match.c (compute_value) : Use g_strtod.
(format_match) : Ditto.
* src/item-edit.c : Use workbook_get_entry.
* src/item-bar.c (item_bar_event) : format police.
* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_sheet) : Do not set
the focus directly. Leave that to workbook_start_editing.
(gnumeric_sheet_new) : Use workbook_get_entry.
* src/format.c (render_number) : format police.
* src/complex.c (complex_from_string) : Use g_strtod.
* src/functions/fn-database.c : Ditto.
* src/colrow.c (cb_row_col_visibility) : format police.
* src/main.c (gnumeric_main) : Move the workbook_style_test to the
empty case.
* src/mstyle.c (mstyle_set_pattern) : Add some safety.
* src/number-match.c (format_match) : Handle empties.
2000-04-22 Michael Meeks <michael@helixcode.com>
* src/test.c (zero_stats, dump_stats): implement.
......
2000-04-24 Jody Goldberg <jgoldberg@home.com>
* src/workbook-private.h : Rename ea_status -> selection_descriptor
Moved ea_entry here and called it edit_line.
* src/workbook.c (workbook_get_entry) : new routine.
* src/dialogs/function-select.glade : Made this a dialog, not a popup.
* src/summary.c (summary_item_free) : format police.
* src/value-sheet.c (value_area_foreach) : Ditto.
* src/sheet.c (sheet_new) : Init the update flags to FALSE, rather
than TRUE now that the system seems to be getting their initial
state correct when importing, paging and the like.
(sheet_load_cell_val) : Use workbook_get_entry.
(sheet_find_boundary_horizontal) : format police.
(sheet_find_boundary_vertical) : Ditto.
(sheet_range_splits_array) : Ditto.
(sheet_delete_{cols,rows}) : Ditto.
(sheet_restore_row_col_sizes) : Ditto.
(sheet_col_get_distance_{pixels,pts}) : Ditto.
(sheet_row_get_distance_pixels) : Ditto.
(sheet_row_get_distance_pts) : Ditto, Init accumulator.
* src/selection.c (sheet_selection_set) : format police.
(selection_check_for_array) : Ditto.
(sheet_selection_walk_step) : Ditto.
* src/sheet-view.c (horizontal_scroll_event) : Ditto.
(vertical_scroll_event) : Ditto.
* src/dialogs/dialog-cell-format.c : Ditto.
* src/dialogs/dialog-printer.c : Ditto.
* src/dialogs/dialog-workbook-attr.c : Ditto.
* src/functions/fn-eng.c : Ditto.
* src/functions/fn-lookup.c : Ditto.
* src/functions/fn-string.c : Ditto.
* src/pattern.c (gnumeric_sheet_patterns) : Add a few patterns for
applix. More are needed, and these are not available in the format
dialog yet.
* src/number-match.c (compute_value) : Use g_strtod.
(format_match) : Ditto.
* src/item-edit.c : Use workbook_get_entry.
* src/item-bar.c (item_bar_event) : format police.
* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_sheet) : Do not set
the focus directly. Leave that to workbook_start_editing.
(gnumeric_sheet_new) : Use workbook_get_entry.
* src/format.c (render_number) : format police.
* src/complex.c (complex_from_string) : Use g_strtod.
* src/functions/fn-database.c : Ditto.
* src/colrow.c (cb_row_col_visibility) : format police.
* src/main.c (gnumeric_main) : Move the workbook_style_test to the
empty case.
* src/mstyle.c (mstyle_set_pattern) : Add some safety.
* src/number-match.c (format_match) : Handle empties.
2000-04-22 Michael Meeks <michael@helixcode.com>
* src/test.c (zero_stats, dump_stats): implement.
......
2000-04-24 Jody Goldberg <jgoldberg@home.com>
* src/workbook-private.h : Rename ea_status -> selection_descriptor
Moved ea_entry here and called it edit_line.
* src/workbook.c (workbook_get_entry) : new routine.
* src/dialogs/function-select.glade : Made this a dialog, not a popup.
* src/summary.c (summary_item_free) : format police.
* src/value-sheet.c (value_area_foreach) : Ditto.
* src/sheet.c (sheet_new) : Init the update flags to FALSE, rather
than TRUE now that the system seems to be getting their initial
state correct when importing, paging and the like.
(sheet_load_cell_val) : Use workbook_get_entry.
(sheet_find_boundary_horizontal) : format police.
(sheet_find_boundary_vertical) : Ditto.
(sheet_range_splits_array) : Ditto.
(sheet_delete_{cols,rows}) : Ditto.
(sheet_restore_row_col_sizes) : Ditto.
(sheet_col_get_distance_{pixels,pts}) : Ditto.
(sheet_row_get_distance_pixels) : Ditto.
(sheet_row_get_distance_pts) : Ditto, Init accumulator.
* src/selection.c (sheet_selection_set) : format police.
(selection_check_for_array) : Ditto.
(sheet_selection_walk_step) : Ditto.
* src/sheet-view.c (horizontal_scroll_event) : Ditto.
(vertical_scroll_event) : Ditto.
* src/dialogs/dialog-cell-format.c : Ditto.
* src/dialogs/dialog-printer.c : Ditto.
* src/dialogs/dialog-workbook-attr.c : Ditto.
* src/functions/fn-eng.c : Ditto.
* src/functions/fn-lookup.c : Ditto.
* src/functions/fn-string.c : Ditto.
* src/pattern.c (gnumeric_sheet_patterns) : Add a few patterns for
applix. More are needed, and these are not available in the format
dialog yet.
* src/number-match.c (compute_value) : Use g_strtod.
(format_match) : Ditto.
* src/item-edit.c : Use workbook_get_entry.
* src/item-bar.c (item_bar_event) : format police.
* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_sheet) : Do not set
the focus directly. Leave that to workbook_start_editing.
(gnumeric_sheet_new) : Use workbook_get_entry.
* src/format.c (render_number) : format police.
* src/complex.c (complex_from_string) : Use g_strtod.
* src/functions/fn-database.c : Ditto.
* src/colrow.c (cb_row_col_visibility) : format police.
* src/main.c (gnumeric_main) : Move the workbook_style_test to the
empty case.
* src/mstyle.c (mstyle_set_pattern) : Add some safety.
* src/number-match.c (format_match) : Handle empties.
2000-04-22 Michael Meeks <michael@helixcode.com>
* src/test.c (zero_stats, dump_stats): implement.
......
......@@ -101,7 +101,7 @@ criteria_test_greater_or_equal(Value *x, Value *y)
}
/* Finds a column index of a field.
/* Finds a column index of a field.
*/
static int
find_column_of_field (const EvalPosition *ep, Value *database, Value *field)
......@@ -115,7 +115,7 @@ find_column_of_field (const EvalPosition *ep, Value *database, Value *field)
offset = database->v.cell_range.cell_b.col -
database->v.cell_range.cell_a.col;
if (field->type == VALUE_INTEGER)
if (field->type == VALUE_INTEGER)
return value_get_as_int (field) + offset - 1;
if (field->type != VALUE_STRING)
......@@ -205,14 +205,13 @@ parse_criteria(const char *criteria, criteria_test_fun_t *fun,
*fun = (criteria_test_fun_t) criteria_test_equal;
len=0;
}
tmp = strtod(criteria+len, &p);
tmp = g_strtod(criteria+len, &p);
if (p == criteria+len || *p != '\0')
*test_value = value_new_string (criteria+len);
else
*test_value = value_new_float (tmp);
}
......@@ -258,7 +257,7 @@ parse_criteria_range(Sheet *sheet, int b_col, int b_row, int e_col, int e_row,
else
cond->column = j-b_col;
g_free (cell_str);
conditions = g_slist_append(conditions, cond);
}
......@@ -369,7 +368,7 @@ find_cells_that_match (Sheet *sheet, Value *database,
/* Finds the rows from the given database that match the criteria.
*/
GSList *
find_rows_that_match (Sheet *sheet, int first_col, int first_row,
find_rows_that_match (Sheet *sheet, int first_col, int first_row,
int last_col, int last_row,
GSList *criterias, gboolean unique_only)
{
......@@ -379,7 +378,7 @@ find_rows_that_match (Sheet *sheet, int first_col, int first_row,
for (row=first_row; row<=last_row; row++) {
Cell *test_cell;
current = criterias;
add_flag = 1;
for (current = criterias; current != NULL;
......@@ -394,7 +393,7 @@ find_rows_that_match (Sheet *sheet, int first_col, int first_row,
func_criteria_t *cond = conditions->data;
test_cell =
sheet_cell_get(sheet,
sheet_cell_get(sheet,
first_col + cond->column, row);
if (test_cell == NULL ||
test_cell->value == NULL)
......@@ -528,7 +527,7 @@ gnumeric_daverage (FunctionEvalInfo *ei, Value **argv)
if (criterias == NULL)
return value_new_error (ei->pos, gnumeric_err_NUM);
sheet = eval_sheet (database->v.cell_range.cell_a.sheet,
sheet = eval_sheet (database->v.cell_range.cell_a.sheet,
ei->pos->sheet);
cells = find_cells_that_match (sheet, database, field, criterias);
......@@ -656,7 +655,7 @@ gnumeric_dcounta (FunctionEvalInfo *ei, Value **argv)
if (criterias == NULL)
return value_new_error (ei->pos, gnumeric_err_NUM);
sheet = eval_sheet (database->v.cell_range.cell_a.sheet,
sheet = eval_sheet (database->v.cell_range.cell_a.sheet,
ei->pos->sheet);
cells = find_cells_that_match (sheet, database, field, criterias);
......@@ -721,7 +720,7 @@ gnumeric_dget (FunctionEvalInfo *ei, Value **argv)
if (criterias == NULL)
return value_new_error (ei->pos, gnumeric_err_NUM);
sheet = eval_sheet (database->v.cell_range.cell_a.sheet,
sheet = eval_sheet (database->v.cell_range.cell_a.sheet,
ei->pos->sheet);
cells = find_cells_that_match (sheet, database, field, criterias);
......@@ -1127,7 +1126,7 @@ gnumeric_dsum (FunctionEvalInfo *ei, Value **argv)
if (criterias == NULL)
return value_new_error (ei->pos, gnumeric_err_NUM);
sheet = eval_sheet (database->v.cell_range.cell_a.sheet,
sheet = eval_sheet (database->v.cell_range.cell_a.sheet,
ei->pos->sheet);
cells = find_cells_that_match (sheet, database, field, criterias);
if (cells == NULL) {
......@@ -1194,7 +1193,7 @@ gnumeric_dvar (FunctionEvalInfo *ei, Value **argv)
if (criterias == NULL)
return value_new_error (ei->pos, gnumeric_err_NUM);
sheet = eval_sheet (database->v.cell_range.cell_a.sheet,
sheet = eval_sheet (database->v.cell_range.cell_a.sheet,
ei->pos->sheet);
cells = find_cells_that_match (sheet, database, field, criterias);
if (cells == NULL) {
......@@ -1274,7 +1273,7 @@ gnumeric_dvarp (FunctionEvalInfo *ei, Value **argv)
current = cells;
setup_stat_closure (&p);
while (current != NULL) {
Cell *cell = current->data;
......@@ -1338,7 +1337,7 @@ void
database_functions_init(void)
{
FunctionCategory *cat = function_get_category (_("Database"));
function_add_args (cat, "daverage", "r?r",
"database,field,criteria",
&help_daverage, gnumeric_daverage );
......
......@@ -1766,8 +1766,7 @@ gnumeric_delta (FunctionEvalInfo *ei, Value **argv)
vy = value_new_int (0);
/* Promote to the largest value */
switch ((vx->type > vy->type) ? vx->type : vy->type)
{
switch ((vx->type > vy->type) ? vx->type : vy->type) {
case VALUE_BOOLEAN:
/* Only happens when both are bool */
ans = vx->v.v_bool == vy->v.v_bool;
......@@ -1821,8 +1820,7 @@ gnumeric_gestep (FunctionEvalInfo *ei, Value **argv)
vy = value_new_int (0);
/* Promote to the largest value */
switch ((vx->type > vy->type) ? vx->type : vy->type)
{
switch ((vx->type > vy->type) ? vx->type : vy->type) {
case VALUE_BOOLEAN:
/* Only happens when both are bool */
ans = vx->v.v_bool >= vy->v.v_bool;
......
......@@ -812,8 +812,7 @@ gnumeric_column (FunctionEvalInfo *ei, GList *nodes)
return value_new_int (cell_ref_get_abs_col (&expr->u.ref,
ei->pos) + 1);
if (expr->oper == OPER_CONSTANT &&
expr->u.constant->type == VALUE_CELLRANGE)
{
expr->u.constant->type == VALUE_CELLRANGE) {
int i, j, col;
Value const * range = expr->u.constant;
CellRef const * a = &range->v.cell_range.cell_a;
......@@ -906,8 +905,7 @@ gnumeric_offset (FunctionEvalInfo *ei, Value **args)
return value_new_error (ei->pos, gnumeric_err_REF);
/* Special case of a single cell */
if (width == 1 && height == 1)
{
if (width == 1 && height == 1) {
/* FIXME FIXME : do we need to check for recalc here ?? */
Cell const * c =
sheet_cell_fetch (eval_sheet (a.sheet, ei->pos->sheet),
......@@ -952,8 +950,7 @@ gnumeric_row (FunctionEvalInfo *ei, GList *nodes)
return value_new_int (cell_ref_get_abs_row (&expr->u.ref,
ei->pos) + 1);