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

renamed from sheet_cell_formula_{link,unlink}.


2000-06-05  Jody Goldberg <jgoldberg@home.com>

	* src/sheet.c (sheet_cell_expr_{link,unlink}) : renamed from
	  sheet_cell_formula_{link,unlink}.

	* src/cell.c (cell_relocate) : Doh! use the offset flags now that they
	  are being passed.

	* src/clipboard.c (paste_cell) : Renamed from paste_cell_flags.

	* src/expr.c (compare) : value_is_empty_cell -> VALUE_IS_EMPTY.

	* src/value.c (VALUE_IS_EMPTY) : rename from value_is_empty_cell.

	* src/sheet-private.h : Add resize_scrollbar.

	* src/sheet.c (sheet_{col,row}_add) : Use resize_scrollbar flag rather
	  than manually updating the scrolling bar.
	(sheet_update) : Handle resize_scrollbar.
	(sheet_cell_expr_link) : renamed from sheet_cell_formula_link.
	(sheet_cell_expr_unlink) : renamed from sheet_cell_formula_unlink.
parent 82da7fbe
...@@ -7,6 +7,7 @@ Release Critical ...@@ -7,6 +7,7 @@ Release Critical
- Changing a name that is in use causes a crash. - Changing a name that is in use causes a crash.
- The max row/col canvas scroll size is still hard coded. - The max row/col canvas scroll size is still hard coded.
- Resize row/col undo is unfinished. - Resize row/col undo is unfinished.
- changing col/row sizes does not mark a sheet dirty.
- Saving xml should not rely on changing the textdomain to disable translation - Saving xml should not rely on changing the textdomain to disable translation
of TRUE/FALSE. of TRUE/FALSE.
...@@ -24,9 +25,6 @@ Long term breakage ...@@ -24,9 +25,6 @@ Long term breakage
and remove decimals. and remove decimals.
- Auto resize needs to handle empty cells. - Auto resize needs to handle empty cells.
- changing col/row sizes does not mark a sheet dirty.
- changing col/row sizes does not have undo support.
- auto-fill does not have undo support.
- The implication of mixed mode references ($B$2:C3) - The implication of mixed mode references ($B$2:C3)
is large. All accesses to a RangeRef need to be normalized. (1/2 done) is large. All accesses to a RangeRef need to be normalized. (1/2 done)
......
2000-06-05 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_cell_expr_{link,unlink}) : renamed from
sheet_cell_formula_{link,unlink}.
* src/cell.c (cell_relocate) : Doh! use the offset flags now that they
are being passed.
* src/clipboard.c (paste_cell) : Renamed from paste_cell_flags.
* src/expr.c (compare) : value_is_empty_cell -> VALUE_IS_EMPTY.
* src/value.c (VALUE_IS_EMPTY) : rename from value_is_empty_cell.
* src/sheet-private.h : Add resize_scrollbar.
* src/sheet.c (sheet_{col,row}_add) : Use resize_scrollbar flag rather
than manually updating the scrolling bar.
(sheet_update) : Handle resize_scrollbar.
(sheet_cell_expr_link) : renamed from sheet_cell_formula_link.
(sheet_cell_expr_unlink) : renamed from sheet_cell_formula_unlink.
2000-06-04 Jody Goldberg <jgoldberg@home.com> 2000-06-04 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_is_empty_cell) : str == "" is not empty * src/value.c (value_is_empty_cell) : str == "" is not empty
......
2000-06-05 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_cell_expr_{link,unlink}) : renamed from
sheet_cell_formula_{link,unlink}.
* src/cell.c (cell_relocate) : Doh! use the offset flags now that they
are being passed.
* src/clipboard.c (paste_cell) : Renamed from paste_cell_flags.
* src/expr.c (compare) : value_is_empty_cell -> VALUE_IS_EMPTY.
* src/value.c (VALUE_IS_EMPTY) : rename from value_is_empty_cell.
* src/sheet-private.h : Add resize_scrollbar.
* src/sheet.c (sheet_{col,row}_add) : Use resize_scrollbar flag rather
than manually updating the scrolling bar.
(sheet_update) : Handle resize_scrollbar.
(sheet_cell_expr_link) : renamed from sheet_cell_formula_link.
(sheet_cell_expr_unlink) : renamed from sheet_cell_formula_unlink.
2000-06-04 Jody Goldberg <jgoldberg@home.com> 2000-06-04 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_is_empty_cell) : str == "" is not empty * src/value.c (value_is_empty_cell) : str == "" is not empty
......
2000-06-05 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_cell_expr_{link,unlink}) : renamed from
sheet_cell_formula_{link,unlink}.
* src/cell.c (cell_relocate) : Doh! use the offset flags now that they
are being passed.
* src/clipboard.c (paste_cell) : Renamed from paste_cell_flags.
* src/expr.c (compare) : value_is_empty_cell -> VALUE_IS_EMPTY.
* src/value.c (VALUE_IS_EMPTY) : rename from value_is_empty_cell.
* src/sheet-private.h : Add resize_scrollbar.
* src/sheet.c (sheet_{col,row}_add) : Use resize_scrollbar flag rather
than manually updating the scrolling bar.
(sheet_update) : Handle resize_scrollbar.
(sheet_cell_expr_link) : renamed from sheet_cell_formula_link.
(sheet_cell_expr_unlink) : renamed from sheet_cell_formula_unlink.
2000-06-04 Jody Goldberg <jgoldberg@home.com> 2000-06-04 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_is_empty_cell) : str == "" is not empty * src/value.c (value_is_empty_cell) : str == "" is not empty
......
2000-06-05 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_cell_expr_{link,unlink}) : renamed from
sheet_cell_formula_{link,unlink}.
* src/cell.c (cell_relocate) : Doh! use the offset flags now that they
are being passed.
* src/clipboard.c (paste_cell) : Renamed from paste_cell_flags.
* src/expr.c (compare) : value_is_empty_cell -> VALUE_IS_EMPTY.
* src/value.c (VALUE_IS_EMPTY) : rename from value_is_empty_cell.
* src/sheet-private.h : Add resize_scrollbar.
* src/sheet.c (sheet_{col,row}_add) : Use resize_scrollbar flag rather
than manually updating the scrolling bar.
(sheet_update) : Handle resize_scrollbar.
(sheet_cell_expr_link) : renamed from sheet_cell_formula_link.
(sheet_cell_expr_unlink) : renamed from sheet_cell_formula_unlink.
2000-06-04 Jody Goldberg <jgoldberg@home.com> 2000-06-04 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_is_empty_cell) : str == "" is not empty * src/value.c (value_is_empty_cell) : str == "" is not empty
......
2000-06-05 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_cell_expr_{link,unlink}) : renamed from
sheet_cell_formula_{link,unlink}.
* src/cell.c (cell_relocate) : Doh! use the offset flags now that they
are being passed.
* src/clipboard.c (paste_cell) : Renamed from paste_cell_flags.
* src/expr.c (compare) : value_is_empty_cell -> VALUE_IS_EMPTY.
* src/value.c (VALUE_IS_EMPTY) : rename from value_is_empty_cell.
* src/sheet-private.h : Add resize_scrollbar.
* src/sheet.c (sheet_{col,row}_add) : Use resize_scrollbar flag rather
than manually updating the scrolling bar.
(sheet_update) : Handle resize_scrollbar.
(sheet_cell_expr_link) : renamed from sheet_cell_formula_link.
(sheet_cell_expr_unlink) : renamed from sheet_cell_formula_unlink.
2000-06-04 Jody Goldberg <jgoldberg@home.com> 2000-06-04 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_is_empty_cell) : str == "" is not empty * src/value.c (value_is_empty_cell) : str == "" is not empty
......
2000-06-05 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_cell_expr_{link,unlink}) : renamed from
sheet_cell_formula_{link,unlink}.
* src/cell.c (cell_relocate) : Doh! use the offset flags now that they
are being passed.
* src/clipboard.c (paste_cell) : Renamed from paste_cell_flags.
* src/expr.c (compare) : value_is_empty_cell -> VALUE_IS_EMPTY.
* src/value.c (VALUE_IS_EMPTY) : rename from value_is_empty_cell.
* src/sheet-private.h : Add resize_scrollbar.
* src/sheet.c (sheet_{col,row}_add) : Use resize_scrollbar flag rather
than manually updating the scrolling bar.
(sheet_update) : Handle resize_scrollbar.
(sheet_cell_expr_link) : renamed from sheet_cell_formula_link.
(sheet_cell_expr_unlink) : renamed from sheet_cell_formula_unlink.
2000-06-04 Jody Goldberg <jgoldberg@home.com> 2000-06-04 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_is_empty_cell) : str == "" is not empty * src/value.c (value_is_empty_cell) : str == "" is not empty
......
2000-06-05 Jody Goldberg <jgoldberg@home.com>
* src/sheet.c (sheet_cell_expr_{link,unlink}) : renamed from
sheet_cell_formula_{link,unlink}.
* src/cell.c (cell_relocate) : Doh! use the offset flags now that they
are being passed.
* src/clipboard.c (paste_cell) : Renamed from paste_cell_flags.
* src/expr.c (compare) : value_is_empty_cell -> VALUE_IS_EMPTY.
* src/value.c (VALUE_IS_EMPTY) : rename from value_is_empty_cell.
* src/sheet-private.h : Add resize_scrollbar.
* src/sheet.c (sheet_{col,row}_add) : Use resize_scrollbar flag rather
than manually updating the scrolling bar.
(sheet_update) : Handle resize_scrollbar.
(sheet_cell_expr_link) : renamed from sheet_cell_formula_link.
(sheet_cell_expr_unlink) : renamed from sheet_cell_formula_unlink.
2000-06-04 Jody Goldberg <jgoldberg@home.com> 2000-06-04 Jody Goldberg <jgoldberg@home.com>
* src/value.c (value_is_empty_cell) : str == "" is not empty * src/value.c (value_is_empty_cell) : str == "" is not empty
......
...@@ -43,7 +43,7 @@ cell_dirty (Cell *cell) ...@@ -43,7 +43,7 @@ cell_dirty (Cell *cell)
static void static void
cell_formula_changed (Cell *cell, gboolean queue_recalc) cell_formula_changed (Cell *cell, gboolean queue_recalc)
{ {
sheet_cell_formula_link (cell); sheet_cell_expr_link (cell);
if (queue_recalc) if (queue_recalc)
eval_queue_cell (cell); eval_queue_cell (cell);
} }
...@@ -72,8 +72,8 @@ cell_cleanout (Cell *cell) ...@@ -72,8 +72,8 @@ cell_cleanout (Cell *cell)
/* A cell can have either an expression or entered text */ /* A cell can have either an expression or entered text */
if (cell_has_expr (cell)) { if (cell_has_expr (cell)) {
/* Clipboard cells, e.g., are not attached to a sheet. */ /* Clipboard cells, e.g., are not attached to a sheet. */
if (cell->sheet) if (cell_expr_is_linked (cell))
sheet_cell_formula_unlink (cell); sheet_cell_expr_unlink (cell);
expr_tree_unref (cell->u.expression); expr_tree_unref (cell->u.expression);
cell->u.expression = NULL; cell->u.expression = NULL;
} else if (cell->u.entered_text) { } else if (cell->u.entered_text) {
...@@ -200,7 +200,7 @@ cell_relocate (Cell *cell, int col_offset, int row_offset, gboolean check_bounds ...@@ -200,7 +200,7 @@ cell_relocate (Cell *cell, int col_offset, int row_offset, gboolean check_bounds
/* 2. If the cell contains a formula, relocate the formula */ /* 2. If the cell contains a formula, relocate the formula */
if (cell_has_expr (cell)) { if (cell_has_expr (cell)) {
if (cell_expr_is_linked (cell)) if (cell_expr_is_linked (cell))
sheet_cell_formula_unlink (cell); sheet_cell_expr_unlink (cell);
/* /*
* WARNING WARNING WARNING * WARNING WARNING WARNING
...@@ -238,8 +238,8 @@ cell_relocate (Cell *cell, int col_offset, int row_offset, gboolean check_bounds ...@@ -238,8 +238,8 @@ cell_relocate (Cell *cell, int col_offset, int row_offset, gboolean check_bounds
rinfo->origin.start.row = rinfo->origin.start.row =
rinfo->origin.end.row = cell->row_info->pos; rinfo->origin.end.row = cell->row_info->pos;
rinfo->origin_sheet = rinfo->target_sheet = cell->sheet; rinfo->origin_sheet = rinfo->target_sheet = cell->sheet;
rinfo->col_offset = 0; rinfo->col_offset = col_offset;
rinfo->row_offset = 0; rinfo->row_offset = row_offset;
eval_pos_init_cell (&rinfo->pos, cell); eval_pos_init_cell (&rinfo->pos, cell);
expr = expr_rewrite (expr, &rwinfo); expr = expr_rewrite (expr, &rwinfo);
...@@ -450,7 +450,7 @@ cell_set_expr_and_value (Cell *cell, ExprTree *expr, Value *v) ...@@ -450,7 +450,7 @@ cell_set_expr_and_value (Cell *cell, ExprTree *expr, Value *v)
cell->u.expression = expr; cell->u.expression = expr;
cell->cell_flags |= CELL_HAS_EXPRESSION; cell->cell_flags |= CELL_HAS_EXPRESSION;
sheet_cell_formula_link (cell); sheet_cell_expr_link (cell);
#if 0 #if 0
/* TODO : Should we add this for consistancy ? */ /* TODO : Should we add this for consistancy ? */
cell->format = fmt; cell->format = fmt;
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#define TARGETS_ATOM_NAME "TARGETS" #define TARGETS_ATOM_NAME "TARGETS"
/** /**
* paste_cell_flags: Pastes a cell in the spreadsheet * paste_cell: Pastes a cell in the spreadsheet
* *
* @dest_sheet: The sheet where the pasting will be done * @dest_sheet: The sheet where the pasting will be done
* @new_cell: A new cell (not linked into the sheet, or wb->expr_list) * @new_cell: A new cell (not linked into the sheet, or wb->expr_list)
...@@ -47,10 +47,10 @@ ...@@ -47,10 +47,10 @@
* @paste_flags: Bit mask that describes the paste options. * @paste_flags: Bit mask that describes the paste options.
*/ */
static void static void
paste_cell_flags (Sheet *dest_sheet, paste_cell (Sheet *dest_sheet,
int target_col, int target_row, int target_col, int target_row,
int col_offset, int row_offset, int col_offset, int row_offset,
CellCopy *c_copy, int paste_flags) CellCopy *c_copy, int paste_flags)
{ {
if ((paste_flags & (PASTE_FORMULAS | PASTE_VALUES))){ if ((paste_flags & (PASTE_FORMULAS | PASTE_VALUES))){
if (c_copy->type == CELL_COPY_TYPE_CELL) { if (c_copy->type == CELL_COPY_TYPE_CELL) {
...@@ -205,10 +205,10 @@ clipboard_paste_region (CommandContext *context, ...@@ -205,10 +205,10 @@ clipboard_paste_region (CommandContext *context,
target_row += c_copy->row_offset; target_row += c_copy->row_offset;
} }
paste_cell_flags (pt->sheet, paste_cell (pt->sheet,
target_col, target_row, target_col, target_row,
col_offset, row_offset, col_offset, row_offset,
c_copy, pt->paste_flags); c_copy, pt->paste_flags);
} }
} }
......
...@@ -463,8 +463,8 @@ compare (Value const *a, Value const *b) ...@@ -463,8 +463,8 @@ compare (Value const *a, Value const *b)
if (a == b) if (a == b)
return IS_EQUAL; return IS_EQUAL;
ta = value_is_empty_cell (a) ? VALUE_EMPTY : a->type; ta = VALUE_IS_EMPTY (a) ? VALUE_EMPTY : a->type;
tb = value_is_empty_cell (b) ? VALUE_EMPTY : b->type; tb = VALUE_IS_EMPTY (b) ? VALUE_EMPTY : b->type;
/* string > empty */ /* string > empty */
if (ta == VALUE_STRING) { if (ta == VALUE_STRING) {
......
...@@ -370,7 +370,7 @@ cb_colrow_resize (Sheet *sheet, Range const *r, gpointer user_data) ...@@ -370,7 +370,7 @@ cb_colrow_resize (Sheet *sheet, Range const *r, gpointer user_data)
int tmp; int tmp;
if (info->is_cols) { if (info->is_cols) {
if (r->start.row == 0 && r->end.row >= SHEET_MAX_ROWS - 1) if (r->start.row == 0 && r->end.row >= SHEET_MAX_ROWS - 1)
for (tmp = r->start.col; tmp <= r->end.col ; ++tmp) { for (tmp = r->start.col; tmp <= r->end.col ; ++tmp) {
sheet_col_set_size_pixels (sheet, tmp, info->size_pixels, TRUE); sheet_col_set_size_pixels (sheet, tmp, info->size_pixels, TRUE);
/* FIXME should be done later */ /* FIXME should be done later */
......
...@@ -12,6 +12,7 @@ struct _SheetPrivate { ...@@ -12,6 +12,7 @@ struct _SheetPrivate {
gboolean selection_content_changed; gboolean selection_content_changed;
gboolean recompute_visibility; gboolean recompute_visibility;
gboolean recompute_spans; gboolean recompute_spans;
gboolean resize_scrollbar;
int reposition_row_comment; int reposition_row_comment;
int reposition_col_comment; int reposition_col_comment;
}; };
......
...@@ -370,7 +370,7 @@ cb_colrow_resize (Sheet *sheet, Range const *r, gpointer user_data) ...@@ -370,7 +370,7 @@ cb_colrow_resize (Sheet *sheet, Range const *r, gpointer user_data)
int tmp; int tmp;
if (info->is_cols) { if (info->is_cols) {
if (r->start.row == 0 && r->end.row >= SHEET_MAX_ROWS - 1) if (r->start.row == 0 && r->end.row >= SHEET_MAX_ROWS - 1)
for (tmp = r->start.col; tmp <= r->end.col ; ++tmp) { for (tmp = r->start.col; tmp <= r->end.col ; ++tmp) {
sheet_col_set_size_pixels (sheet, tmp, info->size_pixels, TRUE); sheet_col_set_size_pixels (sheet, tmp, info->size_pixels, TRUE);
/* FIXME should be done later */ /* FIXME should be done later */
......
...@@ -544,14 +544,8 @@ sheet_col_add (Sheet *sheet, ColRowInfo *cp) ...@@ -544,14 +544,8 @@ sheet_col_add (Sheet *sheet, ColRowInfo *cp)
(*segment)[COLROW_SUB_INDEX(col)] = cp; (*segment)[COLROW_SUB_INDEX(col)] = cp;
if (col > sheet->cols.max_used){ if (col > sheet->cols.max_used){
GList *l;
sheet->cols.max_used = col; sheet->cols.max_used = col;
sheet->priv->resize_scrollbar = TRUE;
for (l = sheet->sheet_views; l; l = l->next){
SheetView *sheet_view = l->data;
sheet_view_scrollbar_config (sheet_view);
}
} }
} }
...@@ -569,14 +563,8 @@ sheet_row_add (Sheet *sheet, ColRowInfo *rp) ...@@ -569,14 +563,8 @@ sheet_row_add (Sheet *sheet, ColRowInfo *rp)
(*segment)[COLROW_SUB_INDEX(row)] = rp; (*segment)[COLROW_SUB_INDEX(row)] = rp;
if (rp->pos > sheet->rows.max_used){ if (rp->pos > sheet->rows.max_used){
GList *l;
sheet->rows.max_used = row; sheet->rows.max_used = row;
sheet->priv->resize_scrollbar = TRUE;
for (l = sheet->sheet_views; l; l = l->next){
SheetView *sheet_view = l->data;
sheet_view_scrollbar_config (sheet_view);
}
} }
} }
...@@ -751,11 +739,22 @@ sheet_update (Sheet const *sheet) ...@@ -751,11 +739,22 @@ sheet_update (Sheet const *sheet)
* and use that. * and use that.
*/ */
p->recompute_visibility = FALSE; p->recompute_visibility = FALSE;
p->resize_scrollbar = FALSE; /* compute_visible_ranges does this */
sheet_compute_visible_ranges (sheet); sheet_compute_visible_ranges (sheet);
sheet_update_cursor_pos (sheet); sheet_update_cursor_pos (sheet);
sheet_redraw_all (sheet); sheet_redraw_all (sheet);
} }
if (p->resize_scrollbar) {
GList *l;
for (l = sheet->sheet_views; l; l = l->next){
SheetView *sheet_view = l->data;
sheet_view_scrollbar_config (sheet_view);
}
p->resize_scrollbar = FALSE;
}
/* Only manipulate the status line if we are not selecting a region */ /* Only manipulate the status line if we are not selecting a region */
if (sheet->workbook->editing) if (sheet->workbook->editing)
return; return;
...@@ -2062,7 +2061,7 @@ sheet_cell_remove_simple (Sheet *sheet, Cell *cell) ...@@ -2062,7 +2061,7 @@ sheet_cell_remove_simple (Sheet *sheet, Cell *cell)
eval_unqueue_cell (cell); eval_unqueue_cell (cell);
if (cell_has_expr (cell)) if (cell_has_expr (cell))
sheet_cell_formula_unlink (cell); sheet_cell_expr_unlink (cell);
deps = cell_get_dependencies (cell); deps = cell_get_dependencies (cell);
if (deps) if (deps)
...@@ -2121,7 +2120,7 @@ sheet_cell_comment_unlink (Cell *cell) ...@@ -2121,7 +2120,7 @@ sheet_cell_comment_unlink (Cell *cell)
} }
void void
sheet_cell_formula_link (Cell *cell) sheet_cell_expr_link (Cell *cell)
{ {
Sheet *sheet; Sheet *sheet;
...@@ -2146,7 +2145,7 @@ sheet_cell_formula_link (Cell *cell) ...@@ -2146,7 +2145,7 @@ sheet_cell_formula_link (Cell *cell)
} }
void void
sheet_cell_formula_unlink (Cell *cell) sheet_cell_expr_unlink (Cell *cell)
{ {
Sheet *sheet; Sheet *sheet;
...@@ -2154,10 +2153,12 @@ sheet_cell_formula_unlink (Cell *cell) ...@@ -2154,10 +2153,12 @@ sheet_cell_formula_unlink (Cell *cell)
g_return_if_fail (cell_has_expr (cell)); g_return_if_fail (cell_has_expr (cell));
g_return_if_fail (cell_expr_is_linked (cell)); g_return_if_fail (cell_expr_is_linked (cell));
cell->cell_flags &= ~CELL_IN_EXPR_LIST;
sheet = cell->sheet; sheet = cell->sheet;
g_return_if_fail (sheet != NULL); /* Catch use of deleted cell */ if (sheet == NULL)
return;
cell->cell_flags &= ~CELL_IN_EXPR_LIST;
cell_drop_dependencies (cell); cell_drop_dependencies (cell);
sheet->workbook->formula_cell_list = g_list_remove (sheet->workbook->formula_cell_list, cell); sheet->workbook->formula_cell_list = g_list_remove (sheet->workbook->formula_cell_list, cell);
...@@ -2167,14 +2168,14 @@ sheet_cell_formula_unlink (Cell *cell) ...@@ -2167,14 +2168,14 @@ sheet_cell_formula_unlink (Cell *cell)
} }
/** /**
* sheet_formulas_unlink : An internal routine to remove all expressions * sheet_expr_unlink : An internal routine to remove all expressions
* associated with a given sheet from the workbook wide expression list. * associated with a given sheet from the workbook wide expression list.
* *
* WARNING : This is a dangerous internal function. it leaves the cells in an * WARNING : This is a dangerous internal function. it leaves the cells in an
* invalid state. It is intended for use by sheet_destroy_contents. * invalid state. It is intended for use by sheet_destroy_contents.
*/ */
static void static void
sheet_formulas_unlink (Sheet *sheet) sheet_expr_unlink (Sheet *sheet)
{ {
GList *ptr, *next, *queue; GList *ptr, *next, *queue;
Workbook *wb; Workbook *wb;
...@@ -2310,7 +2311,7 @@ sheet_destroy_contents (Sheet *sheet) ...@@ -2310,7 +2311,7 @@ sheet_destroy_contents (Sheet *sheet)
eval_unqueue_sheet (sheet); eval_unqueue_sheet (sheet);
/* Unlink expressions from the workbook expr list */ /* Unlink expressions from the workbook expr list */
sheet_formulas_unlink (sheet); sheet_expr_unlink (sheet);
/* Remove all the cells */ /* Remove all the cells */
g_hash_table_foreach_remove (sheet->cell_hash, &cb_remove_allcells, NULL); g_hash_table_foreach_remove (sheet->cell_hash, &cb_remove_allcells, NULL);
...@@ -3259,7 +3260,7 @@ sheet_move_range (CommandContext *context, ...@@ -3259,7 +3260,7 @@ sheet_move_range (CommandContext *context,
GList *cells = NULL; GList *cells = NULL;
Cell *cell; Cell *cell;
Range dst; Range dst;
gboolean inter_sheet_formula, out_of_range; gboolean inter_sheet_expr, out_of_range;
g_return_if_fail (rinfo != NULL); g_return_if_fail (rinfo != NULL);
g_return_if_fail (rinfo->origin_sheet != NULL); g_return_if_fail (rinfo->origin_sheet != NULL);
...@@ -3361,25 +3362,25 @@ sheet_move_range (CommandContext *context, ...@@ -3361,25 +3362,25 @@ sheet_move_range (CommandContext *context,
if ((cell->col_info->pos + rinfo->col_offset) >= SHEET_MAX_COLS || if ((cell->col_info->pos + rinfo->col_offset) >= SHEET_MAX_COLS ||
(cell->row_info->pos + rinfo->row_offset) >= SHEET_MAX_ROWS) { (cell->row_info->pos + rinfo->row_offset) >= SHEET_MAX_ROWS) {
if (cell_has_expr (cell)) if (cell_has_expr (cell))
sheet_cell_formula_unlink (cell); sheet_cell_expr_unlink (cell);
cell_unrealize (cell); cell_unrealize (cell);
cell_destroy (cell); cell_destroy (cell);
continue; continue;
} }
/* Inter sheet movement requires the moving the formula too */ /* Inter sheet movement requires the moving the expression too */
inter_sheet_formula = (cell->sheet != rinfo->target_sheet && inter_sheet_expr = (cell->sheet != rinfo->target_sheet &&
cell_has_expr (cell)); cell_has_expr (cell));
if (inter_sheet_formula) if (inter_sheet_expr)
sheet_cell_formula_unlink (cell); sheet_cell_expr_unlink (cell);
/* Update the location */ /* Update the location */
sheet_cell_insert (rinfo->target_sheet, cell, sheet_cell_insert (rinfo->target_sheet, cell,
cell->col_info->pos + rinfo->col_offset, cell->col_info->pos + rinfo->col_offset,
cell->row_info->pos + rinfo->row_offset); cell->row_info->pos + rinfo->row_offset);
if (inter_sheet_formula) if (inter_sheet_expr)
sheet_cell_formula_link (cell); sheet_cell_expr_link (cell);
/* Move comments */ /* Move comments */
cell_relocate (cell, 0, 0, FALSE); cell_relocate (cell, 0, 0, FALSE);
......
...@@ -169,9 +169,9 @@ void sheet_cell_comment_unlink (Cell *cell); ...@@ -169,9 +169,9 @@ void sheet_cell_comment_unlink (Cell *cell);
void sheet_recompute_spans_for_col (Sheet *sheet, int col); void sheet_recompute_spans_for_col (Sheet *sheet, int col);
void sheet_cell_formula_link (Cell *cell); void sheet_cell_expr_link (Cell *cell);
void sheet_cell_formula_unlink (Cell *cell); void sheet_cell_expr_unlink (Cell *cell);
void sheet_cell_changed (Cell *cell); void sheet_cell_changed (Cell *cell);
gboolean sheet_is_region_empty_or_selected (Sheet *sheet, int start_col, int start_row, gboolean sheet_is_region_empty_or_selected (Sheet *sheet, int start_col, int start_row,
int end_col, int end_row); int end_col, int end_row);
......
...@@ -533,18 +533,6 @@ value_get_as_float (const Value *v) ...@@ -533,18 +533,6 @@ value_get_as_float (const Value *v)
return 0.0; return 0.0;