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

From Juan Pablo Mendoza <pablo_juan@yahoo.com>

2001-05-27  Jody Goldberg <jgoldberg@home.com>
	From Juan Pablo Mendoza <pablo_juan@yahoo.com>

	* sheet.c (sheet_name_quote): Escape \ and add more chars to
	  to quote_chr.
parent 3b241834
......@@ -6,6 +6,9 @@
* workbook-control-gui.c (wb_edit_key_pressed): Use it.
* gnumeric-sheet.c (gnumeric_filter_modifiers): Ditto.
* sheet.c (sheet_name_quote): Escape \ and add more chars to
to quote_chr.
2001-05-27 Jody Goldberg <jgoldberg@home.com>
* src/eval.c (sheet_region_queue_recalc) : Queue the dependents in the
......
......@@ -12,6 +12,7 @@ Jody:
Juan Pablo Mendoza:
* Handle {caps,number,scroll}lock.
* Improve sheet name quoting.
Morten:
* Fix PV.
......
......@@ -6,6 +6,9 @@
* workbook-control-gui.c (wb_edit_key_pressed): Use it.
* gnumeric-sheet.c (gnumeric_filter_modifiers): Ditto.
* sheet.c (sheet_name_quote): Escape \ and add more chars to
to quote_chr.
2001-05-27 Jody Goldberg <jgoldberg@home.com>
* src/eval.c (sheet_region_queue_recalc) : Queue the dependents in the
......
......@@ -6,6 +6,9 @@
* workbook-control-gui.c (wb_edit_key_pressed): Use it.
* gnumeric-sheet.c (gnumeric_filter_modifiers): Ditto.
* sheet.c (sheet_name_quote): Escape \ and add more chars to
to quote_chr.
2001-05-27 Jody Goldberg <jgoldberg@home.com>
* src/eval.c (sheet_region_queue_recalc) : Queue the dependents in the
......
......@@ -6,6 +6,9 @@
* workbook-control-gui.c (wb_edit_key_pressed): Use it.
* gnumeric-sheet.c (gnumeric_filter_modifiers): Ditto.
* sheet.c (sheet_name_quote): Escape \ and add more chars to
to quote_chr.
2001-05-27 Jody Goldberg <jgoldberg@home.com>
* src/eval.c (sheet_region_queue_recalc) : Queue the dependents in the
......
......@@ -6,6 +6,9 @@
* workbook-control-gui.c (wb_edit_key_pressed): Use it.
* gnumeric-sheet.c (gnumeric_filter_modifiers): Ditto.
* sheet.c (sheet_name_quote): Escape \ and add more chars to
to quote_chr.
2001-05-27 Jody Goldberg <jgoldberg@home.com>
* src/eval.c (sheet_region_queue_recalc) : Queue the dependents in the
......
......@@ -3051,7 +3051,8 @@ sheet_name_quote (char const *name_unquoted)
int i, j, quotes_embedded = 0;
gboolean needs_quotes;
static char quote_chr [] =
{ '=', '<', '>', '(', ')', '+', '-', ' ', '^', '&', '%', ':', '\0' };
{ '=', '<', '>', '(', ')', '+', '-', ' ', '^', '&', '%', ':', '/',
'*', '\\', '`', '\'', '', '\0'};
g_return_val_if_fail (name_unquoted != NULL, NULL);
......@@ -3061,7 +3062,7 @@ sheet_name_quote (char const *name_unquoted)
for (j = 0; quote_chr [j]; j++)
if (name_unquoted [i] == quote_chr [j])
needs_quotes = TRUE;
if (name_unquoted [i] == '\'')
if (name_unquoted [i] == '\'' || name_unquoted [i] == '\\')
quotes_embedded++;
}
......@@ -3073,7 +3074,7 @@ sheet_name_quote (char const *name_unquoted)
*ret = '\'';
for (src = name_unquoted, dst = ret + 1; *src; src++, dst++) {
if (*src == '\'')
if (*src == '\'' || *src == '\\')
*dst++ = '\\';
*dst = *src;
}
......
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