Commit 699e8bf7 authored by Jon K Hellan's avatar Jon K Hellan Committed by Jon Kåre Hellan

Replace member name with name_quoted and name_unquoted. In name_quoted,

2000-04-08  Jon K Hellan  <hellan@acm.org>

        * src/sheet.h (struct _Sheet): Replace member name with
	name_quoted and name_unquoted. In name_quoted, names with spaces
	or quote characters are protected with quotes.

	* src/analysis-tools.c (prepare_output): Use
	workbook_sheet_get_free_name to ensure that we don't create more
	than one sheet with the same name.

	* src/eval.c (dump_cell_list, sheet_dump_dependencies): Dump
	sheet->name_unquoted instead of sheet->name.

	* src/expr-name.c (name_sheet_title): Make value from
	sheet->name_quoted instead of sheet->name. FIXME: Is this correct?

	* src/gnumeric-sheet.c (selection_insert_selection_string): Make
	selection string from sheet->name_quoted instead of quoting
	sheet->name here.

	* src/print-info.c (render_tab): Render sheet->name_unquoted
	instead of sheet->name.

	* src/print-preview.c (create_toplevel): Use sheet->name_unquoted
	instead of sheet->name in window title.

	* src/selection.c (sheet_selection_to_string, range_to_string):
	Make reference string from sheet->name_quoted instead of quoting
	sheet->name here.

	* src/sheet.[ch] (sheet_quote_name): Rename to
	sheet_name_quote. Take name_unquoted parameter, not a sheet.

	* src/sheet.c (sheet_rename, sheet_new): Set both
	sheet->name_quoted and sheet->name_unquoted.
	(sheet_destroy): Free both sheet->name_quoted and
	name_unquoted.
	(cellref_name): Make reference from sheet->name_quoted instead of
	quoting sheet->name here.

	* src/test.c (thrash_sheet): Use sheet->name_unquoted instead of
	sheet->name in debug output.

	* src/value-sheet.c (value_dump): Dump sheet->name_quoted instead
	of quoting sheet->name here.
	(encode_cellref): Use sheet->name_quoted instead of quoting
	sheet->name here.

	* src/workbook.[ch] (workbook_sheet_get_free_name): Make it more
	generally useful: Add "base" and "always_suffix" parameters. The
	caller should now select the base to make the name from
	(e.g. "Sheet"), and specify whether or not a suffix should be
	added when the name "base" is not in use.

	* src/workbook.c (insert_sheet_cmd): Use new signature of
	workbook_sheet_get_free_name.
	(workbook_rename_sheet): Insert unquoted name in hash table.
	(sheet_label_text_changed_signal): Remove test for quote
	characters in sheet name.
	(sheet_action_delete_sheet): Prompt with name_unquoted instead of
	name.
	(sheet_action_rename_sheet, workbook_attach_sheet): Use
	name_unquoted instead on name.
	(workbook_detach_sheet): Use sheet->name_unquoted as hash key
	instead of sheet->name.

	* src/workbook-cmd-format.c
	(workbook_cmd_format_sheet_change_name): Use name_unquoted instead
	on name.

	* src/xml-io.c (xml_sheet_write): Output sheet->name_unquoted
	instead of sheet->name.

	* src/dialogs/dialog-sheet-order.c (dialog_sheet_order_impl): Make
	list header passive.
	(add_to_sheet_clist, delete_cb): Substitute sheet->name_unquoted
	for sheet->name.

	* src/dialogs/dialog-zoom.c (dialog_zoom_impl): Ditto.

2000-04-08  Jon K Hellan  <hellan@acm.org>

	* graphic-context.c (graphic_wizard_guess_series): Substitute
	sheet->name_quoted for sheet->name.

2000-04-08  Jon K Hellan  <hellan@acm.org>

	* ms-excel-read.c (ms_excel_set_xf, ms_excel_read_formula,
	ms_excel_read_sheet):  Use
	gnum_sheet->name_unquoted instead of gnum_sheet->name in debug
	output.
	(ms_excel_read_workbook): Remove unused variable to silence
	warning.

	* ms-excel-write.c (write_externsheets): Output
	gnum_sheet->name_quoted instead of gnum_sheet->name. FIXME: Is
	this correct?
	(write_sheet): Use gnum_sheet->name_unquoted instead of
	gnum_sheet->name in debug output.
	(write_workbook): Output gnum_sheet->name_unquoted instead of
	gnum_sheet->name.

	* ms-formula-read.c (ms_excel_parse_formula): Use
	gnum_sheet->name_unquoted instead of gnum_sheet->name in debug
	output.

	* ms-obj.c (object_anchor_to_position): Ditto.

2000-04-08  Jon K Hellan  <hellan@acm.org>

	* html.c (html_write_wb_html32, html_write_wb_html40): Output
	sheet->name_unquoted instead of sheet->name.
	(html_read): Gettextize sheet name template.

	* latex.c (html_write_wb_latex, html_write_wb_latex2e):  Output
	sheet->name_unquoted instead of sheet->name.

	* roff.c (write_wb_roff): Ditto

2000-04-08  Jon K Hellan  <hellan@acm.org>

	* lotus.c (attach_sheet): Remove \n from sheet name. Gettextize
	sheet name template.

2000-04-08  Jon K Hellan  <hellan@acm.org>

	* oleo.c (attach_sheet): Remove \n from sheet name. Gettextize
	sheet name template.

2000-04-08  Jon K Hellan  <hellan@acm.org>

	* pln.c (pln_read_workbook): Use workbook_set_saveinfo instead of
	workbook_set_filename.

2000-04-08  Jon K Hellan  <hellan@acm.org>

	* text-io.c (writeTextSheet): Output sheet->name_unquoted instead of
	sheet->name.
	(readTextWorkbook): Ungettextize name of sheet to
	create. text_parse_file is supposed to rename it.
parent 99790b18
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/sheet.h (struct _Sheet): Replace member name with
name_quoted and name_unquoted. In name_quoted, names with spaces
or quote characters are protected with quotes.
* src/analysis-tools.c (prepare_output): Use
workbook_sheet_get_free_name to ensure that we don't create more
than one sheet with the same name.
* src/eval.c (dump_cell_list, sheet_dump_dependencies): Dump
sheet->name_unquoted instead of sheet->name.
* src/expr-name.c (name_sheet_title): Make value from
sheet->name_quoted instead of sheet->name. FIXME: Is this correct?
* src/gnumeric-sheet.c (selection_insert_selection_string): Make
selection string from sheet->name_quoted instead of quoting
sheet->name here.
* src/print-info.c (render_tab): Render sheet->name_unquoted
instead of sheet->name.
* src/print-preview.c (create_toplevel): Use sheet->name_unquoted
instead of sheet->name in window title.
* src/selection.c (sheet_selection_to_string, range_to_string):
Make reference string from sheet->name_quoted instead of quoting
sheet->name here.
* src/sheet.[ch] (sheet_quote_name): Rename to
sheet_name_quote. Take name_unquoted parameter, not a sheet.
* src/sheet.c (sheet_rename, sheet_new): Set both
sheet->name_quoted and sheet->name_unquoted.
(sheet_destroy): Free both sheet->name_quoted and
name_unquoted.
(cellref_name): Make reference from sheet->name_quoted instead of
quoting sheet->name here.
* src/test.c (thrash_sheet): Use sheet->name_unquoted instead of
sheet->name in debug output.
* src/value-sheet.c (value_dump): Dump sheet->name_quoted instead
of quoting sheet->name here.
(encode_cellref): Use sheet->name_quoted instead of quoting
sheet->name here.
* src/workbook.[ch] (workbook_sheet_get_free_name): Make it more
generally useful: Add "base" and "always_suffix" parameters. The
caller should now select the base to make the name from
(e.g. "Sheet"), and specify whether or not a suffix should be
added when the name "base" is not in use.
* src/workbook.c (insert_sheet_cmd): Use new signature of
workbook_sheet_get_free_name.
(workbook_rename_sheet): Insert unquoted name in hash table.
(sheet_label_text_changed_signal): Remove test for quote
characters in sheet name.
(sheet_action_delete_sheet): Prompt with name_unquoted instead of
name.
(sheet_action_rename_sheet, workbook_attach_sheet): Use
name_unquoted instead on name.
(workbook_detach_sheet): Use sheet->name_unquoted as hash key
instead of sheet->name.
* src/workbook-cmd-format.c
(workbook_cmd_format_sheet_change_name): Use name_unquoted instead
on name.
* src/xml-io.c (xml_sheet_write): Output sheet->name_unquoted
instead of sheet->name.
* src/dialogs/dialog-sheet-order.c (dialog_sheet_order_impl): Make
list header passive.
(add_to_sheet_clist, delete_cb): Substitute sheet->name_unquoted
for sheet->name.
* src/dialogs/dialog-zoom.c (dialog_zoom_impl): Ditto.
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/dialogs/dialog-analysis-tools.c (struct
......
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/sheet.h (struct _Sheet): Replace member name with
name_quoted and name_unquoted. In name_quoted, names with spaces
or quote characters are protected with quotes.
* src/analysis-tools.c (prepare_output): Use
workbook_sheet_get_free_name to ensure that we don't create more
than one sheet with the same name.
* src/eval.c (dump_cell_list, sheet_dump_dependencies): Dump
sheet->name_unquoted instead of sheet->name.
* src/expr-name.c (name_sheet_title): Make value from
sheet->name_quoted instead of sheet->name. FIXME: Is this correct?
* src/gnumeric-sheet.c (selection_insert_selection_string): Make
selection string from sheet->name_quoted instead of quoting
sheet->name here.
* src/print-info.c (render_tab): Render sheet->name_unquoted
instead of sheet->name.
* src/print-preview.c (create_toplevel): Use sheet->name_unquoted
instead of sheet->name in window title.
* src/selection.c (sheet_selection_to_string, range_to_string):
Make reference string from sheet->name_quoted instead of quoting
sheet->name here.
* src/sheet.[ch] (sheet_quote_name): Rename to
sheet_name_quote. Take name_unquoted parameter, not a sheet.
* src/sheet.c (sheet_rename, sheet_new): Set both
sheet->name_quoted and sheet->name_unquoted.
(sheet_destroy): Free both sheet->name_quoted and
name_unquoted.
(cellref_name): Make reference from sheet->name_quoted instead of
quoting sheet->name here.
* src/test.c (thrash_sheet): Use sheet->name_unquoted instead of
sheet->name in debug output.
* src/value-sheet.c (value_dump): Dump sheet->name_quoted instead
of quoting sheet->name here.
(encode_cellref): Use sheet->name_quoted instead of quoting
sheet->name here.
* src/workbook.[ch] (workbook_sheet_get_free_name): Make it more
generally useful: Add "base" and "always_suffix" parameters. The
caller should now select the base to make the name from
(e.g. "Sheet"), and specify whether or not a suffix should be
added when the name "base" is not in use.
* src/workbook.c (insert_sheet_cmd): Use new signature of
workbook_sheet_get_free_name.
(workbook_rename_sheet): Insert unquoted name in hash table.
(sheet_label_text_changed_signal): Remove test for quote
characters in sheet name.
(sheet_action_delete_sheet): Prompt with name_unquoted instead of
name.
(sheet_action_rename_sheet, workbook_attach_sheet): Use
name_unquoted instead on name.
(workbook_detach_sheet): Use sheet->name_unquoted as hash key
instead of sheet->name.
* src/workbook-cmd-format.c
(workbook_cmd_format_sheet_change_name): Use name_unquoted instead
on name.
* src/xml-io.c (xml_sheet_write): Output sheet->name_unquoted
instead of sheet->name.
* src/dialogs/dialog-sheet-order.c (dialog_sheet_order_impl): Make
list header passive.
(add_to_sheet_clist, delete_cb): Substitute sheet->name_unquoted
for sheet->name.
* src/dialogs/dialog-zoom.c (dialog_zoom_impl): Ditto.
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/dialogs/dialog-analysis-tools.c (struct
......
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/sheet.h (struct _Sheet): Replace member name with
name_quoted and name_unquoted. In name_quoted, names with spaces
or quote characters are protected with quotes.
* src/analysis-tools.c (prepare_output): Use
workbook_sheet_get_free_name to ensure that we don't create more
than one sheet with the same name.
* src/eval.c (dump_cell_list, sheet_dump_dependencies): Dump
sheet->name_unquoted instead of sheet->name.
* src/expr-name.c (name_sheet_title): Make value from
sheet->name_quoted instead of sheet->name. FIXME: Is this correct?
* src/gnumeric-sheet.c (selection_insert_selection_string): Make
selection string from sheet->name_quoted instead of quoting
sheet->name here.
* src/print-info.c (render_tab): Render sheet->name_unquoted
instead of sheet->name.
* src/print-preview.c (create_toplevel): Use sheet->name_unquoted
instead of sheet->name in window title.
* src/selection.c (sheet_selection_to_string, range_to_string):
Make reference string from sheet->name_quoted instead of quoting
sheet->name here.
* src/sheet.[ch] (sheet_quote_name): Rename to
sheet_name_quote. Take name_unquoted parameter, not a sheet.
* src/sheet.c (sheet_rename, sheet_new): Set both
sheet->name_quoted and sheet->name_unquoted.
(sheet_destroy): Free both sheet->name_quoted and
name_unquoted.
(cellref_name): Make reference from sheet->name_quoted instead of
quoting sheet->name here.
* src/test.c (thrash_sheet): Use sheet->name_unquoted instead of
sheet->name in debug output.
* src/value-sheet.c (value_dump): Dump sheet->name_quoted instead
of quoting sheet->name here.
(encode_cellref): Use sheet->name_quoted instead of quoting
sheet->name here.
* src/workbook.[ch] (workbook_sheet_get_free_name): Make it more
generally useful: Add "base" and "always_suffix" parameters. The
caller should now select the base to make the name from
(e.g. "Sheet"), and specify whether or not a suffix should be
added when the name "base" is not in use.
* src/workbook.c (insert_sheet_cmd): Use new signature of
workbook_sheet_get_free_name.
(workbook_rename_sheet): Insert unquoted name in hash table.
(sheet_label_text_changed_signal): Remove test for quote
characters in sheet name.
(sheet_action_delete_sheet): Prompt with name_unquoted instead of
name.
(sheet_action_rename_sheet, workbook_attach_sheet): Use
name_unquoted instead on name.
(workbook_detach_sheet): Use sheet->name_unquoted as hash key
instead of sheet->name.
* src/workbook-cmd-format.c
(workbook_cmd_format_sheet_change_name): Use name_unquoted instead
on name.
* src/xml-io.c (xml_sheet_write): Output sheet->name_unquoted
instead of sheet->name.
* src/dialogs/dialog-sheet-order.c (dialog_sheet_order_impl): Make
list header passive.
(add_to_sheet_clist, delete_cb): Substitute sheet->name_unquoted
for sheet->name.
* src/dialogs/dialog-zoom.c (dialog_zoom_impl): Ditto.
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/dialogs/dialog-analysis-tools.c (struct
......
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/sheet.h (struct _Sheet): Replace member name with
name_quoted and name_unquoted. In name_quoted, names with spaces
or quote characters are protected with quotes.
* src/analysis-tools.c (prepare_output): Use
workbook_sheet_get_free_name to ensure that we don't create more
than one sheet with the same name.
* src/eval.c (dump_cell_list, sheet_dump_dependencies): Dump
sheet->name_unquoted instead of sheet->name.
* src/expr-name.c (name_sheet_title): Make value from
sheet->name_quoted instead of sheet->name. FIXME: Is this correct?
* src/gnumeric-sheet.c (selection_insert_selection_string): Make
selection string from sheet->name_quoted instead of quoting
sheet->name here.
* src/print-info.c (render_tab): Render sheet->name_unquoted
instead of sheet->name.
* src/print-preview.c (create_toplevel): Use sheet->name_unquoted
instead of sheet->name in window title.
* src/selection.c (sheet_selection_to_string, range_to_string):
Make reference string from sheet->name_quoted instead of quoting
sheet->name here.
* src/sheet.[ch] (sheet_quote_name): Rename to
sheet_name_quote. Take name_unquoted parameter, not a sheet.
* src/sheet.c (sheet_rename, sheet_new): Set both
sheet->name_quoted and sheet->name_unquoted.
(sheet_destroy): Free both sheet->name_quoted and
name_unquoted.
(cellref_name): Make reference from sheet->name_quoted instead of
quoting sheet->name here.
* src/test.c (thrash_sheet): Use sheet->name_unquoted instead of
sheet->name in debug output.
* src/value-sheet.c (value_dump): Dump sheet->name_quoted instead
of quoting sheet->name here.
(encode_cellref): Use sheet->name_quoted instead of quoting
sheet->name here.
* src/workbook.[ch] (workbook_sheet_get_free_name): Make it more
generally useful: Add "base" and "always_suffix" parameters. The
caller should now select the base to make the name from
(e.g. "Sheet"), and specify whether or not a suffix should be
added when the name "base" is not in use.
* src/workbook.c (insert_sheet_cmd): Use new signature of
workbook_sheet_get_free_name.
(workbook_rename_sheet): Insert unquoted name in hash table.
(sheet_label_text_changed_signal): Remove test for quote
characters in sheet name.
(sheet_action_delete_sheet): Prompt with name_unquoted instead of
name.
(sheet_action_rename_sheet, workbook_attach_sheet): Use
name_unquoted instead on name.
(workbook_detach_sheet): Use sheet->name_unquoted as hash key
instead of sheet->name.
* src/workbook-cmd-format.c
(workbook_cmd_format_sheet_change_name): Use name_unquoted instead
on name.
* src/xml-io.c (xml_sheet_write): Output sheet->name_unquoted
instead of sheet->name.
* src/dialogs/dialog-sheet-order.c (dialog_sheet_order_impl): Make
list header passive.
(add_to_sheet_clist, delete_cb): Substitute sheet->name_unquoted
for sheet->name.
* src/dialogs/dialog-zoom.c (dialog_zoom_impl): Ditto.
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/dialogs/dialog-analysis-tools.c (struct
......
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/sheet.h (struct _Sheet): Replace member name with
name_quoted and name_unquoted. In name_quoted, names with spaces
or quote characters are protected with quotes.
* src/analysis-tools.c (prepare_output): Use
workbook_sheet_get_free_name to ensure that we don't create more
than one sheet with the same name.
* src/eval.c (dump_cell_list, sheet_dump_dependencies): Dump
sheet->name_unquoted instead of sheet->name.
* src/expr-name.c (name_sheet_title): Make value from
sheet->name_quoted instead of sheet->name. FIXME: Is this correct?
* src/gnumeric-sheet.c (selection_insert_selection_string): Make
selection string from sheet->name_quoted instead of quoting
sheet->name here.
* src/print-info.c (render_tab): Render sheet->name_unquoted
instead of sheet->name.
* src/print-preview.c (create_toplevel): Use sheet->name_unquoted
instead of sheet->name in window title.
* src/selection.c (sheet_selection_to_string, range_to_string):
Make reference string from sheet->name_quoted instead of quoting
sheet->name here.
* src/sheet.[ch] (sheet_quote_name): Rename to
sheet_name_quote. Take name_unquoted parameter, not a sheet.
* src/sheet.c (sheet_rename, sheet_new): Set both
sheet->name_quoted and sheet->name_unquoted.
(sheet_destroy): Free both sheet->name_quoted and
name_unquoted.
(cellref_name): Make reference from sheet->name_quoted instead of
quoting sheet->name here.
* src/test.c (thrash_sheet): Use sheet->name_unquoted instead of
sheet->name in debug output.
* src/value-sheet.c (value_dump): Dump sheet->name_quoted instead
of quoting sheet->name here.
(encode_cellref): Use sheet->name_quoted instead of quoting
sheet->name here.
* src/workbook.[ch] (workbook_sheet_get_free_name): Make it more
generally useful: Add "base" and "always_suffix" parameters. The
caller should now select the base to make the name from
(e.g. "Sheet"), and specify whether or not a suffix should be
added when the name "base" is not in use.
* src/workbook.c (insert_sheet_cmd): Use new signature of
workbook_sheet_get_free_name.
(workbook_rename_sheet): Insert unquoted name in hash table.
(sheet_label_text_changed_signal): Remove test for quote
characters in sheet name.
(sheet_action_delete_sheet): Prompt with name_unquoted instead of
name.
(sheet_action_rename_sheet, workbook_attach_sheet): Use
name_unquoted instead on name.
(workbook_detach_sheet): Use sheet->name_unquoted as hash key
instead of sheet->name.
* src/workbook-cmd-format.c
(workbook_cmd_format_sheet_change_name): Use name_unquoted instead
on name.
* src/xml-io.c (xml_sheet_write): Output sheet->name_unquoted
instead of sheet->name.
* src/dialogs/dialog-sheet-order.c (dialog_sheet_order_impl): Make
list header passive.
(add_to_sheet_clist, delete_cb): Substitute sheet->name_unquoted
for sheet->name.
* src/dialogs/dialog-zoom.c (dialog_zoom_impl): Ditto.
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/dialogs/dialog-analysis-tools.c (struct
......
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/sheet.h (struct _Sheet): Replace member name with
name_quoted and name_unquoted. In name_quoted, names with spaces
or quote characters are protected with quotes.
* src/analysis-tools.c (prepare_output): Use
workbook_sheet_get_free_name to ensure that we don't create more
than one sheet with the same name.
* src/eval.c (dump_cell_list, sheet_dump_dependencies): Dump
sheet->name_unquoted instead of sheet->name.
* src/expr-name.c (name_sheet_title): Make value from
sheet->name_quoted instead of sheet->name. FIXME: Is this correct?
* src/gnumeric-sheet.c (selection_insert_selection_string): Make
selection string from sheet->name_quoted instead of quoting
sheet->name here.
* src/print-info.c (render_tab): Render sheet->name_unquoted
instead of sheet->name.
* src/print-preview.c (create_toplevel): Use sheet->name_unquoted
instead of sheet->name in window title.
* src/selection.c (sheet_selection_to_string, range_to_string):
Make reference string from sheet->name_quoted instead of quoting
sheet->name here.
* src/sheet.[ch] (sheet_quote_name): Rename to
sheet_name_quote. Take name_unquoted parameter, not a sheet.
* src/sheet.c (sheet_rename, sheet_new): Set both
sheet->name_quoted and sheet->name_unquoted.
(sheet_destroy): Free both sheet->name_quoted and
name_unquoted.
(cellref_name): Make reference from sheet->name_quoted instead of
quoting sheet->name here.
* src/test.c (thrash_sheet): Use sheet->name_unquoted instead of
sheet->name in debug output.
* src/value-sheet.c (value_dump): Dump sheet->name_quoted instead
of quoting sheet->name here.
(encode_cellref): Use sheet->name_quoted instead of quoting
sheet->name here.
* src/workbook.[ch] (workbook_sheet_get_free_name): Make it more
generally useful: Add "base" and "always_suffix" parameters. The
caller should now select the base to make the name from
(e.g. "Sheet"), and specify whether or not a suffix should be
added when the name "base" is not in use.
* src/workbook.c (insert_sheet_cmd): Use new signature of
workbook_sheet_get_free_name.
(workbook_rename_sheet): Insert unquoted name in hash table.
(sheet_label_text_changed_signal): Remove test for quote
characters in sheet name.
(sheet_action_delete_sheet): Prompt with name_unquoted instead of
name.
(sheet_action_rename_sheet, workbook_attach_sheet): Use
name_unquoted instead on name.
(workbook_detach_sheet): Use sheet->name_unquoted as hash key
instead of sheet->name.
* src/workbook-cmd-format.c
(workbook_cmd_format_sheet_change_name): Use name_unquoted instead
on name.
* src/xml-io.c (xml_sheet_write): Output sheet->name_unquoted
instead of sheet->name.
* src/dialogs/dialog-sheet-order.c (dialog_sheet_order_impl): Make
list header passive.
(add_to_sheet_clist, delete_cb): Substitute sheet->name_unquoted
for sheet->name.
* src/dialogs/dialog-zoom.c (dialog_zoom_impl): Ditto.
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/dialogs/dialog-analysis-tools.c (struct
......
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/sheet.h (struct _Sheet): Replace member name with
name_quoted and name_unquoted. In name_quoted, names with spaces
or quote characters are protected with quotes.
* src/analysis-tools.c (prepare_output): Use
workbook_sheet_get_free_name to ensure that we don't create more
than one sheet with the same name.
* src/eval.c (dump_cell_list, sheet_dump_dependencies): Dump
sheet->name_unquoted instead of sheet->name.
* src/expr-name.c (name_sheet_title): Make value from
sheet->name_quoted instead of sheet->name. FIXME: Is this correct?
* src/gnumeric-sheet.c (selection_insert_selection_string): Make
selection string from sheet->name_quoted instead of quoting
sheet->name here.
* src/print-info.c (render_tab): Render sheet->name_unquoted
instead of sheet->name.
* src/print-preview.c (create_toplevel): Use sheet->name_unquoted
instead of sheet->name in window title.
* src/selection.c (sheet_selection_to_string, range_to_string):
Make reference string from sheet->name_quoted instead of quoting
sheet->name here.
* src/sheet.[ch] (sheet_quote_name): Rename to
sheet_name_quote. Take name_unquoted parameter, not a sheet.
* src/sheet.c (sheet_rename, sheet_new): Set both
sheet->name_quoted and sheet->name_unquoted.
(sheet_destroy): Free both sheet->name_quoted and
name_unquoted.
(cellref_name): Make reference from sheet->name_quoted instead of
quoting sheet->name here.
* src/test.c (thrash_sheet): Use sheet->name_unquoted instead of
sheet->name in debug output.
* src/value-sheet.c (value_dump): Dump sheet->name_quoted instead
of quoting sheet->name here.
(encode_cellref): Use sheet->name_quoted instead of quoting
sheet->name here.
* src/workbook.[ch] (workbook_sheet_get_free_name): Make it more
generally useful: Add "base" and "always_suffix" parameters. The
caller should now select the base to make the name from
(e.g. "Sheet"), and specify whether or not a suffix should be
added when the name "base" is not in use.
* src/workbook.c (insert_sheet_cmd): Use new signature of
workbook_sheet_get_free_name.
(workbook_rename_sheet): Insert unquoted name in hash table.
(sheet_label_text_changed_signal): Remove test for quote
characters in sheet name.
(sheet_action_delete_sheet): Prompt with name_unquoted instead of
name.
(sheet_action_rename_sheet, workbook_attach_sheet): Use
name_unquoted instead on name.
(workbook_detach_sheet): Use sheet->name_unquoted as hash key
instead of sheet->name.
* src/workbook-cmd-format.c
(workbook_cmd_format_sheet_change_name): Use name_unquoted instead
on name.
* src/xml-io.c (xml_sheet_write): Output sheet->name_unquoted
instead of sheet->name.
* src/dialogs/dialog-sheet-order.c (dialog_sheet_order_impl): Make
list header passive.
(add_to_sheet_clist, delete_cb): Substitute sheet->name_unquoted
for sheet->name.
* src/dialogs/dialog-zoom.c (dialog_zoom_impl): Ditto.
2000-04-08 Jon K Hellan <hellan@acm.org>
* src/dialogs/dialog-analysis-tools.c (struct
......
2000-04-08 Jon K Hellan <hellan@acm.org>
* ms-excel-read.c (ms_excel_set_xf, ms_excel_read_formula,
ms_excel_read_sheet): Use
gnum_sheet->name_unquoted instead of gnum_sheet->name in debug
output.
(ms_excel_read_workbook): Remove unused variable to silence
warning.
* ms-excel-write.c (write_externsheets): Output
gnum_sheet->name_quoted instead of gnum_sheet->name. FIXME: Is
this correct?
(write_sheet): Use gnum_sheet->name_unquoted instead of
gnum_sheet->name in debug output.
(write_workbook): Output gnum_sheet->name_unquoted instead of
gnum_sheet->name.
* ms-formula-read.c (ms_excel_parse_formula): Use
gnum_sheet->name_unquoted instead of gnum_sheet->name in debug
output.
* ms-obj.c (object_anchor_to_position): Ditto.
2000-04-06 Jody Goldberg <jgoldberg@home.com>
* ms-excel-read.c (ms_excel_read_workbook) : Move deep freeze/thaw to
......
......@@ -1302,7 +1302,8 @@ ms_excel_set_xf (ExcelSheet *sheet, int col, int row, guint16 xfidx)
#ifndef NO_DEBUG_EXCEL
if (ms_excel_color_debug > 2) {
printf ("%s!%s%d\n", sheet->gnum_sheet->name, col_name(col), row+1);
printf ("%s!%s%d\n", sheet->gnum_sheet->name_unquoted,
col_name(col), row+1);
}
#endif
......@@ -1918,8 +1919,9 @@ ms_excel_read_formula (BiffQuery *q, ExcelSheet *sheet)
if (ms_excel_read_debug > 0) {
printf ("%s:%s : has type 3 contents. "
"Is it an empty cell ?\n",
sheet->gnum_sheet->name,
cell_name (cell->col->pos, cell->row->pos));
sheet->gnum_sheet->name_unquoted,
cell_name (cell->col->pos,
cell->row->pos));
if (ms_excel_read_debug > 5)
ms_ole_dump (q->data+6, 8);
}
......@@ -3073,7 +3075,7 @@ ms_excel_read_sheet (ExcelSheet *sheet, BiffQuery *q, ExcelWorkbook *wb)
#ifndef NO_DEBUG_EXCEL
if (ms_excel_read_debug > 1) {
printf ("----------------- '%s' -------------\n",
sheet->gnum_sheet->name);
sheet->gnum_sheet->name_unquoted);
}
#endif
......@@ -4020,8 +4022,6 @@ ms_excel_read_workbook (CommandContext *context, Workbook *workbook,
#endif
if (wb) {
Workbook *workbook = wb->gnum_wb;
/* Cleanup */
ms_excel_workbook_destroy (wb);
......
......@@ -256,6 +256,7 @@ write_magic_interface (BiffPut *bp, eBiff_version ver)
}
}
/* FIXME: Not sure if name should be quoted or not */
static void
write_externsheets (BiffPut *bp, ExcelWorkbook *wb, ExcelSheet *ignore)
{
......@@ -279,7 +280,7 @@ write_externsheets (BiffPut *bp, ExcelWorkbook *wb, ExcelSheet *ignore)
for (lp = 0; lp < num_sheets; lp++) {
ExcelSheet *sheet = g_ptr_array_index (wb->sheets, lp);
gint len = strlen (sheet->gnum_sheet->name);
gint len = strlen (sheet->gnum_sheet->name_quoted);
guint8 data[8];
if (sheet == ignore) continue;
......@@ -288,7 +289,8 @@ write_externsheets (BiffPut *bp, ExcelWorkbook *wb, ExcelSheet *ignore)
MS_OLE_SET_GUINT8(data, len);
MS_OLE_SET_GUINT8(data + 1, 3); /* Magic */
ms_biff_put_var_write (bp, data, 2);
biff_put_text (bp, sheet->gnum_sheet->name, wb->ver, FALSE, AS_PER_VER);
biff_put_text (bp, sheet->gnum_sheet->name_quoted,
wb->ver, FALSE, AS_PER_VER);
ms_biff_put_commit (bp);
}
}
......@@ -3191,7 +3193,8 @@ write_sheet (BiffPut *bp, ExcelSheet *sheet)
#ifndef NO_DEBUG_EXCEL
if (ms_excel_write_debug > 1)
printf ("Saving sheet '%s' geom (%d, %d)\n",
sheet->gnum_sheet->name, sheet->maxx, sheet->maxy);
sheet->gnum_sheet->name_unquoted,
sheet->maxx, sheet->maxy);
#endif
for (y = 0; y < sheet->maxy; y = block_end + 1)
block_end = write_block (bp, sheet, y, rows_in_block);
......@@ -3322,7 +3325,7 @@ write_workbook (BiffPut *bp, ExcelWorkbook *wb, eBiff_version ver)
s = g_ptr_array_index (wb->sheets, lp);
s->boundsheetPos = biff_boundsheet_write_first
(bp, eBiffTWorksheet,
s->gnum_sheet->name, wb->ver);
s->gnum_sheet->name_unquoted, wb->ver);
ms_formula_write_pre_data (bp, s, EXCEL_NAME, wb->ver);
}
......
......@@ -800,7 +800,8 @@ ms_excel_parse_formula (ExcelWorkbook *wb, ExcelSheet *sheet, guint8 const *mem,
#ifndef NO_DEBUG_EXCEL
if (ms_excel_formula_debug > 1) {
printf ("\n\n%s:%s%s\n", (sheet->gnum_sheet
? sheet->gnum_sheet->name : ""),
? sheet->gnum_sheet->name_unquoted
: ""),
cell_name (fn_col,fn_row), (shared?" (shared)":""));
}
#endif
......@@ -1087,7 +1088,7 @@ ms_excel_parse_formula (ExcelWorkbook *wb, ExcelSheet *sheet, guint8 const *mem,
printf("Unknown shared formula "
"@ %s:%s\n",
(sheet->gnum_sheet
? sheet->gnum_sheet->name
? sheet->gnum_sheet->name_unquoted
: ""),
cell_name (fn_col, fn_row)) ;
}
......@@ -1434,7 +1435,7 @@ ms_excel_parse_formula (ExcelWorkbook *wb, ExcelSheet *sheet, guint8 const *mem,
if (ms_excel_formula_debug > 0) {
printf ("Unknown Formula/Array at %s:%s%s\n",
(sheet->gnum_sheet)?
sheet->gnum_sheet->name : "",
sheet->gnum_sheet->name_unquoted : "",
cell_name (fn_col,fn_row),
(shared?" (shared)":""));
printf ("formula data : \n") ;
......
......@@ -63,7 +63,7 @@ object_anchor_to_position (double pixels[4], MSObj*obj, Sheet const * sheet,
#ifndef NO_DEBUG_EXCEL
if (ms_excel_object_debug > 0)
printf ("%s\n", sheet->name);
printf ("%s\n", sheet->name_unquoted);
#endif
for (i = 0; i < 4; i++) {
int const pos = obj->anchor[i].pos;
......
2000-04-08 Jon K Hellan <hellan@acm.org>
* html.c (html_write_wb_html32, html_write_wb_html40): Output
sheet->name_unquoted instead of sheet->name.
(html_read): Gettextize sheet name template.
* latex.c (html_write_wb_latex, html_write_wb_latex2e): Output
sheet->name_unquoted instead of sheet->name.
* roff.c (write_wb_roff): Ditto
2000-03-23 Jody Goldberg <jgoldberg@home.com>
* epsf.c (epsf_write_cell) : Add HALIGN_CENTER_ACROSS_SELECTION.
......
......@@ -190,6 +190,8 @@ html_write_cell40 (FILE *fp, Cell *cell, MStyle *style)