Commit 33f83b80 authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa

Add warning if cell_set_text is invoked with the empty string.

2000-01-01  Miguel de Icaza  <miguel@gnu.org>

	* src/cell.c (cell_set_text): Add warning if cell_set_text is
	invoked with the empty string.

	* src/workbook.c (workbook_edit_comment): Set the cell value to
	VALUE_EMPTY instead of setting it to "".

	* src/sheet.c (cellref_a1_get): Chek the range
parent fd8a5da2
2000-01-01 Miguel de Icaza <miguel@gnu.org>
* src/cell.c (cell_set_text): Add warning if cell_set_text is
invoked with the empty string.
* src/workbook.c (workbook_edit_comment): Set the cell value to
VALUE_EMPTY instead of setting it to "".
* src/sheet.c (cellref_a1_get): Chek the range
2000-01-01 Miguel de Icaza <miguel@gnu.org>
* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_sheet): Use
application_clipboar_unant here.
(gnumeric_sheet_key_mode_object): ditto.
* src/sheet.c (sheet_start_editing_at_cursor): ditto.
* src/workbook-format-toolbar.c (change_selection_font): ditto
(set_selection_halign): ditto
* src/application.c (application_clipboard_copy): Use defines.
(application_clipboard_cut): Use defines.
(application_clipboard_unant): New function, less agressive
marking of unanting.
* src/workbook-view.c (workbook_view_set_paste_state): Use
named defines instead of arbitrary constants. Please, no magic
constants ever in Gnumeric guys.
* src/application.c:
* src/workbook-private.h: Move the menu_item fields to
workbook_private.
1999-12-31 Jody Goldberg <jgoldberg@home.com>
* src/file.c (workbook_import) : Support new plugin interface.
......
2000-01-01 Miguel de Icaza <miguel@gnu.org>
* src/cell.c (cell_set_text): Add warning if cell_set_text is
invoked with the empty string.
* src/workbook.c (workbook_edit_comment): Set the cell value to
VALUE_EMPTY instead of setting it to "".
* src/sheet.c (cellref_a1_get): Chek the range
2000-01-01 Miguel de Icaza <miguel@gnu.org>
* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_sheet): Use
application_clipboar_unant here.
(gnumeric_sheet_key_mode_object): ditto.
* src/sheet.c (sheet_start_editing_at_cursor): ditto.
* src/workbook-format-toolbar.c (change_selection_font): ditto
(set_selection_halign): ditto
* src/application.c (application_clipboard_copy): Use defines.
(application_clipboard_cut): Use defines.
(application_clipboard_unant): New function, less agressive
marking of unanting.
* src/workbook-view.c (workbook_view_set_paste_state): Use
named defines instead of arbitrary constants. Please, no magic
constants ever in Gnumeric guys.
* src/application.c:
* src/workbook-private.h: Move the menu_item fields to
workbook_private.
1999-12-31 Jody Goldberg <jgoldberg@home.com>
* src/file.c (workbook_import) : Support new plugin interface.
......
......@@ -543,6 +543,16 @@ cell_set_text (Cell *cell, const char *text)
return;
}
if (*text == 0){
static int warn_shown;
if (!warn_shown){
g_warning (
"Cell value being set to empty string");
warn_shown = 1;
}
}
cell_queue_redraw (cell);
cell_set_text_simple (cell, text);
......
......@@ -2940,6 +2940,8 @@ cellref_a1_get (CellRef *out, const char *in, int parse_col, int parse_row)
row = row * 10 + *in - '0';
in++;
}
if (row > SHEET_MAX_ROWS)
return FALSE;
row--;
if (*in) /* We havn't hit the end yet */
......
......@@ -925,7 +925,7 @@ workbook_edit_comment (GtkWidget *widget, Workbook *wb)
if (!cell){
cell = sheet_cell_new (sheet, sheet->cursor_col, sheet->cursor_row);
cell_set_text (cell, "");
cell_set_value (cell, value_new_empty ());
}
dialog_cell_comment (wb, cell);
......
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