Commit c3942b97 authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa
Browse files

Revert the arguments if they are in a different order.

1999-03-08  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/sheet.c (sheet_cell_foreach_range): Revert the arguments if
	they are in a different order.
parent 8719d48a
1999-03-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_cell_foreach_range): Revert the arguments if
they are in a different order.
1999-03-08 Takashi Matsuda <matsu@arch.comp.kyutech.ac.jp>
* plugins: new text plugin.
......
1999-03-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_cell_foreach_range): Revert the arguments if
they are in a different order.
1999-03-08 Takashi Matsuda <matsu@arch.comp.kyutech.ac.jp>
* plugins: new text plugin.
......
1999-03-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_cell_foreach_range): Revert the arguments if
they are in a different order.
1999-03-08 Takashi Matsuda <matsu@arch.comp.kyutech.ac.jp>
* plugins: new text plugin.
......
1999-03-08 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_cell_foreach_range): Revert the arguments if
they are in a different order.
1999-03-08 Takashi Matsuda <matsu@arch.comp.kyutech.ac.jp>
* plugins: new text plugin.
......
......@@ -98,7 +98,7 @@ function_iterate_do_value (Sheet *sheet,
cell_get_abs_col_row (&value->v.cell_range.cell_b,
eval_col, eval_row,
&end_col, &end_row);
ret = sheet_cell_foreach_range (
sheet, TRUE,
start_col, start_row,
......
......@@ -1782,6 +1782,8 @@ sheet_cell_fetch (Sheet *sheet, int col, int row)
return cell;
}
#define SWAP_INT(a,b) do { int t; t = a; a = b; b = t; } while (0)
/**
* sheet_cell_foreach_range:
*
......@@ -1807,7 +1809,13 @@ sheet_cell_foreach_range (Sheet *sheet, int only_existing,
g_return_val_if_fail (sheet != NULL, FALSE);
g_return_val_if_fail (IS_SHEET (sheet), FALSE);
g_return_val_if_fail (callback != NULL, FALSE);
if (start_col > end_col)
SWAP_INT (start_col, end_col);
if (start_row > end_row)
SWAP_INT (start_row, end_row);
col = sheet->cols_info;
for (; col; col = col->next){
ColRowInfo *ci = col->data;
......
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