1. 24 Dec, 2001 1 commit
    • Jody Goldberg's avatar
      mark as needing a recalc, don't just assert it. · 208fc52c
      Jody Goldberg authored
      2001-12-24  Jody Goldberg <jody@gnome.org>
      
      	* src/style-condition.c (style_condition_expr_eval) : mark as needing
      	  a recalc, don't just assert it.
      
      	* src/workbook-edit.c (wbcg_edit_validate) : handle accept/reject/reedit
      	  Generate the title and msg here.  The goal is to move the gui
      	  specific aspects out of here.
      	(wbcg_edit_finish) : ditto.
      
      	* src/gui-validation.c (validation_generate_msg) : disable for now.
      	  It is a nice idea, but the implementation is in the wrong place
      	  and blows goats.
      208fc52c
  2. 12 Oct, 2001 1 commit
    • Jody Goldberg's avatar
      fix. · 41adb928
      Jody Goldberg authored
      2001-10-11  Jody Goldberg <jgoldberg@home.com>
      
      	* src/mathfunc.c (minverse) : fix.
      
      2001-10-11  Jody Goldberg <jgoldberg@home.com>
      
      	* src/eval.c (dependent_set_sheet) : new utility.
      
      2001-10-11  Jody Goldberg <jgoldberg@home.com>
      
      	* fn-string.c (gnumeric_code) : unsiged char
      41adb928
  3. 10 Oct, 2001 1 commit
    • Jody Goldberg's avatar
      be smarter about what type of error to report. · 809253d0
      Jody Goldberg authored
      2001-10-10  Jody Goldberg <jgoldberg@home.com>
      
      	* src/plugin-util.c (gnumeric_fopen) : be smarter about what type of
      	  error to report.
      
      	* src/xml-io.c (gnumeric_xml_write_workbook) : switch to manually
      	  opening the file then dumping to prepare for xml2.  Apparently it
      	  attempts to escape file names.
      	* src/xml-io-autoft.c (gnumeric_xml_write_format_template) : ditto.
      
      2001-10-09  Jody Goldberg <jgoldberg@home.com>
      
      	* src/eval.c (dependent_set_expr) : Make a default handler to merge
      	  all the different states that have croppedup into one place.
      	* src/gnumeric-graph.c (gnm_graph_vector_set_expr) : Use the default.
      	* src/sheet-object-widget.c (checkbox_set_expr) : ditto.
      	* src/style-condition.c (style_condition_dep_set_expr) : The default
      	  handles most of the work.
      
      	* src/style-condition.c : Use DEPENDENT_MAKE_TYPE.
      809253d0
  4. 09 Oct, 2001 1 commit
    • Jody Goldberg's avatar
      Disable embeddable grid, it is broken. · 19c0553b
      Jody Goldberg authored
      2001-10-09  Jody Goldberg <jgoldberg@home.com>
      
      	* GNOME_Gnumeric.oaf.in : Disable embeddable grid, it is broken.
      
      2001-10-09  Jody Goldberg <jgoldberg@home.com>
      
      	* src/eval.c (dependent_set_expr) : Make a default handler to merge
      	  all the different states that have croppedup into one place.
      	* src/gnumeric-graph.c (gnm_graph_vector_set_expr) : Use the default.
      	* src/sheet-object-widget.c (checkbox_set_expr) : ditto.
      	* src/style-condition.c (style_condition_dep_set_expr) : The default
      	  handles most of the work.
      
      	* src/style-condition.c : Use DEPENDENT_MAKE_TYPE.
      19c0553b
  5. 20 Sep, 2001 1 commit
  6. 06 Sep, 2001 1 commit
  7. 02 Sep, 2001 3 commits
    • Jody Goldberg's avatar
      typo · ec9110c4
      Jody Goldberg authored
      ec9110c4
    • Jody Goldberg's avatar
      For Wayne Schuller <k_wayne@linuxpower.org> · bb833c86
      Jody Goldberg authored
      2001-09-02  Jody Goldberg <jgoldberg@home.com>
      	For Wayne Schuller <k_wayne@linuxpower.org>
      
      	* src/pattern.c (gnumeric_background_set_pc) : Support gray scale
      	  patterns when printing.
      
      2001-09-02  Jody Goldberg <jgoldberg@home.com>
      
      	* src/style-condition.c (style_condition_eval) : Use dependent_eval
      	  and add an invariant that ensures that val is only NULL if we have
      	  been queued for recalc.
      
      	* src/eval.c (dependent_eval) : split from workbook_recalc.
      	(cell_eval) : change return type.  no one was using it.
      	(dependent_needs_recalc) : new macro.
      bb833c86
    • Jody Goldberg's avatar
      split from workbook_recalc. (cell_eval) : change return type. no one was · f260bb65
      Jody Goldberg authored
      2001-09-02  Jody Goldberg <jgoldberg@home.com>
      
      	* src/eval.c (dependent_eval) : split from workbook_recalc.
      	(cell_eval) : change return type.  no one was using it.
      
      2001-08-31  Jody Goldberg <jgoldberg@home.com>
      
      	* src/format.c (format_number) : add a way to force 12 hour mode
      	  without showing am/pm
      f260bb65
  8. 31 Aug, 2001 1 commit
    • Jody Goldberg's avatar
      fix. We need to check for recalc before we unlink, and possibly queue the · 62345d71
      Jody Goldberg authored
      2001-08-30  Jody Goldberg <jgoldberg@home.com>
      
      	* src/sheet.c (sheet_cell_destroy) : fix.  We need to check
      	  for recalc before we unlink, and possibly queue the dependents
      	  of cells which had constant values.
      
      	* src/eval.c : rearrange
      	DependentSingle &
      	DependentRange to keep the dep_list at the top
      	Then define DependentAny for generic operations.
      	(depsingle_dtor) : delete.
      	(deprange_dtor) : delete.
      	(dependent_queue_recalc_list) : remove unnecessary parameter.
      	(sheet_region_queue_recalc) : walk the hash in both cases.
      	(dependent_unlink) : only unlink if there is a dep list.
      	(cb_search_rangedeps) : renamed from search_cell_deps.
      	(cb_single_recalc_all_depends) : delete.
      	(cb_range_recalc_all_depends) : delete.
      	(cb_recalc_all_depends) : new.
      	(cb_dep_hash_invalidate) : merge cb_single_hash_invalidate,
      	  cb_range_hash_invalidate.
      	(do_deps_destroy) : use the merged invalidation routines.
      	(add_range_dep) : loop through the range buckets.
      	(drop_range_dep) : loop through the range buckets.
      	(dependent_unlink_sheet) : use SHEET_FOREACH_DEPENDENT.
      	(cell_foreach_range_dep) : only check useful buckets.
      	(dependency_data_new) : create the buckets.
      	(sheet_dump_dependencies) : handle ranges.
      62345d71
  9. 30 Aug, 2001 3 commits
    • Morten Welinder's avatar
      New macro. (WORKBOOK_FOREACH_DEPENDENT): Re-factor. (Workbook): Move · 52f2f380
      Morten Welinder authored
      2001-08-30  Morten Welinder  <terra@diku.dk>
      
      	* src/workbook.h (WORKBOOK_FOREACH_SHEET): New macro.
      	(WORKBOOK_FOREACH_DEPENDENT): Re-factor.
      	(Workbook): Move dependents to DependencyContainer, see below.
      	Introduce new external_dependents, not yet used.
      
      	* src/sheet.h (SHEET_FOREACH_DEPENDENT): New macro.
      
      	* src/eval.h: (DependencyContainer): type moved from eval.c and
       	renamed from DependencyData.  Add dependent_list member which used
       	to be in Workbook.
      	(DEPENDENT_IS_CELL): New macro.  Put into used lots of places.
      	(DEPENDENT_CONTAINER_FOREACH_DEPENDENT): New macro.
      
      	* src/eval.c (cb_dependent_queue_recalc): Allocate single list
       	element on stack, not heap.
      	(dependent_queue_recalc_list): Don't essentailly copy all lists.
      	(UNLINK_DEP): Take only dep arguement and find the container from
       	that.
      52f2f380
    • Morten Welinder's avatar
      Avoid listifying. (cb_dependent_queue_recalc, cell_queue_recalc): Recast · 12a001cb
      Morten Welinder authored
      2001-08-29  Morten Welinder  <terra@diku.dk>
      
      	* src/eval.c (workbook_queue_all_recalc): Avoid listifying.
      	(cb_dependent_queue_recalc, cell_queue_recalc): Recast in terms of
       	dependent_queue_recalc_list.
      	(dependent_queue_recalc_list): Eliminate recursion which used to
       	be unbounded deep.
      
      	* src/eval.h (struct _Dependent): Name next to next_dep and prev
       	to prev_dep.  (Because we might need a similar list for evaluation
       	at some point.)
      
      	(DEPENDENT_TYPE): New macro type hide most uses of the ugly
       	DEPENDENT_TYPE_MASK.  All such uses fixed.
      12a001cb
    • Jody Goldberg's avatar
      fix my breakage and don't bother recursing for already queued cells. · 52fb8834
      Jody Goldberg authored
      2001-08-29  Jody Goldberg <jgoldberg@home.com>
      
      	* src/eval.c (dependent_queue_recalc_list) : fix my breakage and don't
      	  bother recursing for already queued cells.
      	(workbook_queue_all_recalc) : remove sillyness.
      	(dependent_unqueue) : delete unused routine.
      
      	* src/cell.c (cell_cleanout) : remove useless 'in_recalc_queue' flag.
      	(cell_copy) : ditto.
      
      	* src/sheet.c (sheet_cell_destroy) : no need to unqueue, unlink
      	  handles it.
      	(sheet_move_range) : ditto.
      52fb8834
  10. 29 Aug, 2001 1 commit
    • Jody Goldberg's avatar
      make this a macro. (cb_dependent_queue_recalc) : simplify to just mark the · 3f3c9b99
      Jody Goldberg authored
      2001-08-29  Jody Goldberg <jgoldberg@home.com>
      
      	* src/eval.c (dependent_queue_recalc) : make this a macro.
      	(cb_dependent_queue_recalc) : simplify to just mark the requirement
      	  now that there is no distinct reval queue.
      	(dependent_unqueue) : this is now trivial.
      	(dep_slist_filter_sheet) : delete.
      	(dependent_unqueue_sheet) : delete.
      	(dependent_unlink) : clear the recalc flag directly.
      	(cell_foreach_single_dep) : remove broken debugging.
      	(workbook_recalc) : just walk the dependent list.  We can optimize
      	  this later if need be.
      	(sheet_dump_dependencies) : remove unnecessary debug info.
      
      	* src/sheet.c (sheet_destroy_contents) : no need to unqueue_sheet.
      	  unlink handles it.
      
      	* src/workbook.c (workbook_destroy) : no more eval_queue.
      3f3c9b99
  11. 28 Aug, 2001 1 commit
    • Morten Welinder's avatar
      point to first dependent directly, not via an slist. · d48e13b0
      Morten Welinder authored
      2001-08-28  Morten Welinder  <terra@diku.dk>
      
      	* src/workbook.h (struct _Workbook): point to first dependent
       	directly, not via an slist.
      
      	* src/eval.h (struct _Dependent): Add prev and next fields.
      
      	* src/eval.c (dependent_unlink, dependent_unlink_sheet): Fix-up
       	unlinking.
      	(dependent_link): Link using new double-linked structure.
      	(sheet_region_queue_recalc): Use new dependent linking structure.
      	(workbook_queue_all_recalc): Make an slist of dependents here.
      
      	* src/workbook-control-gui.c (TOGGLE_HANDLER/display_formulas):
       	Adapt to new dependent linking structure.
      
      	* src/workbook.c (workbook_expr_relocate): Adapt to new dependent
       	linking structure.
      d48e13b0
  12. 13 Jul, 2001 1 commit
  13. 27 May, 2001 1 commit
    • Jody Goldberg's avatar
      If successful queue everything for recalc. (xml_cell_set_array_expr) : no · b740bf75
      Jody Goldberg authored
      
      2001-05-26  Jody Goldberg <jgoldberg@home.com>
      
      	* xml-sax-read.c (xml_sax_file_open) : If successful queue everything
      	  for recalc.
      	(xml_cell_set_array_expr) : no need to queue a recalc for arrays.
      
      2001-05-26  Jody Goldberg <jgoldberg@home.com>
      
      	* src/sheet.c (colrow_move) : no need to queue recalc here.
      	(cb_sheet_cell_copy) : Actually copy the array values.
      
      	* src/cell.c (cell_relocate) : Just relink, no need to queue a recalc.
      	(cell_set_array_formula) : Remove the ability to queue the recalc at
      	  this level.  Just link the formulas in.  Reorder the the arguments
      	  to match the standard approach.
      
      	* src/eval.c (workbook_recalc_all) : Used here.
      	(workbook_queue_all_recalc) : new function.
      
      	* src/xml-io.c (xml_workbook_read) : Queue everything for recalc.
      	(xml_cell_set_array_expr) : no need to queue a recalc here.
      
      	* src/commands.c (cmd_autofill_redo) : queue the recalc here.
      	(cmd_area_set_text_redo) : we need to manually queue a recalc for
      	  arrays now.
      
      	* src/sheet.c (sheet_cell_set_text) : we need to queue a recalc for
      	  both expressions and values now.
      	(sheet_range_set_text) : queue recalcs for the region as a block.
      
      	* src/graph-vector.c (graph_vector_new) : Just use dependent_link if
      	  we don't want a recalc.
      b740bf75
  14. 25 May, 2001 1 commit
    • Jody Goldberg's avatar
      fix logic to avoid adding a bogus view. · 237ebd5b
      Jody Goldberg authored
      
      2001-05-25  Jody Goldberg <jgoldberg@home.com>
      
      	* src/workbook-view.c (wb_view_open_custom) : fix logic to avoid
      	  adding a bogus view.
      
      2001-05-24  Jody Goldberg <jgoldberg@home.com>
      
      	* src/eval.c (workbook_recalc) : don't clear the flag until after the
      	  calc is complete in case there is a cycle.
      	(cell_eval) : ditto.
      237ebd5b
  15. 24 May, 2001 2 commits
    • Jody Goldberg's avatar
      optionally queue the dependents of this cell for recalc. · 7c1b3f75
      Jody Goldberg authored
      
      2001-05-23  Jody Goldberg <jgoldberg@home.com>
      
      	* src/sheet.c (sheet_cell_destroy) : optionally queue the dependents
      	  of this cell for recalc.
      7c1b3f75
    • Jody Goldberg's avatar
      Revamp the recalc queue · af206304
      Jody Goldberg authored
      2001-05-22  Jody Goldberg <jgoldberg@home.com>
      
      	* gnumeric.spec.in : bump version of libole2
      	* README : ditto.
      	* configure.in : ditto.
      
      2001-05-19  Jody Goldberg <jgoldberg@home.com>
      
      	* src/workbook.c (workbook_is_pristine) : no need to check the recalc
      	  queue.  If there are no dependents there is nothing to put on the
      	  eval queue.
      
      	* src/func.c (cb_iterate_cellrange) : rename from
      	  iterate_cellrange_callback remove 'generation' mechanism.
      
      	* src/cell.c (cell_cleanout) : Clear both recalc flags,
      	  in_queue and needs
      	(cell_copy) : ditto.
      	(cell_eval_content) : No need to render the value.  assign_value
      	  already does it.
      	(cell_content_changed) : deleted.
      
      	* src/Makefile.am : merge dependent.[ch] into eval.[ch]
      
      2001-05-18  Jody Goldberg <jgoldberg@home.com>
      
      	* src/eval.c : reorg and merged with dependent.[ch]
      
      	* src/sheet.c (sheet_cell_set_text) :
      	  s/cell_content_changed/cell_queue_recalc/
      	(sheet_cell_set_expr) : ditto.
      	(sheet_cell_set_value) : ditto.
      	(colrow_move) : ditto.
      	(sheet_destroy_contents) :
      	  s/dependent_unqueue_recalc_sheet/dependent_unqueue_sheet/
      
      	* src/cmd-edit.c (cmd_select_cur_row) : Make behavior match XL.
      	(cmd_select_cur_col) : Make behavior match XL.
      
      	* src/format.c (render_number) : avoid temporaries.
      	(do_render_number) : ditto.
      
      2001-05-17  Jody Goldberg <jgoldberg@home.com>
      
      	* src/expr.c (eval_range) : delete.
      	(eval_expr_real) : Use workbook_foreach_cell_in_range rather than
      	  range_eval.  Remove 'generation' mechanism.
      	(cb_range_eval) : a simple pass through
      
      	* src/eval.c (sheet_region_recalc_deps) : rename from
      	  sheet_recalc_dependencies and merge in sheet_region_get_deps.
      	  Use the new foreach style interfaces.
      	(cb_single_recalc_all_depends) : rename from cb_single_get_all_depends
      	  and simplify.
      	(cb_range_recalc_all_depends) : rename from cb_sheet_get_all_depends and simplify.
      	(cb_dependent_queue_recalc) : new wrapper.
      	(cb_region_contained_depend) : renamed from search_range_deps and simplify.
      	(cell_foreach_dep) : rename from cell_get_dependencies and switch to
      	  an in place api rather than creating a list.
      	(cell_foreach_single_dep) : switch to in place api
      	(cell_foreach_range_dep) : ditto.
      	(search_cell_deps) : ditto.
      	(cell_recalc_deps) : ditto.
      	(cell_eval) : ditto.
      	(cb_generation_queue) : new utility.
      
      	* src/dependent.c (dependent_list_filter) : delete.
      
      	* src/cmd-edit.c (cb_collect_deps) : new function split from.
      	(cmd_select_cur_depends) : here. So that we can use the new depend
      	  api.
      
      	* src/sheet.c (sheet_move_range) : use sheet_region_recalc_deps.
      	(sheet_{insert,delete}_{cols,rows}) : ditto.
      	(sheet_cell_remove_simple) : Use in place depend interface.
      
      	* src/cell.c (cell_content_changed) : Use in place depend interface.
      	* src/clipboard.c (clipboard_paste_region) : ditto.
      	* src/commands.c (cmd_area_set_text_redo) : ditto.
      	(cmd_autofill_redo) : ditto.
      
      2001-05-21  Jody Goldberg <jgoldberg@home.com>
      
      	* Makefile.am : remove gnorba and modernize a bit.
      af206304
  16. 18 Dec, 2000 1 commit
  17. 06 Sep, 2000 1 commit
    • Jody Goldberg's avatar
      Remainder of patch to handle non-cell dependents. · 01a95234
      Jody Goldberg authored
      2000-09-05  Jody Goldberg <jgoldberg@home.com>
      
      	* configure.in : Add test for pspell.
      	* acconfig.h : Ditto.
      
      	* s/cell.u.expression/cell.base.expression/
      	* s/cell.generation/cell.base.generation/
      	* s/cell.u.entered_text/cell.entered_text/  <- deprecated
      	* s/workbook.formula_cell_list/workbook.dependents/
      
      	* s/sheet_cell_expr_link/dependent_expr_link/
      	* s/sheet_cell_expr_unlink/dependent_expr_unlink/
      
      	* s/eval_queue_cell/dependent_queue_recalc/
      	* s/eval_queue_list/dependent_queue_recalc_list/
      	* s/eval_unqueue_cell/dependent_unqueue_recalc/
      	* s/eval_unqueue_sheet/dependent_unqueue_recalc_sheet/
      	*
      	* s/cell_add_dependencies/dependent_add_dependencies
      	* s/cell_drop_dependencies/dependent_drop_dependencies
      
      	* s/cell_formula_changed/dependent_changed/
      	* s/sheet_cell_expr_link/dependent_link/
      	* s/CELL_IN_EXPR_LIST/DEPENDENT_IN_EXPR_LIST/
      
      	* src/cell.c (cell_eval_content) : moved from eval.c
      
      	* src/eval.c (sheet_region_get_deps) : Take a Range rather than 4 int.
      	(drop_range_dep) : Use dependent_debug_name.
      	(dependency_range_ctor) : Take a CellPos as an arg rather than a Cell.
      	(handle_cell_single_dep) : Take an optional CellPos and a Dependent.
      	(handle_cell_range_deps) : Ditto. Do not check for singletons here.
      	(handle_tree_deps) : Ditto.  Call handle_cell_single_dep directly.
      	(cell_add_explicit_dependency) : Delete.
      	(get_single_dependencies) : Some const.
      
      	* src/cmd-edit.c (cmd_select_cur_depends) : Use dependent_list_filter
      	  to only show cell dependencies for now.
      
      	* src/dependent.c (dependent_list_filter) : new function.
      	(dependent_debug_name) : new function.
      
      	* src/history.c : Add a comment about File/Print Preview for
      	  translators.
      
      	* src/workbook.c (cb_cell_rerender) : Only cells need this.
      01a95234
  18. 21 May, 2000 1 commit
    • Jody Goldberg's avatar
      A few delayed patches. · 2779b474
      Jody Goldberg authored
      These optimize paste, exit, sheet deletetion,
      and start the process for fixing a few things.
      
      2000-05-17  Jody Goldberg <jgoldberg@home.com>
      
      	* src/clipboard.c (clipboard_copy_cell_range) : Adjust signature to
      	  take a range.
      	(sheet_paste_selection) : Export in preparation for adding undo.
      
      	* src/commands.c (cmd_paste_copy) : Some initial work.  Not used or
      	  complete.
      
      	* src/parse-util.c (parse_text_value_or_expr) : Start passing in the
      	  current format so that we can eventually attempt to match it before
      	  trying all the others.
      
      	* src/sheet.c (sheet_formulas_unlink) : New function.
      	(sheet_destroy_contents) : Optimize.
      
      	* src/dialogs/dialog-plugin-manager.c : Make a bit prettier.
      	* src/dialogs/plugin-manager.glade : Ditto.
      
      2000-05-16  Jody Goldberg <jgoldberg@home.com>
      
      	* plugins/*/*.c : Rationalize the naming scheme.
      
      2000-05-15  Jody Goldberg <jgoldberg@home.com>
      
      	* src/eval.[ch] : Rename
      	  cell_queue_recalc      -> eval_queue_cell
      	  cell_queue_recalc_list -> eval_queue_list
      	  cell_unqueue_recalc    -> eval_unqueue_cell
      	(eval_unqueue_sheet) : New function.
      
      	* src/sheet.c (sheet_cell_remove_simple) : Add precautionary removal
      	  of cells from recalc list.  We should not need this in most
      	  instances, but the check is inexpensive so I'll play it safe.
      	(sheet_destroy_contents) : Batch cleanups rather than doing it cell by
      	  cell.
      
      	* src/cell.c (cell_make_value) : Fill in the implementation.
      
      	* src/clipboard.c (paste_cell_flags) : Remove some dead code.
      	  Merged in paste_cell and fixed handling of paste by value.
      
      2000-05-14  Jody Goldberg <jgoldberg@home.com>
      
      	* src/clipboard.c (paste_cell) : No need to call cell_content_changed
      	  we can queue the recalc for the entire region later.  It is
      	  sufficent to make the cell as changed with sheet_cell_changed.
      	(paste_cell) : It is premature to redraw, we have no yet calculated
      	  spans.  Redraw and respan at the range level, not the cell.
      2779b474
  19. 06 May, 2000 1 commit
    • Michael Meeks's avatar
      Add 3D dependency support. (cb_single_hash_to_list, · 479bddb8
      Michael Meeks authored
      2000-05-06  Michael Meeks  <michael@helixcode.com>
      
      	* src/eval.c (handle_cell_range_deps): Add 3D dependency support.
      	(cb_single_hash_to_list, cb_range_hash_to_list): Re-arrange handling of
      	where the list is collated. (do_deps_destroy): update.
      	(cell_drop_dependencies): remove cretinism here.
      	(drop_cell_range_dep, handle_cell_single_dep): return on NULL deps structure.
      
      	* src/sheet-style.c (sheet_style_attach): enable cache trash avoidance code.
      
      	* src/sheet.c (sheet_cell_remove_internal): short circuit for NULL
      	deps.
      
      	* src/expr.c (expr_rewrite): update to handle workbook case.
      
      	* src/eval.c (workbook_deps_destroy): update for speed.
      	(sheet_deps_destroy): split body into (do_deps_destroy): here.
      
      	* src/workbook.c (workbook_delete_sheet): destroy the sheet's
      	dependencies here as well; very silly. (workbook_do_destroy): destroy
      	deps of all sheets up front.
      479bddb8
  20. 03 May, 2000 1 commit
    • Michael Meeks's avatar
      Accelerate intersheet dependancies for Hans, · 3de60968
      Michael Meeks authored
      2000-05-03  Michael Meeks  <michael@helixcode.com>
      
      	* doc/Dependencies.txt: update to reflect changes.
      
      	* src/eval.c: comment and const mending.
      	(handle_cell_range_deps): prune no inter-sheet singletons code,
      	it is a sluggish anachronism. (handle_cell_single_dep): setup
      	the correct sheet to enter data into.
      
      	* src/eval.h: expunge redundant commenting, re-order,
      	const kill.
      3de60968
  21. 20 Apr, 2000 1 commit
    • Jody Goldberg's avatar
      Reorg cell contents and assignment. · bedb925b
      Jody Goldberg authored
      Fixs lots of usability details.
      
      2000-04-20  Jody Goldberg <jgoldberg@home.com>
      
      	* src/dialogs/dialog-cell-format.c : Use the edit_pos as the example
      	  not the top left corner.
      
      	* src/functions/fn-stat.c (gnumeric_ftest) : Use eval_pos_cellref
      	  to help localize the strangeness.
      	(gnumeric_ttest) : Ditto.
      
      	* src/xml-io.c (xml_write_cell_and_position) : If this is an array
      	  expression and we are the top left then add attributes to indicate
      	  size of array.  Ignore the rest of the array.
      	(xml_not_used_old_array_spec) : New routinr to handle the old array format.
      	(xml_cell_set_array_expr) : store an array.
      	(xml_read_cell) : Handle the old and the new array formats.
      
      	* src/workbook.c (workbook_close_if_user_permits) : Accept input
      	  first.
      	(wb_edit_key_pressed) : Handle array formulas here.
      	(workbook_detach_sheet) : Do not recalc all if we are exiting.
      	(workbook_start_editing_at_cursor) : When we start editing an
      	  array formula display just the formula not all the extra {}()[][] crap.
      
      	* src/sheet.c (SheetPrivate) : Add a recompute_spans flag.
      	(sheet_calc_spans) : New routine.
      	(sheet_cell_calc_span) : New routine.
      	(sheet_range_calc_spans) : Renamed and extended from
      	  sheet_cells_update.
      	(sheet_update) : Use sheet_calc_spans when necessary.
      	  Update the location region when the edit_pos changes.
      	(cb_recalc_spans_in_col) : Renamed from cb_collect_cells_in_col.
      	  Recalcs spans directly, no need to collect first.
      	(cb_set_cell_content) : New routine to set expr, or expr_and_value.
      	(sheet_range_set_text) : Use cb_set_cell_content, and remember
      	  chosen format with the cell rather than overriding the assigned
      	  format.
      	(sheet_cell_set_text) : Renamed from sheet_set_text.  Be more specific
      	  about how spans, rendering and the rest are handled.
      	(sheet_cell_set_expr) : New routine.
      	(sheet_cell_set_value) : Ditto.
      	(sheet_load_cell_val) : When displaying an array formula add {%s}()[][].
      	(sheet_redraw_cell_region) : Honour spans when redrawing.
      	(sheet_redraw_partial_row) : New routine.
      	(sheet_redraw_cell) : Ditto.
      	(sheet_is_cell_array) : Use cell_is_array.
      	(sheet_range_splits_array) : Renamed from sheet_check_for_partial_array.
      	(sheet_cell_add_to_hash) :  Do not touch spans at this point.
      	(sheet_cell_insert) : Rename from sheet_cell_add made recalc span
      	  optional.
      	(sheet_cell_new) : New routine that does not touch spans.
      	(sheet_cell_remove) : Made redraw optional.
      	(cb_clear_cell_comments) : Remove the cell if there is no comment.
      	(sheet_clear_region) : Remove the cell if there are no comments or
      	  contents.  Flag an update of the status region.
      
      	* src/sheet-view.c (cb_colrow_resize) : New function.
      	(sheet_view_col_size_changed) : Resize all rows, irrespective of
      	(sheet_view_row_size_changed) : existing cells.
      	(sheet_view_redraw_cell_region) : This no longer honours spans.
      
      	* src/sheet-style.c (sheet_style_attach) : Removed call to redraw.
      	sheet_cells_update : rename to sheet_range_calc_spans and move to
      	  sheet.c.
      
      	* src/sheet-autofill.c (autofill_cell) : Use sheet_cell_set_value
      	  rather than set_text.
      
      	* src/selection.c (sheet_selection_changed_hook) : Delete.
      	(sheet_selection_extend_to) : Update the status region to display the
      	  new size.
      	(sheet_selection_cut) : Use sheet_range_splits_array.
      	(selection_check_for_array) : New routine.
      
      	* src/parser.y : Remove icky array formula parsing that conflicted
      	  with array entries.
      
      	* src/number-match.c (format_match) : Return a Value * rather than a
      	  double.
      
      	* src/mstyle.c (mstyle_set_font_size) : Do not allow font sizes < 1.
      
      	* src/main.c (gnumeric_main) : Do NOT create an empty workbook
      	  then delete it if things are successfully loaded.  This causes
      	  a global recalc.  Instead add a flag to disable exit when the
      	  number of workbooks go to zero.  Then only enable the flag AFTER
      	  we have attempted to load the initial workbooks.
      
      	* src/item-grid.c (item_grid_event) : Update the status_region when
      	  button-1 is release.  It should display the edit_pos.
      
      	* src/gutils.c : Move cell_name, col_name, col_from_name,
      	  parse_cell_name, parse_cell_name_or_range and parse_cell_name_list,
      	  to parse-util.c.
      
      	* src/gnumeric.h  : Add RenderedValue.
      
      	* src/gnumeric-util.c (gnumeric_char_start_expr_p) : Move
      	  to parse-util.c
      
      	* src/file.c (workbook_read) : Remove freese thaw usage.
      	  Move call to update AFTER mark clean.
      
      	* src/expr.c (eval_pos_init) : Take a cellpos.
      	(parse_pos_evalpos) : New routine.
      	(eval_pos_cellref) : There is some questionable code scattered in the
      	  functions.  This routing localizes the odd bits for correction.
      
      	* src/eval.c (cell_eval_content) : Use sheet_redraw_cell,
      	  and rendered_value_calc_size.
      	(cell_get_dependencies) : Improve constness.
      
      	* src/corba-sheet.c : Remove the freeze thaw operations.
      	(Sheet_cell_set_formula) : Deleted.
      	(Sheet_range_set_formula) : Delete.
      
      	* src/commands.c : Adjust so that registration of command auto
      	  calls redo.  Add misc checks for splitting arrays.
      
      	* src/clipboard.h : Move the CellCopy types here from cell.h
      
      	* src/clipboard.c (paste_cell) : Use cell_has_expr.
      	  Don't insert the new cell till after its contents are assigned.
      
      	* src/cellspan.c (cell_register_span) : Improve constness.
      	(cell_unregister_span) : Ditto.
      	(row_cell_get_displayed_at) : Delete.
      	(cell_calc_span) : Moved here from cell.c
      
      	* src/dialogs/dialog-stf.glade : Adjust the header background colour
      	  to match the purdy new icon.  Add the icon.
      
      	* src/cell-draw.c : Use the rendered_value routines.
      	  Improve constness.
      
      	* src/analysis-tools.c (set_cell) : Use sheet_cell_fetch.
      
      	*.*
      	    cell_set_* -> sheet_cell_set_
      	    cell_set_*_simple -> cell_set_
      	    Cell::{row,col} -> Cell::{row,col}_info
      	    cell_get_text -> cell_get_entered_text
      	    cell_get_content -> cell_get_entered_text
      	    cell_name -> cell_coord_name
      	    cell_get_formatted_val -> cell_get_rendered_text
      	    cell_get_content -> cell_get_entered_text
      
      	* src/cell.c :
      	(cell_dirty) : Renamed from cell_modified.  Use
      	  sheet_set_dirty.
      	(cell_formula_changed) : Make the queuing of the recalc optional.
      	(cell_cleanout) : Handle union of expression and entered_text,
      	  and remove the rendered value.
      	(cell_copy) : Ditto.
      	(cell_destroy) : handle cell_modified -> cell_dirty.
      	(cell_set_text) : Use parse_text_value_or_expr and store the prefered
      	  format.
      	(cell_set_text_and_value) : New routine.
      	(cell_assign_value) : New routine.
      	(cell_set_value) : Support formats.
      	(cell_set_expr_and_value) : New routine.
      	(cell_set_expr_internal) : Split from cell_set_expr.
      	(cell_set_expr) : Divide to allow for not queuing a recalc.
      	(cell_set_array_formula) : Use cell_set_expr_internal.
      	(cell_is_array) : New utility.
      	(cell_is_partial_array) : New utility.
      	(cell_has_expr) : New utility.
      	(cell_render_value) : Use rendered_value_*.
      	Move all comment routines into cell-comment.[ch].
      
      	* idl/Gnumeric.idl : Remove cell_set_formula, and range_set_formula.
      	  These were identical to set_text.  Made Workbook embeddable.
      bedb925b
  22. 16 Feb, 2000 1 commit
    • Jody Goldberg's avatar
      More header cleanup. Remove value.h and sheet.h from expr.h. Remove · c73b937c
      Jody Goldberg authored
      
      2000-02-15  Jody Goldberg <jgoldberg@home.com>
      
      	* *.[ch] : More header cleanup.  Remove value.h and sheet.h
      	  from expr.h.  Remove sheet.h from cell.h.
      
      2000-02-16  Dom Lachowicz <dominicl@seas.upenn.edu>
      
      	* src/plugin-manager.c : Move functionality.
      	* src/dialogs/dialog-plugin-manager.c : here.  and move to libglade.
      
      	* src/workbook.c (plugins_cmd) : Use dialog_plugin_manager instead
      	  of plugin_manager_new.
      c73b937c
  23. 13 Jan, 2000 1 commit
  24. 11 Jan, 2000 1 commit
    • Jody Goldberg's avatar
      - Interbook references are workable now. They can only be produced by · d2cf16cc
      Jody Goldberg authored
        cutting and pasting a reference originally in one book into another.
      
      2000-01-11  Jody Goldberg <jgoldberg@home.com>
      
      	* src/workbook.c (workbook_detach_sheet) : Even books with only 1
      	  sheet can have inter-sheet references.  think inter-book...
      	(workbook_can_detach_sheet) : Delete we can always detach a sheet.
      
      	* src/expr.c (cellref_relocate) : We only need to range check
      	  references that are changing.
      
      	* src/workbook.c (workbook_expr_relocate) : Copying to the same
      	  logical cell in another sheet is still a copy.
      
      	* ./src/eval.c (cell_queue_recalc_list) : Handle cross workbook
      	  depends correctly.
      
      	* src/eval.c (sheet_get_intersheet_deps) : Delete it is now unnecessary.
      	(dependency_data_destroy) : invalidate dangling intersheet
      	  dependancies.
      d2cf16cc
  25. 06 Jan, 2000 1 commit
  26. 05 Jan, 2000 1 commit
    • Jody Goldberg's avatar
      Initial version of undo. · 7667d632
      Jody Goldberg authored
      2000-01-04  Jody Goldberg <jgoldberg@home.com>
      
      	* src/commands.[ch] : New files.
      
      	* src/workbook-view.c (workbook_view_set_undo_redo_state) : Take
      	  strings to use as suffixes to undo and redo.  NULL indicates
      	  disabled.
      
      	* src/sheet.c (sheet_set_current_value) : Use cmd_set_text to register
      	  undo.
      
      	* src/workbook.c (workbook_menu_view) : Make The formula toggle a
      	  toggle item.
      	(workbook_menu_insert) : Move the insert object menu item here,
      	  and adjust the selector characters to make more sense.
      	(undo_cmd, redo_cmd) : Enable.
      
      	(workbook_init) : Init the undo/redo lists.
      	(workbook_do_destroy) : Clear the undo/redo lists.
      	(wb_input_finished) : Delete.  It was the same as accept_input.
      7667d632
  27. 09 Dec, 1999 1 commit
    • Jody Goldberg's avatar
      Bug 3670 · 81a70b0f
      Jody Goldberg authored
      1999-12-09  Jody Goldberg <jgoldberg@home.com>
      
      	* src/eval.[ch] (cell_add_explicit_dependency) : New function.
      
      	* src/functions/fn-lookup.c (gnumeric_indirect) : Clear all
      	  dependencies the calling cell has and regenerate them anytime the
      	  function is called.  This is somewhat wasteful but is IMO a better
      	  space time trade off than penalizing all depends to be able to flag
      	  which dep is an indirection dep.
      
      	  This method will cause problems if multiple indirection calls are
      	  used in a single expression.
      81a70b0f
  28. 17 Oct, 1999 1 commit
    • Miguel de Icaza's avatar
      Set the Column/Row dimensions here after loading them, as the new · 0f62302a
      Miguel de Icaza authored
      1999-10-16  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/xml-io.c (xml_read_colrow_info): Set the Column/Row
      	dimensions here after loading them, as the new
      	sheet_set_zoom_factor can no longer be used to reset lingering
      	values (the value of the pixels was being computed here after we
      	had read the units).
      
      	* src/eval.c (cell_get_dependencies): Prototype change.  We now
      	take the Cell as an argument and we scan all the sheets that
      	depend on us.
      0f62302a
  29. 03 Jun, 1999 1 commit
  30. 12 May, 1999 1 commit
  31. 30 Apr, 1999 1 commit
  32. 24 Apr, 1999 1 commit
  33. 16 Apr, 1999 1 commit
    • Miguel de Icaza's avatar
      When queuing for recalc, tag the cell, so that if we remove the cell from · d0921f63
      Miguel de Icaza authored
      1999-04-16  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/eval.c (cell_queue_recalc): When queuing for recalc, tag the
      	cell, so that if we remove the cell from the recalc list we can
      	quickly find out if we have to look for it on the list of pending
      	recomputations.
      	(pick_next_cell_from_queue): Clear the cell's
      	CELL_QUEUED_FOR_RECALC bit.
      	(cell_unqueue_from_recalc): New routine to remove a cell queued
      	for recomputation.
      
      	* src/clipboard.c (new_node): Trim leading spaces.
      d0921f63
  34. 30 Sep, 1998 1 commit
  35. 24 Aug, 1998 1 commit
    • Arturo Espinosa's avatar
      Lots of changes during the weekend: · ba7fbc1f
      Arturo Espinosa authored
      
      
      Lots of changes during the weekend:
      
      	- New style management code:  All styles are now managed by
      	  regions on a sheet (the default region, is attached to the
      	  complete sheet).
      
      	- Styles can now be partial: Only some parts of the style
      	  might be valid (this is very important).
      
      	- Insert column/Insert row/Shift rows has been fixed and
      	  it now computes properly the dependencies on any
      	  data change.
      
      	- Linking/unlinking formulas now takes care also of
      	  adding/removing the dependencies of the cell.
      
      Miguel.
      ba7fbc1f