Commit 27d8d83b authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Batch of quickies.

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

	* src/gnumeric-sheet.c (start_cell_selection_at) : Only hide the
	  primary cursor when selecting cells on a different sheet.

	* src/expr.c (eval_expr_real) : Pass EVAL_PERMIT_NON_SCALAR to
	  eval_expr_real when evaluating an array.

	* src/cell.c (cell_set_array_formula) : typo.

	* src/sheet.c (sheet_find_boundary_{horizontal,vertical}) : Another thinko.
parent 07b4ee79
2000-04-26 Jody Goldberg <jgoldberg@home.com>
* src/gnumeric-sheet.c (start_cell_selection_at) : Only hide the
primary cursor when selecting cells on a different sheet.
* src/expr.c (eval_expr_real) : Pass EVAL_PERMIT_NON_SCALAR to
eval_expr_real when evaluating an array.
* src/cell.c (cell_set_array_formula) : typo.
* src/sheet.c (sheet_find_boundary_{horizontal,vertical}) : Another thinko.
* src/dialogs/cell-format.glade : Improve layout of font attributes
slightly.
......
2000-04-26 Jody Goldberg <jgoldberg@home.com>
* src/gnumeric-sheet.c (start_cell_selection_at) : Only hide the
primary cursor when selecting cells on a different sheet.
* src/expr.c (eval_expr_real) : Pass EVAL_PERMIT_NON_SCALAR to
eval_expr_real when evaluating an array.
* src/cell.c (cell_set_array_formula) : typo.
* src/sheet.c (sheet_find_boundary_{horizontal,vertical}) : Another thinko.
* src/dialogs/cell-format.glade : Improve layout of font attributes
slightly.
......
2000-04-26 Jody Goldberg <jgoldberg@home.com>
* src/gnumeric-sheet.c (start_cell_selection_at) : Only hide the
primary cursor when selecting cells on a different sheet.
* src/expr.c (eval_expr_real) : Pass EVAL_PERMIT_NON_SCALAR to
eval_expr_real when evaluating an array.
* src/cell.c (cell_set_array_formula) : typo.
* src/sheet.c (sheet_find_boundary_{horizontal,vertical}) : Another thinko.
* src/dialogs/cell-format.glade : Improve layout of font attributes
slightly.
......
2000-04-26 Jody Goldberg <jgoldberg@home.com>
* src/gnumeric-sheet.c (start_cell_selection_at) : Only hide the
primary cursor when selecting cells on a different sheet.
* src/expr.c (eval_expr_real) : Pass EVAL_PERMIT_NON_SCALAR to
eval_expr_real when evaluating an array.
* src/cell.c (cell_set_array_formula) : typo.
* src/sheet.c (sheet_find_boundary_{horizontal,vertical}) : Another thinko.
* src/dialogs/cell-format.glade : Improve layout of font attributes
slightly.
......
2000-04-26 Jody Goldberg <jgoldberg@home.com>
* src/gnumeric-sheet.c (start_cell_selection_at) : Only hide the
primary cursor when selecting cells on a different sheet.
* src/expr.c (eval_expr_real) : Pass EVAL_PERMIT_NON_SCALAR to
eval_expr_real when evaluating an array.
* src/cell.c (cell_set_array_formula) : typo.
* src/sheet.c (sheet_find_boundary_{horizontal,vertical}) : Another thinko.
* src/dialogs/cell-format.glade : Improve layout of font attributes
slightly.
......
2000-04-26 Jody Goldberg <jgoldberg@home.com>
* src/gnumeric-sheet.c (start_cell_selection_at) : Only hide the
primary cursor when selecting cells on a different sheet.
* src/expr.c (eval_expr_real) : Pass EVAL_PERMIT_NON_SCALAR to
eval_expr_real when evaluating an array.
* src/cell.c (cell_set_array_formula) : typo.
* src/sheet.c (sheet_find_boundary_{horizontal,vertical}) : Another thinko.
* src/dialogs/cell-format.glade : Improve layout of font attributes
slightly.
......
2000-04-26 Jody Goldberg <jgoldberg@home.com>
* src/gnumeric-sheet.c (start_cell_selection_at) : Only hide the
primary cursor when selecting cells on a different sheet.
* src/expr.c (eval_expr_real) : Pass EVAL_PERMIT_NON_SCALAR to
eval_expr_real when evaluating an array.
* src/cell.c (cell_set_array_formula) : typo.
* src/sheet.c (sheet_find_boundary_{horizontal,vertical}) : Another thinko.
* src/dialogs/cell-format.glade : Improve layout of font attributes
slightly.
......
......@@ -552,7 +552,7 @@ cell_set_array_formula (Sheet *sheet,
num_rows, num_cols);
wrapper->u.array.corner.cell = corner;
cell_set_expr_internal (cell, wrapper, NULL);
cell_formula_changed (corner, queue_recalc);
cell_formula_changed (cell, queue_recalc);
expr_tree_unref (wrapper);
}
......
......@@ -61,9 +61,9 @@ gchar *s = N_("None\n"
"Double\n"
"");
gchar *s = N_("None");
gchar *s = N_("Stri_kethrough");
gchar *s = N_("Sup_erscript");
gchar *s = N_("Su_bscript");
gchar *s = N_("Stri_kethrough");
gchar *s = N_("Font");
gchar *s = N_("Reverse Diagonal");
gchar *s = N_("Left");
......
......@@ -110,7 +110,7 @@ expr_tree_new_constant (Value *v)
return NULL;
ans->ref_count = 1;
ans->oper = OPER_CONSTANT;
*((Operation *)&(ans->oper)) = OPER_CONSTANT;
ans->u.constant = v;
return ans;
......@@ -126,7 +126,7 @@ expr_tree_new_unary (Operation op, ExprTree *e)
return NULL;
ans->ref_count = 1;
ans->oper = op;
*((Operation *)&(ans->oper)) = op;
ans->u.value = e;
return ans;
......@@ -143,7 +143,7 @@ expr_tree_new_binary (ExprTree *l, Operation op, ExprTree *r)
return NULL;
ans->ref_count = 1;
ans->oper = op;
*((Operation *)&(ans->oper)) = op;
ans->u.binary.value_a = l;
ans->u.binary.value_b = r;
......@@ -161,7 +161,7 @@ expr_tree_new_funcall (Symbol *sym, GList *args)
return NULL;
ans->ref_count = 1;
ans->oper = OPER_FUNCALL;
*((Operation *)&(ans->oper)) = OPER_FUNCALL;
ans->u.function.symbol = sym;;
ans->u.function.arg_list = args;
......@@ -227,7 +227,7 @@ expr_tree_new_name (const ExprName *name)
return NULL;
ans->ref_count = 1;
ans->oper = OPER_NAME;
*((Operation *)&(ans->oper)) = OPER_NAME;
ans->u.name = name;
return ans;
......@@ -243,7 +243,7 @@ expr_tree_new (void)
return NULL;
ans->ref_count = 1;
ans->oper = OPER_CONSTANT;
*((Operation *)&(ans->oper)) = OPER_CONSTANT;
ans->u.constant = NULL;
return ans;
}*/
......@@ -258,7 +258,7 @@ expr_tree_new_var (const CellRef *cr)
return NULL;
ans->ref_count = 1;
ans->oper = OPER_VAR;
*((Operation *)&(ans->oper)) = OPER_VAR;
ans->u.ref = *cr;
return ans;
......@@ -292,7 +292,7 @@ expr_tree_array_formula (int const x, int const y, int const rows, int const col
return NULL;
ans->ref_count = 1;
ans->oper = OPER_ARRAY;
*((Operation *)&(ans->oper)) = OPER_ARRAY;
ans->u.array.x = x;
ans->u.array.y = y;
ans->u.array.rows = rows;
......@@ -1064,7 +1064,8 @@ eval_expr_real (EvalPosition const * const pos, ExprTree const * const tree,
* is an array return the result, else build an array and
* iterate over the elements, but that theory needs validation.
*/
a = eval_expr_real (pos, tree->u.array.corner.func.expr, FALSE);
a = eval_expr_real (pos, tree->u.array.corner.func.expr,
EVAL_PERMIT_NON_SCALAR);
*((Value **)&(tree->u.array.corner.func.value)) = a;
} else {
ExprTree const * const array =
......
......@@ -267,24 +267,30 @@ start_cell_selection_at (GnumericSheet *gsheet, int col, int row)
{
GnomeCanvas *canvas = GNOME_CANVAS (gsheet);
GnomeCanvasGroup *group = GNOME_CANVAS_GROUP (canvas->root);
Sheet *sheet = gsheet->sheet_view->sheet;
g_return_if_fail (gsheet->selecting_cell == FALSE);
g_return_if_fail (gsheet->controling_entry != NULL);
/* Hide the primary cursor while the range selection cursor is visible */
item_cursor_set_visibility (gsheet->item_cursor, FALSE);
/* Hide the primary cursor while the range selection cursor is visible
* and we are selecting on a different sheet than the expr being edited
*/
if (sheet != sheet->workbook->editing_sheet)
item_cursor_set_visibility (gsheet->item_cursor, FALSE);
gsheet->selecting_cell = TRUE;
gsheet->sel_cursor = ITEM_CURSOR (gnome_canvas_item_new (
group,
item_cursor_get_type (),
"Sheet", gsheet->sheet_view->sheet,
"Sheet", sheet,
"Grid", gsheet->item_grid,
"Style", ITEM_CURSOR_ANTED, NULL));
item_cursor_set_spin_base (gsheet->sel_cursor, col, row);
item_cursor_set_bounds (ITEM_CURSOR (gsheet->sel_cursor), col, row, col, row);
item_edit_disable_highlight (ITEM_EDIT (gsheet->item_editor));
/* If we are selecting a range on a different sheet this may be NULL */
if (gsheet->item_editor)
item_edit_disable_highlight (ITEM_EDIT (gsheet->item_editor));
gsheet->sel_cursor_pos = GTK_EDITABLE (gsheet->controling_entry)->current_pos;
gsheet->sel_text_len = 0;
......@@ -324,7 +330,10 @@ gnumeric_sheet_stop_cell_selection (GnumericSheet *gsheet, gboolean const clear_
gsheet->selecting_cell = FALSE;
gtk_object_destroy (GTK_OBJECT (gsheet->sel_cursor));
gsheet->sel_cursor = NULL;
item_edit_enable_highlight (ITEM_EDIT (gsheet->item_editor));
/* If we are selecting a range on a different sheet this may be NULL */
if (gsheet->item_editor)
item_edit_enable_highlight (ITEM_EDIT (gsheet->item_editor));
/* Make the primary cursor visible again */
item_cursor_set_visibility (gsheet->item_cursor, TRUE);
......
......@@ -267,24 +267,30 @@ start_cell_selection_at (GnumericSheet *gsheet, int col, int row)
{
GnomeCanvas *canvas = GNOME_CANVAS (gsheet);
GnomeCanvasGroup *group = GNOME_CANVAS_GROUP (canvas->root);
Sheet *sheet = gsheet->sheet_view->sheet;
g_return_if_fail (gsheet->selecting_cell == FALSE);
g_return_if_fail (gsheet->controling_entry != NULL);
/* Hide the primary cursor while the range selection cursor is visible */
item_cursor_set_visibility (gsheet->item_cursor, FALSE);
/* Hide the primary cursor while the range selection cursor is visible
* and we are selecting on a different sheet than the expr being edited
*/
if (sheet != sheet->workbook->editing_sheet)
item_cursor_set_visibility (gsheet->item_cursor, FALSE);
gsheet->selecting_cell = TRUE;
gsheet->sel_cursor = ITEM_CURSOR (gnome_canvas_item_new (
group,
item_cursor_get_type (),
"Sheet", gsheet->sheet_view->sheet,
"Sheet", sheet,
"Grid", gsheet->item_grid,
"Style", ITEM_CURSOR_ANTED, NULL));
item_cursor_set_spin_base (gsheet->sel_cursor, col, row);
item_cursor_set_bounds (ITEM_CURSOR (gsheet->sel_cursor), col, row, col, row);
item_edit_disable_highlight (ITEM_EDIT (gsheet->item_editor));
/* If we are selecting a range on a different sheet this may be NULL */
if (gsheet->item_editor)
item_edit_disable_highlight (ITEM_EDIT (gsheet->item_editor));
gsheet->sel_cursor_pos = GTK_EDITABLE (gsheet->controling_entry)->current_pos;
gsheet->sel_text_len = 0;
......@@ -324,7 +330,10 @@ gnumeric_sheet_stop_cell_selection (GnumericSheet *gsheet, gboolean const clear_
gsheet->selecting_cell = FALSE;
gtk_object_destroy (GTK_OBJECT (gsheet->sel_cursor));
gsheet->sel_cursor = NULL;
item_edit_enable_highlight (ITEM_EDIT (gsheet->item_editor));
/* If we are selecting a range on a different sheet this may be NULL */
if (gsheet->item_editor)
item_edit_enable_highlight (ITEM_EDIT (gsheet->item_editor));
/* Make the primary cursor visible again */
item_cursor_set_visibility (gsheet->item_cursor, TRUE);
......
......@@ -1493,7 +1493,7 @@ sheet_find_boundary_horizontal (Sheet *sheet, int start_col, int row,
if (jump_to_boundaries) {
if (new_col > sheet->cols.max_used) {
if (count > 0)
return SHEET_MAX_COLS-1;
return find_nonblank ? SHEET_MAX_COLS-1 : prev_col;
new_col = sheet->cols.max_used;
}
keep_looking = (cell_is_blank (sheet_cell_get (sheet, new_col, row)) == find_nonblank);
......@@ -1559,7 +1559,7 @@ sheet_find_boundary_vertical (Sheet *sheet, int col, int start_row,
if (jump_to_boundaries) {
if (new_row > sheet->rows.max_used) {
if (count > 0)
return SHEET_MAX_ROWS-1;
return find_nonblank ? SHEET_MAX_ROWS-1 : prev_row;
new_row = sheet->rows.max_used;
}
......
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