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

s/display_zero/hide_zero/ + necessary logic inversions


2001-02-18  Jody Goldberg <jgoldberg@home.com>

	s/display_zero/hide_zero/		+ necessary logic inversions
	s/show_grid/hide_grid/			+ necessary logic inversions
	s/show_col_header/hide_col_header/	+ necessary logic inversions
	s/show_row_header/hide_row_header/	+ necessary logic inversions
	s/wb_control_paste_special_enable/wb_control_menu_state_paste_special/
	s/wbcg_paste_special_enable/wbcg_menu_state_paste_special/

	* src/workbook-format-toolbar.c (workbook_format_toolbutton_update) :
	  Simplfy and use wbcg::updating_ui.
	(workbook_format_halign_feedback_set) : use simplified interface.
	(workbook_feedback_set) : Ditto.
	(set_selection_halign) : If the current alignment is already set to
	  the target type revert to general.

	* src/preview-grid.c (preview_grid_draw) : cell_draw::h_center
	  will default to width / 2.
	* src/item-grid.c (item_grid_draw_merged_range) : Ditto.
	(item_grid_draw) : Ditto.

	* src/print-cell.c (print_cell) : print_cell::h_center
	  will default to width / 2.
	(print_merged_range) : Ditto.
	(print_cell_range) : Ditto.

	* src/sheet.c (sheet_adjust_preferences) : Update the menus to reflect
	  changes in prefs.  Take a flag to control redraw requests.
	(sheet_menu_state_enable_insert) : new function.

	* src/workbook-control-gui.c (wbcg_menu_state_enable_insert) : Merge
	  all the insert col/row/cell menu updates into here.
	(wbcg_menu_state_sheet_prefs) : new function.
	(cb_sheet_pref_display_formulas) : reentrancy protection and use
	  sheet_adjust_preferences.
	(cb_sheet_pref_hide_zeros) : ditto.
	(cb_sheet_pref_hide_grid_lines) : ditto.
	(cb_sheet_pref_hide_col_header) : ditto.
	(cb_sheet_pref_hide_row_header) : ditto.
	(workbook_control_gui_init) : add the new menu items.
	(workbook_control_gui_ctor_class) : reorg a bit.

	src/workbook-control.c : reorg a bit.

2001-02-18  Jody Goldberg <jgoldberg@home.com>

	* configure.in : Make python plugin optional.

2001-02-18  Jody Goldberg <jgoldberg@home.com>

	* src/workbook-control.c (wb_control_sheet_add) : update menus here.

	* src/print-cell.c (print_cell) : fix the display zero logic.
	* src/cell-draw.c (cell_draw) : ditto.  And fix the comment.

2001-02-18  Jody Goldberg <jgoldberg@home.com>

	* src/cell.c (cell_default_halign) : Handle alignment of numbers
	  correctly when displaying formulas.

	* src/embeddable-grid.c (set_header_visibility) : start using our
	  native MVC.
	(Grid_set_header_visibility) : ditto.
	(embeddable_grid_set_header_visibility) : delete.

	* src/sheet-control-gui.c (scg_set_header_visibility) : delete.
	(scg_adjust_preferences) : Make this contingent on having a wbcg.

	* src/selection.c (sheet_selection_set_internal) : Use
	  sheet_menu_state_enable_insert.
	(sheet_selection_reset) : ditto.
parent be02e2b8
......@@ -4,6 +4,8 @@ and longer term bugs.
Release Critical
----------------
wbcg_menu_state_sheet_prefs : complete for bonobo.
toggle_menu_item : complete for bonobo.
Long term breakage
------------------
......
2001-02-18 Jody Goldberg <jgoldberg@home.com>
s/display_zero/hide_zero/ + necessary logic inversions
s/show_grid/hide_grid/ + necessary logic inversions
s/show_col_header/hide_col_header/ + necessary logic inversions
s/show_row_header/hide_row_header/ + necessary logic inversions
s/wb_control_paste_special_enable/wb_control_menu_state_paste_special/
s/wbcg_paste_special_enable/wbcg_menu_state_paste_special/
* src/workbook-format-toolbar.c (workbook_format_toolbutton_update) :
Simplfy and use wbcg::updating_ui.
(workbook_format_halign_feedback_set) : use simplified interface.
(workbook_feedback_set) : Ditto.
(set_selection_halign) : If the current alignment is already set to
the target type revert to general.
* src/preview-grid.c (preview_grid_draw) : cell_draw::h_center
will default to width / 2.
* src/item-grid.c (item_grid_draw_merged_range) : Ditto.
(item_grid_draw) : Ditto.
* src/print-cell.c (print_cell) : print_cell::h_center
will default to width / 2.
(print_merged_range) : Ditto.
(print_cell_range) : Ditto.
* src/sheet.c (sheet_adjust_preferences) : Update the menus to reflect
changes in prefs. Take a flag to control redraw requests.
(sheet_menu_state_enable_insert) : new function.
* src/workbook-control-gui.c (wbcg_menu_state_enable_insert) : Merge
all the insert col/row/cell menu updates into here.
(wbcg_menu_state_sheet_prefs) : new function.
(cb_sheet_pref_display_formulas) : reentrancy protection and use
sheet_adjust_preferences.
(cb_sheet_pref_hide_zeros) : ditto.
(cb_sheet_pref_hide_grid_lines) : ditto.
(cb_sheet_pref_hide_col_header) : ditto.
(cb_sheet_pref_hide_row_header) : ditto.
(workbook_control_gui_init) : add the new menu items.
(workbook_control_gui_ctor_class) : reorg a bit.
src/workbook-control.c : reorg a bit.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* configure.in : Make python plugin optional.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control.c (wb_control_sheet_add) : update menus here.
* src/print-cell.c (print_cell) : fix the display zero logic.
* src/cell-draw.c (cell_draw) : ditto. And fix the comment.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_default_halign) : Handle alignment of numbers
correctly when displaying formulas.
* src/embeddable-grid.c (set_header_visibility) : start using our
native MVC.
(Grid_set_header_visibility) : ditto.
(embeddable_grid_set_header_visibility) : delete.
* src/sheet-control-gui.c (scg_set_header_visibility) : delete.
(scg_adjust_preferences) : Make this contingent on having a wbcg.
* src/selection.c (sheet_selection_set_internal) : Use
sheet_menu_state_enable_insert.
(sheet_selection_reset) : ditto.
2001-02-18 Almer S. Tigelaar <almer1@dds.nl>
* src/sheet-private.h : Add flag for insert cells.
......
2001-02-18 Jody Goldberg <jgoldberg@home.com>
s/display_zero/hide_zero/ + necessary logic inversions
s/show_grid/hide_grid/ + necessary logic inversions
s/show_col_header/hide_col_header/ + necessary logic inversions
s/show_row_header/hide_row_header/ + necessary logic inversions
s/wb_control_paste_special_enable/wb_control_menu_state_paste_special/
s/wbcg_paste_special_enable/wbcg_menu_state_paste_special/
* src/workbook-format-toolbar.c (workbook_format_toolbutton_update) :
Simplfy and use wbcg::updating_ui.
(workbook_format_halign_feedback_set) : use simplified interface.
(workbook_feedback_set) : Ditto.
(set_selection_halign) : If the current alignment is already set to
the target type revert to general.
* src/preview-grid.c (preview_grid_draw) : cell_draw::h_center
will default to width / 2.
* src/item-grid.c (item_grid_draw_merged_range) : Ditto.
(item_grid_draw) : Ditto.
* src/print-cell.c (print_cell) : print_cell::h_center
will default to width / 2.
(print_merged_range) : Ditto.
(print_cell_range) : Ditto.
* src/sheet.c (sheet_adjust_preferences) : Update the menus to reflect
changes in prefs. Take a flag to control redraw requests.
(sheet_menu_state_enable_insert) : new function.
* src/workbook-control-gui.c (wbcg_menu_state_enable_insert) : Merge
all the insert col/row/cell menu updates into here.
(wbcg_menu_state_sheet_prefs) : new function.
(cb_sheet_pref_display_formulas) : reentrancy protection and use
sheet_adjust_preferences.
(cb_sheet_pref_hide_zeros) : ditto.
(cb_sheet_pref_hide_grid_lines) : ditto.
(cb_sheet_pref_hide_col_header) : ditto.
(cb_sheet_pref_hide_row_header) : ditto.
(workbook_control_gui_init) : add the new menu items.
(workbook_control_gui_ctor_class) : reorg a bit.
src/workbook-control.c : reorg a bit.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* configure.in : Make python plugin optional.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control.c (wb_control_sheet_add) : update menus here.
* src/print-cell.c (print_cell) : fix the display zero logic.
* src/cell-draw.c (cell_draw) : ditto. And fix the comment.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_default_halign) : Handle alignment of numbers
correctly when displaying formulas.
* src/embeddable-grid.c (set_header_visibility) : start using our
native MVC.
(Grid_set_header_visibility) : ditto.
(embeddable_grid_set_header_visibility) : delete.
* src/sheet-control-gui.c (scg_set_header_visibility) : delete.
(scg_adjust_preferences) : Make this contingent on having a wbcg.
* src/selection.c (sheet_selection_set_internal) : Use
sheet_menu_state_enable_insert.
(sheet_selection_reset) : ditto.
2001-02-18 Almer S. Tigelaar <almer1@dds.nl>
* src/sheet-private.h : Add flag for insert cells.
......
2001-02-18 Jody Goldberg <jgoldberg@home.com>
s/display_zero/hide_zero/ + necessary logic inversions
s/show_grid/hide_grid/ + necessary logic inversions
s/show_col_header/hide_col_header/ + necessary logic inversions
s/show_row_header/hide_row_header/ + necessary logic inversions
s/wb_control_paste_special_enable/wb_control_menu_state_paste_special/
s/wbcg_paste_special_enable/wbcg_menu_state_paste_special/
* src/workbook-format-toolbar.c (workbook_format_toolbutton_update) :
Simplfy and use wbcg::updating_ui.
(workbook_format_halign_feedback_set) : use simplified interface.
(workbook_feedback_set) : Ditto.
(set_selection_halign) : If the current alignment is already set to
the target type revert to general.
* src/preview-grid.c (preview_grid_draw) : cell_draw::h_center
will default to width / 2.
* src/item-grid.c (item_grid_draw_merged_range) : Ditto.
(item_grid_draw) : Ditto.
* src/print-cell.c (print_cell) : print_cell::h_center
will default to width / 2.
(print_merged_range) : Ditto.
(print_cell_range) : Ditto.
* src/sheet.c (sheet_adjust_preferences) : Update the menus to reflect
changes in prefs. Take a flag to control redraw requests.
(sheet_menu_state_enable_insert) : new function.
* src/workbook-control-gui.c (wbcg_menu_state_enable_insert) : Merge
all the insert col/row/cell menu updates into here.
(wbcg_menu_state_sheet_prefs) : new function.
(cb_sheet_pref_display_formulas) : reentrancy protection and use
sheet_adjust_preferences.
(cb_sheet_pref_hide_zeros) : ditto.
(cb_sheet_pref_hide_grid_lines) : ditto.
(cb_sheet_pref_hide_col_header) : ditto.
(cb_sheet_pref_hide_row_header) : ditto.
(workbook_control_gui_init) : add the new menu items.
(workbook_control_gui_ctor_class) : reorg a bit.
src/workbook-control.c : reorg a bit.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* configure.in : Make python plugin optional.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control.c (wb_control_sheet_add) : update menus here.
* src/print-cell.c (print_cell) : fix the display zero logic.
* src/cell-draw.c (cell_draw) : ditto. And fix the comment.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_default_halign) : Handle alignment of numbers
correctly when displaying formulas.
* src/embeddable-grid.c (set_header_visibility) : start using our
native MVC.
(Grid_set_header_visibility) : ditto.
(embeddable_grid_set_header_visibility) : delete.
* src/sheet-control-gui.c (scg_set_header_visibility) : delete.
(scg_adjust_preferences) : Make this contingent on having a wbcg.
* src/selection.c (sheet_selection_set_internal) : Use
sheet_menu_state_enable_insert.
(sheet_selection_reset) : ditto.
2001-02-18 Almer S. Tigelaar <almer1@dds.nl>
* src/sheet-private.h : Add flag for insert cells.
......
2001-02-18 Jody Goldberg <jgoldberg@home.com>
s/display_zero/hide_zero/ + necessary logic inversions
s/show_grid/hide_grid/ + necessary logic inversions
s/show_col_header/hide_col_header/ + necessary logic inversions
s/show_row_header/hide_row_header/ + necessary logic inversions
s/wb_control_paste_special_enable/wb_control_menu_state_paste_special/
s/wbcg_paste_special_enable/wbcg_menu_state_paste_special/
* src/workbook-format-toolbar.c (workbook_format_toolbutton_update) :
Simplfy and use wbcg::updating_ui.
(workbook_format_halign_feedback_set) : use simplified interface.
(workbook_feedback_set) : Ditto.
(set_selection_halign) : If the current alignment is already set to
the target type revert to general.
* src/preview-grid.c (preview_grid_draw) : cell_draw::h_center
will default to width / 2.
* src/item-grid.c (item_grid_draw_merged_range) : Ditto.
(item_grid_draw) : Ditto.
* src/print-cell.c (print_cell) : print_cell::h_center
will default to width / 2.
(print_merged_range) : Ditto.
(print_cell_range) : Ditto.
* src/sheet.c (sheet_adjust_preferences) : Update the menus to reflect
changes in prefs. Take a flag to control redraw requests.
(sheet_menu_state_enable_insert) : new function.
* src/workbook-control-gui.c (wbcg_menu_state_enable_insert) : Merge
all the insert col/row/cell menu updates into here.
(wbcg_menu_state_sheet_prefs) : new function.
(cb_sheet_pref_display_formulas) : reentrancy protection and use
sheet_adjust_preferences.
(cb_sheet_pref_hide_zeros) : ditto.
(cb_sheet_pref_hide_grid_lines) : ditto.
(cb_sheet_pref_hide_col_header) : ditto.
(cb_sheet_pref_hide_row_header) : ditto.
(workbook_control_gui_init) : add the new menu items.
(workbook_control_gui_ctor_class) : reorg a bit.
src/workbook-control.c : reorg a bit.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* configure.in : Make python plugin optional.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control.c (wb_control_sheet_add) : update menus here.
* src/print-cell.c (print_cell) : fix the display zero logic.
* src/cell-draw.c (cell_draw) : ditto. And fix the comment.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_default_halign) : Handle alignment of numbers
correctly when displaying formulas.
* src/embeddable-grid.c (set_header_visibility) : start using our
native MVC.
(Grid_set_header_visibility) : ditto.
(embeddable_grid_set_header_visibility) : delete.
* src/sheet-control-gui.c (scg_set_header_visibility) : delete.
(scg_adjust_preferences) : Make this contingent on having a wbcg.
* src/selection.c (sheet_selection_set_internal) : Use
sheet_menu_state_enable_insert.
(sheet_selection_reset) : ditto.
2001-02-18 Almer S. Tigelaar <almer1@dds.nl>
* src/sheet-private.h : Add flag for insert cells.
......
2001-02-18 Jody Goldberg <jgoldberg@home.com>
s/display_zero/hide_zero/ + necessary logic inversions
s/show_grid/hide_grid/ + necessary logic inversions
s/show_col_header/hide_col_header/ + necessary logic inversions
s/show_row_header/hide_row_header/ + necessary logic inversions
s/wb_control_paste_special_enable/wb_control_menu_state_paste_special/
s/wbcg_paste_special_enable/wbcg_menu_state_paste_special/
* src/workbook-format-toolbar.c (workbook_format_toolbutton_update) :
Simplfy and use wbcg::updating_ui.
(workbook_format_halign_feedback_set) : use simplified interface.
(workbook_feedback_set) : Ditto.
(set_selection_halign) : If the current alignment is already set to
the target type revert to general.
* src/preview-grid.c (preview_grid_draw) : cell_draw::h_center
will default to width / 2.
* src/item-grid.c (item_grid_draw_merged_range) : Ditto.
(item_grid_draw) : Ditto.
* src/print-cell.c (print_cell) : print_cell::h_center
will default to width / 2.
(print_merged_range) : Ditto.
(print_cell_range) : Ditto.
* src/sheet.c (sheet_adjust_preferences) : Update the menus to reflect
changes in prefs. Take a flag to control redraw requests.
(sheet_menu_state_enable_insert) : new function.
* src/workbook-control-gui.c (wbcg_menu_state_enable_insert) : Merge
all the insert col/row/cell menu updates into here.
(wbcg_menu_state_sheet_prefs) : new function.
(cb_sheet_pref_display_formulas) : reentrancy protection and use
sheet_adjust_preferences.
(cb_sheet_pref_hide_zeros) : ditto.
(cb_sheet_pref_hide_grid_lines) : ditto.
(cb_sheet_pref_hide_col_header) : ditto.
(cb_sheet_pref_hide_row_header) : ditto.
(workbook_control_gui_init) : add the new menu items.
(workbook_control_gui_ctor_class) : reorg a bit.
src/workbook-control.c : reorg a bit.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* configure.in : Make python plugin optional.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control.c (wb_control_sheet_add) : update menus here.
* src/print-cell.c (print_cell) : fix the display zero logic.
* src/cell-draw.c (cell_draw) : ditto. And fix the comment.
2001-02-18 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_default_halign) : Handle alignment of numbers
correctly when displaying formulas.
* src/embeddable-grid.c (set_header_visibility) : start using our
native MVC.
(Grid_set_header_visibility) : ditto.
(embeddable_grid_set_header_visibility) : delete.
* src/sheet-control-gui.c (scg_set_header_visibility) : delete.
(scg_adjust_preferences) : Make this contingent on having a wbcg.
* src/selection.c (sheet_selection_set_internal) : Use
sheet_menu_state_enable_insert.
(sheet_selection_reset) : ditto.
2001-02-18 Almer S. Tigelaar <almer1@dds.nl>
* src/sheet-private.h : Add flag for insert cells.
......
Gnumeric -- The GNOME spreadsheet program
Jody Goldberg <jgoldberg@home.com>
Miguel de Icaza <miguel@helixcode.com>
This is the Gnumeric, the GNOME spreadsheet program.
......@@ -7,7 +8,7 @@ This is the Gnumeric, the GNOME spreadsheet program.
file COPYING.
The project aims to become a viable replacement for standard commercial
spreadsheets. Providing enough of a compatible feature set that Gnumeric
spreadsheets. It will provide enough of a compatible feature set that Gnumeric
can be used as a drop in replacement.
Gnumeric is still a young program and it is advancing steadily. If
......@@ -20,7 +21,7 @@ Requirements
You need:
glib >= 1.2.7 (glib-libs 1.3 is not supported)
gtk+ >= 1.2.7 (gnome-libs 1.3 is not supported)
gtk+ >= 1.2.7 (gtk+ 1.3 is not supported)
gnome-libs >= 1.0.57 (gnome-libs 2.0 is not supported)
libglade >= 0.16
gal >= 0.5
......@@ -105,7 +106,7 @@ documentation for these:
the text in a selection and press control-enter.
- Number formatting
- The formatting of numbers is very powerful, we do
- The formatting of numbers is very powerful, we
emulate the Excel number formatting specification.
- Format rules: you can use rules to specify which
......@@ -122,6 +123,14 @@ documentation for these:
simultaneously, select the columns and then change
the dimension of one of them.
- Content
- Merged Cells
- Array formulas
- Filters
- MS Excel (tm) Import/Export
- Applix Import
- To edit the contents of a cell that already has a value,
press F2 key.
......
......@@ -158,33 +158,43 @@ AM_CONDITIONAL(WITH_PERL, false)
dnl **************************************************
dnl * Check for Python
dnl **************************************************
AC_CHECK_PROG(python_val, python, true, false)
if $python_val; then
PY_PREFIX=`python -c 'import sys ; print sys.prefix'`
PY_EXEC_PREFIX=`python -c 'import sys ; print sys.exec_prefix'`
changequote(<<, >>)dnl
PY_VERSION=`python -c 'import sys ; print sys.version[0:3]'`
changequote([, ])dnl
if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then
PY_LIBS="python$PY_VERSION"
PY_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config"
PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
PY_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config/Makefile"
PY_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE`
PY_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE`
PY_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PY_MAKEFILE`
PY_EXTRA_LIBS="$PY_LOCALMODLIBS $PY_BASEMODLIBS $PY_OTHER_LIBS"
AC_SUBST(PY_LIBS)
AC_SUBST(PY_LIB_LOC)
AC_SUBST(PY_CFLAGS)
AC_SUBST(PY_EXTRA_LIBS)
else
python_val=false
fi
try_python=true
python_val=false
AC_ARG_WITH(python,
[--{with,without}-python Compile the Python plugin],
if test x$withval = xno; then
try_python=false
fi
)
if $try_python; then
AC_CHECK_PROG(python_val, python, true, false)
if $python_val; then
PY_PREFIX=`python -c 'import sys ; print sys.prefix'`
PY_EXEC_PREFIX=`python -c 'import sys ; print sys.exec_prefix'`
changequote(<<, >>)dnl
PY_VERSION=`python -c 'import sys ; print sys.version[0:3]'`
changequote([, ])dnl
if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then
PY_LIBS="python$PY_VERSION"
PY_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config"
PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
PY_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config/Makefile"
PY_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE`
PY_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE`
PY_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PY_MAKEFILE`
PY_EXTRA_LIBS="$PY_LOCALMODLIBS $PY_BASEMODLIBS $PY_OTHER_LIBS"
AC_SUBST(PY_LIBS)
AC_SUBST(PY_LIB_LOC)
AC_SUBST(PY_CFLAGS)
AC_SUBST(PY_EXTRA_LIBS)
else
python_val=false
fi
fi
fi
AM_CONDITIONAL(WITH_PYTHON, $python_val)
dnl Check for libole2
AC_MSG_CHECKING(for libole2 >= 0.1.7 )
libole2_ok=no
......
......@@ -3719,10 +3719,10 @@ ms_excel_read_sheet (BiffQuery *q, ExcelWorkbook *wb, WorkbookView *wb_view,
guint16 left_col = MS_OLE_GET_GUINT16 (q->data + 4);
sheet->gnum_sheet->display_formulas = (options & 0x0001);
sheet->gnum_sheet->display_zero = (options & 0x0010);
sheet->gnum_sheet->show_grid = (options & 0x0002);
sheet->gnum_sheet->show_col_header =
sheet->gnum_sheet->show_row_header = (options & 0x0004);
sheet->gnum_sheet->hide_zero = !(options & 0x0010);
sheet->gnum_sheet->hide_grid = !(options & 0x0002);
sheet->gnum_sheet->hide_col_header =
sheet->gnum_sheet->hide_row_header = !(options & 0x0004);
/* The docs are unclear whether or not the counters
* are 0 or 1 based. I'll assume 1 based but make the
......
......@@ -512,14 +512,14 @@ xml2ParseSheet (XML2ParseState *state, CHAR const **attrs)
for (; attrs[0] && attrs[1] ; attrs += 2)
if (xml2ParseAttrInt (attrs, "DisplayFormulas", &tmp))
state->sheet->display_formulas = tmp;
else if (xml2ParseAttrInt (attrs, "DisplayZero", &tmp))
state->sheet->display_zero = tmp;
else if (xml2ParseAttrInt (attrs, "ShowGrid", &tmp))
state->sheet->show_grid = tmp;
else if (xml2ParseAttrInt (attrs, "ShowColHeader", &tmp))
state->sheet->show_col_header = tmp;
else if (xml2ParseAttrInt (attrs, "ShowRowHeader", &tmp))
state->sheet->show_row_header = tmp;
else if (xml2ParseAttrInt (attrs, "HideZero", &tmp))
state->sheet->hide_zero = tmp;
else if (xml2ParseAttrInt (attrs, "HideGrid", &tmp))
state->sheet->hide_grid = tmp;
else if (xml2ParseAttrInt (attrs, "HideColHeader", &tmp))
state->sheet->hide_col_header = tmp;
else if (xml2ParseAttrInt (attrs, "HideRowHeader", &tmp))
state->sheet->hide_row_header = tmp;
else
xml2UnknownAttr (state, attrs, "Sheet");
}
......
......@@ -512,14 +512,14 @@ xml2ParseSheet (XML2ParseState *state, CHAR const **attrs)
for (; attrs[0] && attrs[1] ; attrs += 2)
if (xml2ParseAttrInt (attrs, "DisplayFormulas", &tmp))
state->sheet->display_formulas = tmp;
else if (xml2ParseAttrInt (attrs, "DisplayZero", &tmp))
state->sheet->display_zero = tmp;
else if (xml2ParseAttrInt (attrs, "ShowGrid", &tmp))
state->sheet->show_grid = tmp;
else if (xml2ParseAttrInt (attrs, "ShowColHeader", &tmp))
state->sheet->show_col_header = tmp;
else if (xml2ParseAttrInt (attrs, "ShowRowHeader", &tmp))
state->sheet->show_row_header = tmp;
else if (xml2ParseAttrInt (attrs, "HideZero", &tmp))
state->sheet->hide_zero = tmp;
else if (xml2ParseAttrInt (attrs, "HideGrid", &tmp))
state->sheet->hide_grid = tmp;
else if (xml2ParseAttrInt (attrs, "HideColHeader", &tmp))
state->sheet->hide_col_header = tmp;
else if (xml2ParseAttrInt (attrs, "HideRowHeader", &tmp))
state->sheet->hide_row_header = tmp;
else
xml2UnknownAttr (state, attrs, "Sheet");
}
......
......@@ -255,7 +255,7 @@ application_clipboard_clear (gboolean drop_selection)
sheet->priv->enable_paste_special = FALSE;
WORKBOOK_FOREACH_CONTROL (sheet->workbook, view, control,
wb_control_paste_special_enable (control, sheet););
wb_control_menu_state_paste_special (control, sheet););
app.clipboard_sheet = NULL;
......@@ -316,7 +316,7 @@ application_clipboard_copy (WorkbookControl *wbc,
sheet->priv->enable_paste_special = TRUE;
WORKBOOK_FOREACH_CONTROL (sheet->workbook, view, control,
wb_control_paste_special_enable (control, sheet););
wb_control_menu_state_paste_special (control, sheet););
sheet_selection_ant (sheet);
}
......@@ -346,7 +346,7 @@ application_clipboard_cut (WorkbookControl *wbc,
/* No paste special for copies */
sheet->priv->enable_paste_special = FALSE;
WORKBOOK_FOREACH_CONTROL (sheet->workbook, view, control,
wb_control_paste_special_enable (control, sheet););
wb_control_menu_state_paste_special (control, sheet););
sheet_selection_ant (sheet);
}
......
......@@ -138,6 +138,9 @@ cell_split_text (GdkFont *font, char const *text, int const width)
* of the gridlines (marked a).
* @y1 : The pixel coord within the drawable of the upper left corner
* of the gridlines (marked a).
* @h_center : The number of pixels from x1 marking the logical center
* of the cell. NOTE This can be asymetric. Passing
* <= 0 will use width / 2
*/
void
cell_draw (Cell const *cell, MStyle const *mstyle,
......@@ -161,15 +164,9 @@ cell_draw (Cell const *cell, MStyle const *mstyle,
StyleColor *fore;
int cell_width_pixel;
/*
* If it is being edited pretend it is empty to avoid problems with the
* a long cells contents extending past the edge of the edit box.
* Don't print zeros if they should be ignored.
*/
if (sheet &&
(!sheet->display_formulas &&
!sheet->display_zero &&
cell_is_zero (cell)))
/* Don't print zeros if they should be ignored. */
if (sheet && sheet->hide_zero && cell_is_zero (cell) &&
(!sheet->display_formulas || !cell_has_expr (cell)))
return;
g_return_if_fail (cell->rendered_value);
......@@ -270,6 +267,9 @@ cell_draw (Cell const *cell, MStyle const *mstyle,
}
halign = cell_default_halign (cell, mstyle);
if (halign == HALIGN_CENTER_ACROSS_SELECTION || h_center <= 0)
h_center = width / 2;
if (halign != HALIGN_JUSTIFY && valign != VALIGN_JUSTIFY &&
!mstyle_get_wrap_text (mstyle)) {
int x, len = cell_width_pixel;
......
......@@ -617,10 +617,10 @@ cell_default_halign (Cell const *c, MStyle const *mstyle)
if (align == HALIGN_GENERAL) {
g_return_val_if_fail (c != NULL, HALIGN_RIGHT);
if (cell_is_number (c) &&
c->base.sheet && !c->base.sheet->display_formulas)
return HALIGN_RIGHT;
return HALIGN_LEFT;
if (c->base.sheet && c->base.sheet->display_formulas &&
cell_has_expr (c))
return HALIGN_LEFT;
return cell_is_number (c) ? HALIGN_RIGHT : HALIGN_LEFT;
}
return align;
......
......@@ -46,25 +46,7 @@ set_header_visibility (BonoboView *view, void *data)
g_return_if_fail (grid_view != NULL);
g_return_if_fail (grid_view->scg != NULL);
scg_set_header_visibility (
grid_view->scg,
eg->show_col_title,
eg->show_row_title);
}
void
embeddable_grid_set_header_visibility (EmbeddableGrid *eg,
gboolean col_headers_visible,
gboolean row_headers_visible)
{
g_return_if_fail (eg != NULL);
g_return_if_fail (IS_EMBEDDABLE_GRID (eg));
eg->show_col_title = col_headers_visible;
eg->show_row_title = row_headers_visible;
bonobo_embeddable_foreach_view (BONOBO_EMBEDDABLE (eg),
set_header_visibility, eg);
scg_adjust_preferences (grid_view->scg);
}
static void
......@@ -75,8 +57,12 @@ Grid_set_header_visibility (PortableServer_Servant servant,
{
EmbeddableGrid *eg = embeddable_grid_from_servant (servant);
embeddable_grid_set_header_visibility (
eg, col_headers_visible, row_headers_visible);
g_return_if_fail (IS_EMBEDDABLE_GRID (eg));
eg->sheet->hide_col_header = !col_headers_visible;
eg->sheet->hide_row_header = !row_headers_visible;
sheet_adjust_preferences (eg->sheet, TRUE);
}
static void
......@@ -87,8 +73,8 @@ Grid_get_header_visibility (PortableServer_Servant servant,
{
EmbeddableGrid *eg = embeddable_grid_from_servant (servant);
*col_headers_visible = eg->show_col_title;
*row_headers_visible = eg->show_row_title;
*col_headers_visible = !eg->sheet->hide_col_header;
*row_headers_visible = !eg->sheet->hide_row_header;
}
static BonoboView *
......
......@@ -26,9 +26,6 @@ struct _EmbeddableGrid {
/* The sheet, only one */
Sheet *sheet;
gboolean show_col_title;
gboolean show_row_title;
};
typedef struct {
......@@ -45,10 +42,6 @@ void embeddable_grid_set_range (EmbeddableGrid *eg,
int start_col, int start_row,
int end_col, int end_row);
void embeddable_grid_set_header_visibility (EmbeddableGrid *eg,
gboolean col_headers_visible,
gboolean row_headers_visible);
/*
* The BonoboView object
*/
......
......@@ -168,7 +168,7 @@ item_grid_draw_merged_range (GdkDrawable *drawable, ItemGrid *grid,
int start_x, int start_y,
Range const *view, Range const *range)
{
int l, r, t, b, last, w;
int l, r, t, b, last;
GdkGC *gc = grid->empty_gc;
Sheet const *sheet = grid->scg->sheet;
Cell const *cell = sheet_cell_get (sheet, range->start.col, range->start.row);
......@@ -218,10 +218,10 @@ item_grid_draw_merged_range (GdkDrawable *drawable, ItemGrid *grid,
view->end.row+1, range->end.row+1);
/* FIXME : get the margins from the far col/row too */
w = r - l - ci->margin_b - ci->margin_a;
cell_draw (cell, mstyle, grid->cell_gc, drawable,
l, t, w,
b - t - ri->margin_b - ri->margin_a, w/2);
l, t,
r - l - ci->margin_b - ci->margin_a,
b - t - ri->margin_b - ri->margin_a, -1);
}
}
......@@ -282,7 +282,7 @@ item_grid_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
MStyle const **styles;
StyleBorder const **borders, **prev_vert;
StyleBorder const *none =
sheet->show_grid ? style_border_none () : NULL;
sheet->hide_grid ? NULL : style_border_none ();
Range view;