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

Add print_debugging variable / debug_print startup option.

2000-09-11  Jon K Hellan  <hellan@acm.org>

	* src/main.c: Add print_debugging variable / debug_print startup
	option.
	(gnumeric_main): Make stdout line buffered - we only use it for
	debug info.

	* src/print-cell.[ch] (print_make_rectangle_path): New function: make
	a rectangular gnome-print path.
	* src/print-cell.c (print_cell): Use it.

	* src/print.c (print_empty_pages variable): Remove. This variable
	is never set. With the new repeated row/column handling, the logic
	will have to be rewritten anyway if needed.
	(print_page_repeated_rows): Remove unused parameters start_row and
	end_row.
	(print_page_repeated_cols): s/row/col/. Fix bug - was repeat_left,
	corrected to repeat_top.
	(print_page_object): Remove unused parameters page_width /
	page_height and end_col / end_row.
	(print_hf_element): Rename from print_hf
	(print_hf_line): New function. Logic shared by print_header and
	print_footer. Clip to header region. if print_debugging != 0, draw
	a box around header region.
	(print_headers): Use print_hf_line. Place at correct y position -
	ascenders flush with inside of top margin.
	(print_footers): Descenders flush with inside of bottom
	margin. Otherwise like headers.
	(print_page): Include logic for repeated rows and columns: They
	are only repeated after the start of the repeating range has been
	seen in the regular page flow. Fix grid size bug when centering
	horizontally or vertically. Use print_make_rectangle_path.  Remove
	print_empty_pages logic.
	(compute_group): New function. Old compute groups changed to only
	compute one page. Rationale: Available space on page for normal
	cell flow changes once repeated rows/columns kick in, so there is
	no gain in precomputing a list.
	(render_sheet_objects): New function. Factored out of
	print_sheet_range.
	(print_range_down_then_right): New function. Used to be the row
	major loop of print_sheet_range. Include logic for repeated rows
	and columns (see print_page).
	(print_range_right_then_down): s/row major/column major/
	(print_sheet_range): Restructure into a small function that calls
	render_sheet_objects, print_range_down_then_right,
	print_range_right_then_down.
	(compute_sheet_pages): Remove print_empty_pages logic. The
	variable is never set. With the new repeated row/column handling,
	the logic will have to be rewritten anyway if needed.
	(compute_sheet_pages, print_sheet): Remove "key" parameter because
	we are now called from g_list_foreach instead of
	g_hash_table_foreach.

	(compute_pages): Use list returned by workbook_sheets instead of
	wb->sheets so sheets are processed in order.
	(workbook_print_all): Print sheets in display order. To do so, use
	list returned by workbook_sheets instead of wb->sheets.
	(sheet_print): Use changed print_sheet signature.

	* src/workbook.h (struct _Workbook): Rename "sheets" to
	sheet_hash_private.

	* src/workbook.c (workbook_do_destroy, workbook_do_destroy,
	workbook_set_dirty, workbook_is_dirty, workbook_is_pristine,
	workbook_init, workbook_rename_sheet, workbook_sheet_count,
	workbook_attach_sheet, workbook_detach_sheet,
	workbook_sheet_lookup): s/wb->sheets/wb->sheet_hash_private/
	(cb_assemble_selection, workbook_selection_to_string): Not in
	use. Remove.

	* src/workbook-view.c (workbook_view_pref_visibility):
	s/wb->sheets/wb->sheet_hash_private/
parent 44cc9dad
2000-09-11 Jon K Hellan <hellan@acm.org>
* src/main.c: Add print_debugging variable / debug_print startup
option.
(gnumeric_main): Make stdout line buffered - we only use it for
debug info.
* src/print-cell.[ch] (print_make_rectangle_path): New function: make
a rectangular gnome-print path.
* src/print-cell.c (print_cell): Use it.
* src/print.c (print_empty_pages variable): Remove. This variable
is never set. With the new repeated row/column handling, the logic
will have to be rewritten anyway if needed.
(print_page_repeated_rows): Remove unused parameters start_row and
end_row.
(print_page_repeated_cols): s/row/col/. Fix bug - was repeat_left,
corrected to repeat_top.
(print_page_object): Remove unused parameters page_width /
page_height and end_col / end_row.
(print_hf_element): Rename from print_hf
(print_hf_line): New function. Logic shared by print_header and
print_footer. Clip to header region. if print_debugging != 0, draw
a box around header region.
(print_headers): Use print_hf_line. Place at correct y position -
ascenders flush with inside of top margin.
(print_footers): Descenders flush with inside of bottom
margin. Otherwise like headers.
(print_page): Include logic for repeated rows and columns: They
are only repeated after the start of the repeating range has been
seen in the regular page flow. Fix grid size bug when centering
horizontally or vertically. Use print_make_rectangle_path. Remove
print_empty_pages logic.
(compute_group): New function. Old compute groups changed to only
compute one page. Rationale: Available space on page for normal
cell flow changes once repeated rows/columns kick in, so there is
no gain in precomputing a list.
(render_sheet_objects): New function. Factored out of
print_sheet_range.
(print_range_down_then_right): New function. Used to be the row
major loop of print_sheet_range. Include logic for repeated rows
and columns (see print_page).
(print_range_right_then_down): s/row major/column major/
(print_sheet_range): Restructure into a small function that calls
render_sheet_objects, print_range_down_then_right,
print_range_right_then_down.
(compute_sheet_pages): Remove print_empty_pages logic. The
variable is never set. With the new repeated row/column handling,
the logic will have to be rewritten anyway if needed.
(compute_sheet_pages, print_sheet): Remove "key" parameter because
we are now called from g_list_foreach instead of
g_hash_table_foreach.
(compute_pages): Use list returned by workbook_sheets instead of
wb->sheets so sheets are processed in order.
(workbook_print_all): Print sheets in display order. To do so, use
list returned by workbook_sheets instead of wb->sheets.
(sheet_print): Use changed print_sheet signature.
* src/workbook.h (struct _Workbook): Rename "sheets" to
sheet_hash_private.
* src/workbook.c (workbook_do_destroy, workbook_do_destroy,
workbook_set_dirty, workbook_is_dirty, workbook_is_pristine,
workbook_init, workbook_rename_sheet, workbook_sheet_count,
workbook_attach_sheet, workbook_detach_sheet,
workbook_sheet_lookup): s/wb->sheets/wb->sheet_hash_private/
(cb_assemble_selection, workbook_selection_to_string): Not in
use. Remove.
* src/workbook-view.c (workbook_view_pref_visibility):
s/wb->sheets/wb->sheet_hash_private/
2000-09-11 Morten Welinder <terra@diku.dk>
* configure.in (pspell): Quiet the test.
......
2000-09-11 Jon K Hellan <hellan@acm.org>
* src/main.c: Add print_debugging variable / debug_print startup
option.
(gnumeric_main): Make stdout line buffered - we only use it for
debug info.
* src/print-cell.[ch] (print_make_rectangle_path): New function: make
a rectangular gnome-print path.
* src/print-cell.c (print_cell): Use it.
* src/print.c (print_empty_pages variable): Remove. This variable
is never set. With the new repeated row/column handling, the logic
will have to be rewritten anyway if needed.
(print_page_repeated_rows): Remove unused parameters start_row and
end_row.
(print_page_repeated_cols): s/row/col/. Fix bug - was repeat_left,
corrected to repeat_top.
(print_page_object): Remove unused parameters page_width /
page_height and end_col / end_row.
(print_hf_element): Rename from print_hf
(print_hf_line): New function. Logic shared by print_header and
print_footer. Clip to header region. if print_debugging != 0, draw
a box around header region.
(print_headers): Use print_hf_line. Place at correct y position -
ascenders flush with inside of top margin.
(print_footers): Descenders flush with inside of bottom
margin. Otherwise like headers.
(print_page): Include logic for repeated rows and columns: They
are only repeated after the start of the repeating range has been
seen in the regular page flow. Fix grid size bug when centering
horizontally or vertically. Use print_make_rectangle_path. Remove
print_empty_pages logic.
(compute_group): New function. Old compute groups changed to only
compute one page. Rationale: Available space on page for normal
cell flow changes once repeated rows/columns kick in, so there is
no gain in precomputing a list.
(render_sheet_objects): New function. Factored out of
print_sheet_range.
(print_range_down_then_right): New function. Used to be the row
major loop of print_sheet_range. Include logic for repeated rows
and columns (see print_page).
(print_range_right_then_down): s/row major/column major/
(print_sheet_range): Restructure into a small function that calls
render_sheet_objects, print_range_down_then_right,
print_range_right_then_down.
(compute_sheet_pages): Remove print_empty_pages logic. The
variable is never set. With the new repeated row/column handling,
the logic will have to be rewritten anyway if needed.
(compute_sheet_pages, print_sheet): Remove "key" parameter because
we are now called from g_list_foreach instead of
g_hash_table_foreach.
(compute_pages): Use list returned by workbook_sheets instead of
wb->sheets so sheets are processed in order.
(workbook_print_all): Print sheets in display order. To do so, use
list returned by workbook_sheets instead of wb->sheets.
(sheet_print): Use changed print_sheet signature.
* src/workbook.h (struct _Workbook): Rename "sheets" to
sheet_hash_private.
* src/workbook.c (workbook_do_destroy, workbook_do_destroy,
workbook_set_dirty, workbook_is_dirty, workbook_is_pristine,
workbook_init, workbook_rename_sheet, workbook_sheet_count,
workbook_attach_sheet, workbook_detach_sheet,
workbook_sheet_lookup): s/wb->sheets/wb->sheet_hash_private/
(cb_assemble_selection, workbook_selection_to_string): Not in
use. Remove.
* src/workbook-view.c (workbook_view_pref_visibility):
s/wb->sheets/wb->sheet_hash_private/
2000-09-11 Morten Welinder <terra@diku.dk>
* configure.in (pspell): Quiet the test.
......
2000-09-11 Jon K Hellan <hellan@acm.org>
* src/main.c: Add print_debugging variable / debug_print startup
option.
(gnumeric_main): Make stdout line buffered - we only use it for
debug info.
* src/print-cell.[ch] (print_make_rectangle_path): New function: make
a rectangular gnome-print path.
* src/print-cell.c (print_cell): Use it.
* src/print.c (print_empty_pages variable): Remove. This variable
is never set. With the new repeated row/column handling, the logic
will have to be rewritten anyway if needed.
(print_page_repeated_rows): Remove unused parameters start_row and
end_row.
(print_page_repeated_cols): s/row/col/. Fix bug - was repeat_left,
corrected to repeat_top.
(print_page_object): Remove unused parameters page_width /
page_height and end_col / end_row.
(print_hf_element): Rename from print_hf
(print_hf_line): New function. Logic shared by print_header and
print_footer. Clip to header region. if print_debugging != 0, draw
a box around header region.
(print_headers): Use print_hf_line. Place at correct y position -
ascenders flush with inside of top margin.
(print_footers): Descenders flush with inside of bottom
margin. Otherwise like headers.
(print_page): Include logic for repeated rows and columns: They
are only repeated after the start of the repeating range has been
seen in the regular page flow. Fix grid size bug when centering
horizontally or vertically. Use print_make_rectangle_path. Remove
print_empty_pages logic.
(compute_group): New function. Old compute groups changed to only
compute one page. Rationale: Available space on page for normal
cell flow changes once repeated rows/columns kick in, so there is
no gain in precomputing a list.
(render_sheet_objects): New function. Factored out of
print_sheet_range.
(print_range_down_then_right): New function. Used to be the row
major loop of print_sheet_range. Include logic for repeated rows
and columns (see print_page).
(print_range_right_then_down): s/row major/column major/
(print_sheet_range): Restructure into a small function that calls
render_sheet_objects, print_range_down_then_right,
print_range_right_then_down.
(compute_sheet_pages): Remove print_empty_pages logic. The
variable is never set. With the new repeated row/column handling,
the logic will have to be rewritten anyway if needed.
(compute_sheet_pages, print_sheet): Remove "key" parameter because
we are now called from g_list_foreach instead of
g_hash_table_foreach.
(compute_pages): Use list returned by workbook_sheets instead of
wb->sheets so sheets are processed in order.
(workbook_print_all): Print sheets in display order. To do so, use
list returned by workbook_sheets instead of wb->sheets.
(sheet_print): Use changed print_sheet signature.
* src/workbook.h (struct _Workbook): Rename "sheets" to
sheet_hash_private.
* src/workbook.c (workbook_do_destroy, workbook_do_destroy,
workbook_set_dirty, workbook_is_dirty, workbook_is_pristine,
workbook_init, workbook_rename_sheet, workbook_sheet_count,
workbook_attach_sheet, workbook_detach_sheet,
workbook_sheet_lookup): s/wb->sheets/wb->sheet_hash_private/
(cb_assemble_selection, workbook_selection_to_string): Not in
use. Remove.
* src/workbook-view.c (workbook_view_pref_visibility):
s/wb->sheets/wb->sheet_hash_private/
2000-09-11 Morten Welinder <terra@diku.dk>
* configure.in (pspell): Quiet the test.
......
2000-09-11 Jon K Hellan <hellan@acm.org>
* src/main.c: Add print_debugging variable / debug_print startup
option.
(gnumeric_main): Make stdout line buffered - we only use it for
debug info.
* src/print-cell.[ch] (print_make_rectangle_path): New function: make
a rectangular gnome-print path.
* src/print-cell.c (print_cell): Use it.
* src/print.c (print_empty_pages variable): Remove. This variable
is never set. With the new repeated row/column handling, the logic
will have to be rewritten anyway if needed.
(print_page_repeated_rows): Remove unused parameters start_row and
end_row.
(print_page_repeated_cols): s/row/col/. Fix bug - was repeat_left,
corrected to repeat_top.
(print_page_object): Remove unused parameters page_width /
page_height and end_col / end_row.
(print_hf_element): Rename from print_hf
(print_hf_line): New function. Logic shared by print_header and
print_footer. Clip to header region. if print_debugging != 0, draw
a box around header region.
(print_headers): Use print_hf_line. Place at correct y position -
ascenders flush with inside of top margin.
(print_footers): Descenders flush with inside of bottom
margin. Otherwise like headers.
(print_page): Include logic for repeated rows and columns: They
are only repeated after the start of the repeating range has been
seen in the regular page flow. Fix grid size bug when centering
horizontally or vertically. Use print_make_rectangle_path. Remove
print_empty_pages logic.
(compute_group): New function. Old compute groups changed to only
compute one page. Rationale: Available space on page for normal
cell flow changes once repeated rows/columns kick in, so there is
no gain in precomputing a list.
(render_sheet_objects): New function. Factored out of
print_sheet_range.
(print_range_down_then_right): New function. Used to be the row
major loop of print_sheet_range. Include logic for repeated rows
and columns (see print_page).
(print_range_right_then_down): s/row major/column major/
(print_sheet_range): Restructure into a small function that calls
render_sheet_objects, print_range_down_then_right,
print_range_right_then_down.
(compute_sheet_pages): Remove print_empty_pages logic. The
variable is never set. With the new repeated row/column handling,
the logic will have to be rewritten anyway if needed.
(compute_sheet_pages, print_sheet): Remove "key" parameter because
we are now called from g_list_foreach instead of
g_hash_table_foreach.
(compute_pages): Use list returned by workbook_sheets instead of
wb->sheets so sheets are processed in order.
(workbook_print_all): Print sheets in display order. To do so, use
list returned by workbook_sheets instead of wb->sheets.
(sheet_print): Use changed print_sheet signature.
* src/workbook.h (struct _Workbook): Rename "sheets" to
sheet_hash_private.
* src/workbook.c (workbook_do_destroy, workbook_do_destroy,
workbook_set_dirty, workbook_is_dirty, workbook_is_pristine,
workbook_init, workbook_rename_sheet, workbook_sheet_count,
workbook_attach_sheet, workbook_detach_sheet,
workbook_sheet_lookup): s/wb->sheets/wb->sheet_hash_private/
(cb_assemble_selection, workbook_selection_to_string): Not in
use. Remove.
* src/workbook-view.c (workbook_view_pref_visibility):
s/wb->sheets/wb->sheet_hash_private/
2000-09-11 Morten Welinder <terra@diku.dk>
* configure.in (pspell): Quiet the test.
......
2000-09-11 Jon K Hellan <hellan@acm.org>
* src/main.c: Add print_debugging variable / debug_print startup
option.
(gnumeric_main): Make stdout line buffered - we only use it for
debug info.
* src/print-cell.[ch] (print_make_rectangle_path): New function: make
a rectangular gnome-print path.
* src/print-cell.c (print_cell): Use it.
* src/print.c (print_empty_pages variable): Remove. This variable
is never set. With the new repeated row/column handling, the logic
will have to be rewritten anyway if needed.
(print_page_repeated_rows): Remove unused parameters start_row and
end_row.
(print_page_repeated_cols): s/row/col/. Fix bug - was repeat_left,
corrected to repeat_top.
(print_page_object): Remove unused parameters page_width /
page_height and end_col / end_row.
(print_hf_element): Rename from print_hf
(print_hf_line): New function. Logic shared by print_header and
print_footer. Clip to header region. if print_debugging != 0, draw
a box around header region.
(print_headers): Use print_hf_line. Place at correct y position -
ascenders flush with inside of top margin.
(print_footers): Descenders flush with inside of bottom
margin. Otherwise like headers.
(print_page): Include logic for repeated rows and columns: They
are only repeated after the start of the repeating range has been
seen in the regular page flow. Fix grid size bug when centering
horizontally or vertically. Use print_make_rectangle_path. Remove
print_empty_pages logic.
(compute_group): New function. Old compute groups changed to only
compute one page. Rationale: Available space on page for normal
cell flow changes once repeated rows/columns kick in, so there is
no gain in precomputing a list.
(render_sheet_objects): New function. Factored out of
print_sheet_range.
(print_range_down_then_right): New function. Used to be the row
major loop of print_sheet_range. Include logic for repeated rows
and columns (see print_page).
(print_range_right_then_down): s/row major/column major/
(print_sheet_range): Restructure into a small function that calls
render_sheet_objects, print_range_down_then_right,
print_range_right_then_down.
(compute_sheet_pages): Remove print_empty_pages logic. The
variable is never set. With the new repeated row/column handling,
the logic will have to be rewritten anyway if needed.
(compute_sheet_pages, print_sheet): Remove "key" parameter because
we are now called from g_list_foreach instead of
g_hash_table_foreach.
(compute_pages): Use list returned by workbook_sheets instead of
wb->sheets so sheets are processed in order.
(workbook_print_all): Print sheets in display order. To do so, use
list returned by workbook_sheets instead of wb->sheets.
(sheet_print): Use changed print_sheet signature.
* src/workbook.h (struct _Workbook): Rename "sheets" to
sheet_hash_private.
* src/workbook.c (workbook_do_destroy, workbook_do_destroy,
workbook_set_dirty, workbook_is_dirty, workbook_is_pristine,
workbook_init, workbook_rename_sheet, workbook_sheet_count,
workbook_attach_sheet, workbook_detach_sheet,
workbook_sheet_lookup): s/wb->sheets/wb->sheet_hash_private/
(cb_assemble_selection, workbook_selection_to_string): Not in
use. Remove.
* src/workbook-view.c (workbook_view_pref_visibility):
s/wb->sheets/wb->sheet_hash_private/
2000-09-11 Morten Welinder <terra@diku.dk>
* configure.in (pspell): Quiet the test.
......
2000-09-11 Jon K Hellan <hellan@acm.org>
* src/main.c: Add print_debugging variable / debug_print startup
option.
(gnumeric_main): Make stdout line buffered - we only use it for
debug info.
* src/print-cell.[ch] (print_make_rectangle_path): New function: make
a rectangular gnome-print path.
* src/print-cell.c (print_cell): Use it.
* src/print.c (print_empty_pages variable): Remove. This variable
is never set. With the new repeated row/column handling, the logic
will have to be rewritten anyway if needed.
(print_page_repeated_rows): Remove unused parameters start_row and
end_row.
(print_page_repeated_cols): s/row/col/. Fix bug - was repeat_left,
corrected to repeat_top.
(print_page_object): Remove unused parameters page_width /
page_height and end_col / end_row.
(print_hf_element): Rename from print_hf
(print_hf_line): New function. Logic shared by print_header and
print_footer. Clip to header region. if print_debugging != 0, draw
a box around header region.
(print_headers): Use print_hf_line. Place at correct y position -
ascenders flush with inside of top margin.
(print_footers): Descenders flush with inside of bottom
margin. Otherwise like headers.
(print_page): Include logic for repeated rows and columns: They
are only repeated after the start of the repeating range has been
seen in the regular page flow. Fix grid size bug when centering
horizontally or vertically. Use print_make_rectangle_path. Remove
print_empty_pages logic.
(compute_group): New function. Old compute groups changed to only
compute one page. Rationale: Available space on page for normal
cell flow changes once repeated rows/columns kick in, so there is
no gain in precomputing a list.
(render_sheet_objects): New function. Factored out of
print_sheet_range.
(print_range_down_then_right): New function. Used to be the row
major loop of print_sheet_range. Include logic for repeated rows
and columns (see print_page).
(print_range_right_then_down): s/row major/column major/
(print_sheet_range): Restructure into a small function that calls
render_sheet_objects, print_range_down_then_right,
print_range_right_then_down.
(compute_sheet_pages): Remove print_empty_pages logic. The
variable is never set. With the new repeated row/column handling,
the logic will have to be rewritten anyway if needed.
(compute_sheet_pages, print_sheet): Remove "key" parameter because
we are now called from g_list_foreach instead of
g_hash_table_foreach.
(compute_pages): Use list returned by workbook_sheets instead of
wb->sheets so sheets are processed in order.
(workbook_print_all): Print sheets in display order. To do so, use
list returned by workbook_sheets instead of wb->sheets.
(sheet_print): Use changed print_sheet signature.
* src/workbook.h (struct _Workbook): Rename "sheets" to
sheet_hash_private.
* src/workbook.c (workbook_do_destroy, workbook_do_destroy,
workbook_set_dirty, workbook_is_dirty, workbook_is_pristine,
workbook_init, workbook_rename_sheet, workbook_sheet_count,
workbook_attach_sheet, workbook_detach_sheet,
workbook_sheet_lookup): s/wb->sheets/wb->sheet_hash_private/
(cb_assemble_selection, workbook_selection_to_string): Not in
use. Remove.
* src/workbook-view.c (workbook_view_pref_visibility):
s/wb->sheets/wb->sheet_hash_private/
2000-09-11 Morten Welinder <terra@diku.dk>
* configure.in (pspell): Quiet the test.
......
2000-09-11 Jon K Hellan <hellan@acm.org>
* src/main.c: Add print_debugging variable / debug_print startup
option.
(gnumeric_main): Make stdout line buffered - we only use it for
debug info.
* src/print-cell.[ch] (print_make_rectangle_path): New function: make
a rectangular gnome-print path.
* src/print-cell.c (print_cell): Use it.
* src/print.c (print_empty_pages variable): Remove. This variable
is never set. With the new repeated row/column handling, the logic
will have to be rewritten anyway if needed.
(print_page_repeated_rows): Remove unused parameters start_row and
end_row.
(print_page_repeated_cols): s/row/col/. Fix bug - was repeat_left,
corrected to repeat_top.
(print_page_object): Remove unused parameters page_width /
page_height and end_col / end_row.
(print_hf_element): Rename from print_hf
(print_hf_line): New function. Logic shared by print_header and
print_footer. Clip to header region. if print_debugging != 0, draw
a box around header region.
(print_headers): Use print_hf_line. Place at correct y position -
ascenders flush with inside of top margin.
(print_footers): Descenders flush with inside of bottom
margin. Otherwise like headers.
(print_page): Include logic for repeated rows and columns: They
are only repeated after the start of the repeating range has been
seen in the regular page flow. Fix grid size bug when centering
horizontally or vertically. Use print_make_rectangle_path. Remove
print_empty_pages logic.
(compute_group): New function. Old compute groups changed to only
compute one page. Rationale: Available space on page for normal
cell flow changes once repeated rows/columns kick in, so there is
no gain in precomputing a list.
(render_sheet_objects): New function. Factored out of
print_sheet_range.
(print_range_down_then_right): New function. Used to be the row
major loop of print_sheet_range. Include logic for repeated rows
and columns (see print_page).
(print_range_right_then_down): s/row major/column major/
(print_sheet_range): Restructure into a small function that calls
render_sheet_objects, print_range_down_then_right,
print_range_right_then_down.
(compute_sheet_pages): Remove print_empty_pages logic. The
variable is never set. With the new repeated row/column handling,
the logic will have to be rewritten anyway if needed.
(compute_sheet_pages, print_sheet): Remove "key" parameter because
we are now called from g_list_foreach instead of
g_hash_table_foreach.
(compute_pages): Use list returned by workbook_sheets instead of
wb->sheets so sheets are processed in order.
(workbook_print_all): Print sheets in display order. To do so, use
list returned by workbook_sheets instead of wb->sheets.
(sheet_print): Use changed print_sheet signature.
* src/workbook.h (struct _Workbook): Rename "sheets" to
sheet_hash_private.
* src/workbook.c (workbook_do_destroy, workbook_do_destroy,
workbook_set_dirty, workbook_is_dirty, workbook_is_pristine,
workbook_init, workbook_rename_sheet, workbook_sheet_count,
workbook_attach_sheet, workbook_detach_sheet,
workbook_sheet_lookup): s/wb->sheets/wb->sheet_hash_private/
(cb_assemble_selection, workbook_selection_to_string): Not in
use. Remove.
* src/workbook-view.c (workbook_view_pref_visibility):
s/wb->sheets/wb->sheet_hash_private/
2000-09-11 Morten Welinder <terra@diku.dk>
* configure.in (pspell): Quiet the test.
......
......@@ -52,6 +52,7 @@ int gnumeric_debugging = 0;
int style_debugging = 0;
int dependency_debugging = 0;
int immediate_exit_flag = 0;
int print_debugging = 0;
gboolean initial_worbook_open_complete = FALSE;
extern int ms_excel_read_debug;
extern int ms_excel_formula_debug;
......@@ -88,6 +89,8 @@ const struct poptOption gnumeric_popt_options [] = {
N_("Enables some style related debugging functions"), N_("LEVEL") },
{ "debug_deps", '\0', POPT_ARG_INT, &dependency_debugging, 0,
N_("Enables some dependency related debugging functions"), N_("LEVEL") },
{ "debug_print", '\0', POPT_ARG_INT, &print_debugging, 0,
N_("Enables some print debugging behaviour"), N_("LEVEL") },
{ "quit", '\0', POPT_ARG_NONE, &immediate_exit_flag, 0,
N_("Exit immediately after loading the selected books (useful for testing)."), NULL },
......@@ -138,6 +141,9 @@ gnumeric_main (void *closure, int argc, char *argv [])
Workbook *new_book;
CommandContext *context;
/* Make stdout line buffered - we only use it for debug info */
setvbuf (stdout, NULL, _IOLBF, 0);
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
textdomain (PACKAGE);
......
......@@ -52,6 +52,7 @@ int gnumeric_debugging = 0;
int style_debugging = 0;
int dependency_debugging = 0;
int immediate_exit_flag = 0;
int print_debugging = 0;
gboolean initial_worbook_open_complete = FALSE;
extern int ms_excel_read_debug;
extern int ms_excel_formula_debug;
......@@ -88,6 +89,8 @@ const struct poptOption gnumeric_popt_options [] = {
N_("Enables some style related debugging functions"), N_("LEVEL") },
{ "debug_deps", '\0', POPT_ARG_INT, &dependency_debugging, 0,
N_("Enables some dependency related debugging functions"), N_("LEVEL") },
{ "debug_print", '\0', POPT_ARG_INT, &print_debugging, 0,
N_("Enables some print debugging behaviour"), N_("LEVEL") },
{ "quit", '\0', POPT_ARG_NONE, &immediate_exit_flag, 0,
N_("Exit immediately after loading the selected books (useful for testing)."), NULL },
......@@ -138,6 +141,9 @@ gnumeric_main (void *closure, int argc, char *argv [])
Workbook *new_book;
CommandContext *context;
/* Make stdout line buffered - we only use it for debug info */
setvbuf (stdout, NULL, _IOLBF, 0);
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
textdomain (PACKAGE);
......
......@@ -189,6 +189,31 @@ cell_split_text (GnomeFont *font, char const *text, int const width)
return list;
}
/*
* print_make_rectangle_path
* @pc print context
* @left left side x coordinate
* @bottom bottom side y coordinate
* @right right side x coordinate
* @top top side y coordinate
*
* Make a rectangular path.
*/
void
print_make_rectangle_path (GnomePrintContext *pc,
double left, double bottom,
double right, double top)
{
g_return_if_fail (pc != NULL);
gnome_print_newpath (pc);
gnome_print_moveto (pc, left, bottom);
gnome_print_lineto (pc, left, top);
gnome_print_lineto (pc, right, top);
gnome_print_lineto (pc, right, bottom);
gnome_print_closepath (pc);
}
/*
* base_[xy] : Coordinates of the upper left corner of the cell.
* INCLUSIVE of the near grid line
......@@ -322,12 +347,8 @@ print_cell (Cell const *cell, MStyle *mstyle, CellSpanInfo const * const spaninf
clip_width -= ci->margin_a + ci->margin_b;
clip_height -= ri->margin_a + ri->margin_b;
gnome_print_gsave (context);
gnome_print_newpath (context);
gnome_print_moveto (context, clip_x, clip_y);
gnome_print_lineto (context, clip_x + clip_width, clip_y);
gnome_print_lineto (context, clip_x + clip_width, clip_y - clip_height);
gnome_print_lineto (context, clip_x, clip_y - clip_height);
gnome_print_closepath (context);
print_make_rectangle_path (context, clip_x, clip_y - clip_height,
clip_x + clip_width, clip_y);
gnome_print_clip (context);
/* Set the font colour */
......@@ -508,6 +529,8 @@ print_cell (Cell const *cell, MStyle *mstyle, CellSpanInfo const * const spaninf
gnome_print_grestore (context);
}
/* We do not use print_make_rectangle_path here - because we do not want a
* new path. */
static void
print_rectangle (GnomePrintContext *context,
double x, double y, double w, double h)
......
......@@ -19,4 +19,7 @@ void print_cell_grid (GnomePrintContext *context,
* disappear again once Gnumeric makes the switch */
int print_show_iso8859_1 (GnomePrintContext *pc, char const *text);
void print_make_rectangle_path (GnomePrintContext *pc,
double left, double bottom,
double right, double top);
#endif
This diff is collapsed.
......@@ -37,8 +37,8 @@ struct _Workbook {
ExprTree *auto_expr;
String *auto_expr_desc;
/* The sheets */
GHashTable *sheets; /* keeps a list of the Sheets on this workbook */
/* The sheets - The public accessor is workbook_sheets */
GHashTable *sheet_hash_private;
Sheet *current_sheet;
/* User defined names */
......
......@@ -175,7 +175,8 @@ cb_update_sheet_view_prefs (gpointer key, gpointer value, gpointer user_data)
void
workbook_view_pref_visibility (Workbook const * const wb)
{
g_hash_table_foreach (wb->sheets, &cb_update_sheet_view_prefs, NULL);
g_hash_table_foreach (wb->sheet_hash_private,
&cb_update_sheet_view_prefs, NULL);
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (wb->notebook),
wb->show_notebook_tabs);
}
......
......@@ -295,7 +295,8 @@ workbook_do_destroy (Workbook *wb)
wb->eval_queue = NULL;
/* Erase all cells. */
g_hash_table_foreach (wb->sheets, &cb_sheet_destroy_contents, NULL);
g_hash_table_foreach (wb->sheet_hash_private,
&cb_sheet_destroy_contents, NULL);
if (wb->auto_expr_desc)
string_unref (wb->auto_expr_desc);
......@@ -342,7 +343,7 @@ workbook_do_destroy (Workbook *wb)
/* Now do deletions that will put this workbook into a weird
state. Careful here. */
g_hash_table_destroy (wb->sheets);
g_hash_table_destroy (wb->sheet_hash_private);
if (wb->filename)
g_free (wb->filename);
......@@ -391,7 +392,8 @@ workbook_set_dirty (Workbook *wb, gboolean is_dirty)
{
g_return_if_fail (wb != NULL);
g_hash_table_foreach (wb->sheets, cb_sheet_mark_dirty, GINT_TO_POINTER (is_dirty));
g_hash_table_foreach (wb->sheet_hash_private,
cb_sheet_mark_dirty, GINT_TO_POINTER (is_dirty));
}
static void
......@@ -416,7 +418,7 @@ workbook_is_dirty (Workbook *wb)
g_return_val_if_fail (wb != NULL, FALSE);
g_hash_table_foreach (wb->sheets, cb_sheet_check_dirty,
g_hash_table_foreach (wb->sheet_hash_private, cb_sheet_check_dirty,
&dirty);
return dirty;
......@@ -459,7 +461,7 @@ workbook_is_pristine (Workbook *wb)
return FALSE;
/* Check if we seem to contain anything */
g_hash_table_foreach (wb->sheets, cb_sheet_check_pristine,
g_hash_table_foreach (wb->sheet_hash_private, cb_sheet_check_pristine,
&pristine);
return pristine;
......@@ -2411,7 +2413,8 @@ workbook_init (GtkObject *object)
wb->priv = workbook_private_new ();
wb->sheets = g_hash_table_new (gnumeric_strcase_hash, gnumeric_strcase_equal);
wb->sheet_hash_private = g_hash_table_new (gnumeric_strcase_hash,
gnumeric_strcase_equal);
wb->current_sheet= NULL;
wb->names = NULL;
wb->max_iterations = 1;
......@@ -2989,20 +2992,22 @@ workbook_rename_sheet (CommandContext *context,
}
/* Do not let two sheets in the workbook have the same name */
if (g_hash_table_lookup (wb->sheets, new_name)) {
if (g_hash_table_lookup (wb->sheet_hash_private, new_name)) {
gnumeric_error_invalid (context,
_("Duplicate Sheet name"),
new_name);
return TRUE;
}
sheet = (Sheet *) g_hash_table_lookup (wb->sheets, old_name);
sheet = (Sheet *) g_hash_table_lookup (wb->sheet_hash_private,
old_name);
g_return_val_if_fail (sheet != NULL, TRUE);
g_hash_table_remove (wb->sheets, old_name);
g_hash_table_remove (wb->sheet_hash_private, old_name);
sheet_rename (sheet, new_name);
g_hash_table_insert (wb->sheets, sheet->name_unquoted, sheet);
g_hash_table_insert (wb->sheet_hash_private,
sheet->name_unquoted, sheet);
sheet_set_dirty (sheet, TRUE);
......@@ -3241,7 +3246,7 @@ workbook_sheet_count (Workbook *wb)
{
g_return_val_if_fail (wb != NULL, 0);
return g_hash_table_size (wb->sheets);
return g_hash_table_size (wb->sheet_hash_private);
}