1. 11 Nov, 2000 1 commit
    • Jody Goldberg's avatar
      Renamed and moved from here to here. Added support for displaying · af0271b0
      Jody Goldberg authored
      2000-11-11  Jody Goldberg <jgoldberg@home.com>
      	* src/value.c (value_get_default_halign) : Renamed and moved from here
      	* src/cell.c (cell_default_halign) : to here.  Added support for
      	  displaying formulas.
      	* src/print-cell.c (print_cell) : only draw hash marks for numbers
      	  not when displaying formulas.
      	* src/cell-draw.c (cell_draw) : Ditto.
      	* src/cellspan.c (cell_calc_span) : Ditto.
      	* src/rendered-value.c (rendered_value_calc_size_ext) : Ditto.
  2. 10 Nov, 2000 1 commit
    • Jody Goldberg's avatar
      Minor optimization to decrease flicker. · df3eb271
      Jody Goldberg authored
      2000-11-10  Jody Goldberg <jgoldberg@home.com>
      	* src/workbook-format-toolbar.c (workbook_format_toolbutton_update) :
      	  Minor optimization to decrease flicker.
      	* src/sheet.c (sheet_cell_calc_span) : Clarify the semantics of
      	  the various flags.
      	(cb_max_cell_width) : If the value used a dynamic format we need to
      	  rerender ignoring the current width.
      	* src/rendered-value.c (rendered_value_new) : renamed from
      	  rendered_value_new_ext and delete the old rendered_value_new.
      	  Extend slightly to flag whether or not to handle dynamic formats.
      	* src/render-ascii.c (cell_region_render_ascii) : Handle the style
      	  lookup localy.
      	* src/cell.c (cell_eval_content) : We need to manually render
      	  the value here, but no longer need to calculate the size
      	  seperately.  That is done automatically in the render.
      	(cell_render_value) : Handle style localy, and calculate the size.
      2000-11-09  Jody Goldberg <jgoldberg@home.com>
      	* src/workbook-control-gui.c (workbook_control_gui_init) : move the
      	  autosave code here.
      	* src/workbook.c : from here.
  3. 08 Nov, 2000 1 commit
    • Jody Goldberg's avatar
      Rewrite to use eval_expr. (paste_cell_with_operation) : rework to handle · 9d1aa45a
      Jody Goldberg authored
      2000-11-08  Jody Goldberg <jgoldberg@home.com>
      	* src/clipboard.c (apply_paste_oper_to_values) : Rewrite to use
      	(paste_cell_with_operation) : rework to handle pasting as_value
      	(paste_link) : This is broken.  FIXME.
      	(paste_cell) : Move the check for pasting content or as_value to the
      	* src/cell.c (cell_make_value) : Unlink expressions if necessary.
      	* src/sheet.c (sheet_cell_set_expr) : flag that content changed.
      	* src/dependent.c (dependent_queue_recalc_list) : Add some safety.
      	* src/item-cursor.c (item_cursor_event) : clicking on an anted cursor
      	  is almost the same as clicking on a selection cursor.
      	* src/expr-name.c (expr_name_add) : It is legal to add names that are
      	  available in other scopes as long as the new scope does not contiain
      	  the name.
  4. 06 Nov, 2000 1 commit
    • Jody Goldberg's avatar
      Remove 'entered_text' foolishness. · 629daef1
      Jody Goldberg authored
      2000-11-05  Jody Goldberg <jgoldberg@home.com>
      	* src/sheet.c (cb_set_cell_content) : Use cell_set_value.
      	(sheet_range_set_text) : remove need for entered_text.
      	* src/xml-io.c (xml_read_cell) : Remove 'General' hack.
      	* src/dialogs/dialog-cell-format.c (draw_format_preview) : remove
      	* src/rendered-value.c (rendered_value_new_ext) : No need for
      	  entered_text.  Use format_value in place of value_as_string.
      	* src/format.c (format_value) : No need for entered_text.
      	  Be careful to always set the colour.  This may need to be tuned
      	  if we enter '$10' and use a display format of @ what should be
      	  displayed ?  10 or $10 ?  We may need to pass in the parse format.
      	* src/cell.c (cell_cleanout) : Remove entered_text.
      	(cell_copy) : Ditto.
      	(cell_set_text) : Ditto.
      	(cell_set_value) : Ditto, do not render value here.
      	(cell_set_text_and_value) : Delete.
      	(cell_set_expr_and_value) : Remove entered_text, and add format
      	(cell_set_expr_internal) : No need to manually unref the old expr.
      	  That was already done in cleanout.
      	(cell_make_value) : remove entered_text.
      	* src/rendered-value.c (cell_get_entered_text) : Use the stored parse
      	  format and format_value to regenerate the entered text from a value.
  5. 02 Nov, 2000 2 commits
    • Jody Goldberg's avatar
      Any form of General will need a width. Default to full precision. · dc9c0aee
      Jody Goldberg authored
      2000-11-02  Jody Goldberg <jgoldberg@home.com>
      	* src/rendered-value.c (rendered_value_new_ext) : Any form of General
      	  will need a width.  Default to full precision.
      	* src/cell.c (cell_set_value) : Do not both to assign optional formats
      	  of General
    • Jody Goldberg's avatar
      Default the parse format to General. Eventually we can simply · 76e697fb
      Jody Goldberg authored
      2000-11-01  Jody Goldberg <jgoldberg@home.com>
      	* src/xml-io.c (xml_read_cell) : Default the parse format to General.
      	  Eventually we can simply cell_set_value to not guess that the
      	  display format == the parse format.  However, that will require
      	  changing all of the importers.  For now we can cheat, and supply
      	  General as the format.
      	* src/functions/fn-string.c (gnumeric_dollar) : use string_get_nocopy.
  6. 18 Oct, 2000 1 commit
    • Jody Goldberg's avatar
      More tuning for General. · a7948285
      Jody Goldberg authored
      2000-10-18  Jody Goldberg <jgoldberg@home.com>
      	* src/format.c (fmt_general_float) : clamp the precision at DBL_PREC.
      	* src/rendered-value.c (rendered_value_new_ext) : Don't forget the
      	  intercharacter spacing when approximating the width of a character.
      	* src/str.c (string_get_nocopy) : new function.
      	* src/cell.c (cell_set_value) : Use it.
      2000-10-16  Jody Goldberg <jgoldberg@home.com>
      	* src/rendered-value.c (rendered_value_new_ext) : fix some leaks.
  7. 16 Oct, 2000 1 commit
    • Jody Goldberg's avatar
      RE_RENDER when a span clac is forced. This is a bit brute force for now, · bad302a3
      Jody Goldberg authored
      2000-10-15  Jody Goldberg <jgoldberg@home.com>
      	* src/sheet.c (sheet_update) : RE_RENDER when a span clac is forced.
      	  This is a bit brute force for now, but is necessary to force the
      	  re-rendering of values that may have width dependent formats.
      	  I've noted a possible future enhancement that would remove this req
      	  at the cost of some complexity.
      	* src/format.c (fmt_general_float) : new function.
      	(fmt_general_int) : new function.
      	(format_value) : Use the new routines.
      2000-10-15  Jody Goldberg <jgoldberg@home.com>
      	* src/cell.c (cell_set_value) : Re-render the entered text to handle
      	  width dependent formats.
      2000-10-14  Jody Goldberg <jgoldberg@home.com>
      	* src/print-cell.c (print_overflow) : improve drawing of hash marks.
      	* src/cell-draw.c (draw_overflow) : to always draw at least one hash.
      	* src/rendered-value.c (rendered_value_new_ext) : pass in approx
      	  column width in characters for use by general.
  8. 25 Sep, 2000 1 commit
  9. 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/
      	* 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
      	* src/workbook.c (cb_cell_rerender) : Only cells need this.
  10. 31 Aug, 2000 1 commit
    • Jody Goldberg's avatar
      New base class for Cells. Convert everything to access the elements that · 8b5866fb
      Jody Goldberg authored
      2000-08-30  Jody Goldberg <jgoldberg@home.com>
      	* dependent.[ch] : New base class for Cells.
      	  Convert everything to access the elements that are now
      	  in the cell's base.
      	* Makefile.am : Because of XL we need to build plugins before src.
      	  That will need changing.
      	* src/func.c (function_marshal_arg) : Use expr_array_intersection.
      	* src/expr.c (eval_expr_real) : Do implicit conversions from strings
      	  to numbers if possible.
      	  Access the first element of an array.  NOTE : This is WRONG
      	  We need to implement array expression behavior some day.
      	(expr_array_intersection) : New routine.
  11. 21 Aug, 2000 1 commit
    • Jody Goldberg's avatar
      Improve regexps. · 9ad38a63
      Jody Goldberg authored
      2000-08-21  Jody Goldberg <jgoldberg@home.com>
      	* src/number-match.c (format_create_regexp) : Improve regexps.
      	* src/formats.c (cell_format_is_number) : Format always uses standard
      	  decimal chars.
      	* src/format.c (gnumeric_setlocale) : New routine that clears cached
      	  locale info.
      	(format_get_decimal) : Improve use mon_decimal.
      	(format_get_thousand) : Improve use mon_thousands_sep.
      	(format_get_arg_sep) : New func.
      	(format_get_col_sep) : New func.
      	(format_destroy) : Use GPtrArray.
      	(render_number) : Improve localization.
      	(format_add_thousand) : rename format_toggle_thousands. De-localize.
      	(find_decimal_char) : De-localize.
      	(format_remove_decimal) : Ditto.
      	(format_add_decimal) : Ditto.
      	(format_number) : Ditto.
      	* src/expr.c (do_expr_tree_to_string) : Use format_get_arg_sep.
      	* src/cell.c (cell_get_format) : Update for the changes to StyleFormat.
      	* src/auto-format.c (auto_style_format_suggest) :
      	  style_format_new -> style_format_new_XL
      	* src/mstyle.c (mstyle_element_dump) : There is no direct access to
      	  the format string anymore.
      	(mstyle_set_format_text) : Add a warning.
      	* src/gutils.[ch] (float_get_from_range) : Delete.
      	(int_get_from_range) : Ditto.
      	* src/parser.y : Revamp lexer to use strtol, and strtod for number
      	  parsing.  Begin hooks for supporting row & col selection. (3:4 or A:B)
      	* src/print-info.c (render_value_with_format) : Changes to StyleFormat.
      	* src/sheet.h : Move SpanCalcFlags.
      	* src/gnumeric.h : here.
      	* src/style.[ch] : Privatize StyleFormat, move it to format.[ch]
      	* src/value.c (value_get_as_string) : Correctly localize things for
      	* src/workbook-format-toolbar.c (modify_cell_format) : format
      	  modification callback modifies the StyleFormat.
      	* src/workbook.c (workbook_set_auto_expr) : Use gnumeric_setlocale.
      	* src/xml-io.c (xml_workbook_read) : Use gnumeric_setlocale.
      	(xml_workbook_write) : Ditto.
      	(xml_read_cell) : Use style_format_new_XL.
      	(xml_write_cell_and_position) : Store the number formats in non localized XL form.
      	(xml_write_style) : Ditto.
      	* src/dialogs/dialog-cell-format.c (fmt_dialog_init_format_page) :
      	  Display localized number formats.
      	(fillin_negative_samples) : Not need to localize generated number
      	* src/dialogs/dialog-function-wizard.c (formula_guru_set_expr) : Use
      	* src/dialogs/dialog-stf-format-page.c
      	  (stf_dialog_format_page_prepare) : StyleFormats are now explicitly
      	  stored in a locale neutral format.
      	* src/functions/fn-string.c (gnumeric_text) : changes to
      	* src/functions/fn-financial.c (coupdayb) : Silence some warnings.
      	* src/functions/fn-information.c (translate_cell_format) : This should
      	  now work for different locales.
      2000-08-18  Jody Goldberg <jgoldberg@home.com>
      	* src/number-match.c (compute_value) : Extend the match algorithms to
      	  handle the new regexps.
      	* src/format.c (format_get_thousand) : provide a better default for
      	  countries using ',' as a decimal point.
  12. 18 Aug, 2000 1 commit
    • Jody Goldberg's avatar
      Do not write Useless 'Style' attribute. - Make Rows/Cols attributes of the · 7a889dfc
      Jody Goldberg authored
      2000-08-18  Jody Goldberg <jgoldberg@home.com>
      	* src/xml-io.c (xml_write_cell_and_position) : Do not write Useless
      	  'Style' attribute.
      	- Make Rows/Cols attributes of the Cell not the Content
      	- When storing Values store the value type, the parse format (if
      	  available) and the value as a plain string (eg $100.00 == 100)
      	* src/value.c (value_new_from_string) : New function.
      	* src/number-match.c (format_create_regexp) : Be more careful when
      	  handling decimals and thousands seperators.  This sucks, but it
      	  sucks less than before.
      	* src/formats.c (format_currency) : typo.
      2000-08-17  Jody Goldberg <jgoldberg@home.com>
      	* src/xml-io.c (xml_check_version) : New function.
      	(xml_probe) : Use it here.
      	(gnumeric_xml_read_workbook) : And here.
  13. 12 Aug, 2000 1 commit
    • Jody Goldberg's avatar
      Add graph-guru for bonobo enabled builds. · c665e798
      Jody Goldberg authored
      2000-08-11  Jody Goldberg <jgoldberg@home.com>
      	* src/dialogs/Makefile.am : Add graph-guru for bonobo enabled builds.
      	* src/dialogs/formula-guru.glade (rolled_label) : Don't fill.
      2000-08-11  Jody Goldberg <jgoldberg@home.com>
      	* src/functions/fn-math.c (gnumeric_g_product) : Ignore blanks.
      	(gnumeric_product) : Ditto.
      	(gnumeric_sumsq) : Ditto.
      	(gnumeric_suma) : Ditto.
      	(gnumeric_sum) : Ditto.
      	(gnumeric_gcd) : Ditto.
      2000-08-11  Jody Goldberg <jgoldberg@home.com>
      	* src/corba-args.c : Remove support for Gnorba. Die Pig Die !
      	* src/corba-workbook-factory.c : Ditto.
      	* src/embeddable-grid.c : Ditto.
      	* src/sheet-object.c : Ditto.
      	* src/workbook.c : Ditto.
      	* src/cell-comment.c (cell_comment_realize) : Use Cell::pos rather
      	  than Cell::{row,col}_info->pos.
      	(cell_comment_reposition) : Ditto.
      	* src/cell-draw.c (cell_draw) : Ditto.
      	* src/cellspan.c (cell_register_span) : Ditto.
      	(cell_calc_span) : Ditto.
      	* src/clipboard.c (paste_cell_with_operation) : Ditto.
      	(paste_cell) : Ditto.
      	* src/cmd-edit.c (cb_compare_deps) : Ditto.
      	(cmd_select_cur_depends) : Ditto.
      	* src/eval.c (dependency_range_ctor) : Ditto.
      	(handle_cell_single_dep) : Ditto.
      	(handle_cell_range_deps) : Ditto.
      	(cell_get_range_dependencies) : Ditto.
      	(cell_get_dependencies) : Ditto.
      	* src/item-grid.c (item_grid_draw) : Ditto.
      	* src/parse-util.c (cell_name) : Ditto.
      	* src/position.c (eval_pos_init_cell) : Ditto.
      	* src/print-cell.c (print_cell) : Ditto.
      	(print_cell_range) : Ditto.
      	* src/sheet-autofill.c (autofill_cell) : Ditto.
      	* src/sheet-vector.c (sheet_vectors_cell_changed) : Ditto.
      	* src/sheet.c (sheet_cell_calc_span) : Ditto.
      	(sheet_reposition_comments) : Ditto.
      	(sheet_get_extent_cb) : Ditto.
      	(sheet_redraw_cell) : Ditto.
      	(sheet_cell_add_to_hash) : Ditto.
      	(sheet_cell_insert) : Ditto.
      	(sheet_cell_new) : Ditto.
      	(sheet_cell_remove_from_hash) : Ditto.
      	(sheet_move_range) : Ditto.
      	* src/solver-lp.c (solver_simplex) : Ditto.
      	(make_solver_arrays) : Ditto.
      	(solver_affine_scaling) : Ditto.
      	(make_int_array) : Ditto.
      	(solver_branch_and_bound) : Ditto.
      	(solver_answer_report) : Ditto.
      	(solver_sensitivity_report) : Ditto.
      	* src/xml-io.c (xml_write_cell) : Ditto.
      	(xml_cell_set_array_expr) : Ditto.
      	(xml_write_solver) : Ditto.
      	* src/dialogs/dialog-solver.c (check_int_constraints) : Ditto.
      	* src/about.c : Move the ABOUT_KEY here from.
      	* src/dialogs/dialogs.h : here.  Also, add dialog_graph_guru.
      	* src/Makefile.am : Remove wizard.h and the seperate wizard library.
  14. 10 Jul, 2000 1 commit
    • Jody Goldberg's avatar
      Bug 16860 A few portability problems. · 7b8afaf0
      Jody Goldberg authored
      Bug 16860
      A few portability problems.
      2000-07-09  Jody Goldberg <jgoldberg@home.com>
      	* src/history.c (history_menu_item_create) : Fix.
      	* src/stf-parse.c (stf_parse_options_before_modification) : Simplify
      	  for irix compiler.
      	* src/print-info.c (print_info_new) : cellrange is a ValueRange.
      	(save_range) : Ditto.
      	* src/dialogs/dialog-printer-setup.c (do_setup_page_info) : Ditto.
      	(do_fetch_page_info) : Ditto.
  15. 06 Jul, 2000 1 commit
    • Jody Goldberg's avatar
      bug 16490. We were attempting to display the entered text rather than the · 2a420f79
      Jody Goldberg authored
      bug 16490.
      We were attempting to display the entered text rather than the formated text
      and falling over when the copied cell had no sheet.  This is not lovely, but it
      is as clean as we'll get for now.
      2000-07-06  Jody Goldberg <jgoldberg@home.com>
      	* src/sheet-style.c (sheet_style_compute_from_list) : Make public.
      	  and rename from sheet_mstyle_compute_from_list.  Changed all
      	* src/rendered-value.c (rendered_value_new) : Optionaly take a style
      	  list.  Use it if offered.
      	* src/cell.c (cell_render_value) : New signature for rendered_value_new.
      	* src/render-ascii.c (cell_region_render_ascii) : Temporarily reverse
      	  the style list so that it goes in the correct direction.   Use
      	  rendered_value not entered_text.
      	* src/clipboard.c (clipboard_prepend_cell) : Init the Cell::pos with
      	  the offsets.  This is useful in when looking up formats.
  16. 03 Jul, 2000 1 commit
    • Morten Welinder's avatar
      Don't add one to the number of lines if the last line is empty. · 332034ff
      Morten Welinder authored
      2000-07-03  Morten Welinder  <terra@diku.dk>
      	* src/stf-parse.c (stf_parse_get_rowcount): Don't add one to the
       	number of lines if the last line is empty.
      	* src/sheet.c (sheet_cell_set_text): Plug leak.
      	* src/workbook-format-toolbar.c
       	(do_sheet_selection_apply_number_format): Avoid double translation
       	of format.
      	* src/mstyle.c (mstyle_set_format_text): Renamed from
      	(mstyle_set_format): New function taking a StyleFormat *.
  17. 28 Jun, 2000 1 commit
    • Jody Goldberg's avatar
      new function. · 93f11589
      Jody Goldberg authored
      2000-06-28  Jody Goldberg <jgoldberg@home.com>
      	* src/functions/fn-sheet.c (GNUMERIC_VERSION) : new function.
      	* src/workbook.c (workbook_do_destroy) : No need to release the
      	  clipboard here.  The Sheet does it for us.
      	* src/workbook-format-toolbar.c : Add Fill to the default money
      	* src/symbol.c : The only symbols are functions.  The global table
      	  should not be world visible.
      	* src/sheet.c (sheet_flag_status_update_cell) : Take a CellPos.
      	(sheet_get_extent_cb) : Use Cell::pos rather than adding an
      	(cb_set_cell_content) : Use StyleFormat.
      	(sheet_cell_set_value) : Call sheet_flag_status_update_cell.
      	(sheet_cell_set_value) : Ditto.
      	(sheet_destroy) : Prepare to clear out named expressions.
      	(colrow_move) : Handle changes in cell_relocate signature.
      	(sheet_move_range) : Ditto.
      	* src/sheet-autofill.c : Use StyleFormats.
      	* src/position.c (parse_pos_init) : Global position are permitted.
      	* src/parser.y : Large change.  Do not automaticlly look for function
      	  names or named expressions in the lexer.  The lexer returns STRING
      	  and QUOTED_STRING.  The parser then does the appropriate lookups to
      	  potentially convert to something else.  This allows us to have sheet
      	  names that are the same as functions.
      	* src/parse-util.c (cellref_name) : Add flag to optionally disable the
      	  addition of the sheet name.  This is useful when printing
      	  Sheet2!A1:A3 rather than Sheet2!A1:Sheet2!A3.
      	* src/number-match.c (format_create_regexp) : Handle fill formats.
      	* src/mstyle.c (mstyle_get_border) : Fix constness.
      	* src/mathfunc.c (combin, fact) : Moved these here from
      	* src/main.c (gnumeric_main) : No more constants_init, or
      	* src/func.c () : Reorg.  Remove some dead code.  Begin adding
      	  workbook local function support, Begin adding volatile, and
      	  semi-volatile functions.  Move the use of SymbolTable internal
      	  in preparation for eliminating it.
      	* src/format.c (format_number) : Improve support for pound, yen, and euro.
      	  Remember to produce a number when we hit spacing.
      	* src/expr.c : Have ExprFunc refer directly to the FunctionDefinition
      	  We still use a SymbolTable internally, but that will be merged out
      	* src/expr-name.c : Major reorg.  Not complete.
      	* src/corba-sheet.c (fill_corba_value) : Adjust to changes in
      	  cellref_name signature.
      	* src/commands.c (cmd_set_date_time_undo) : No need to manually call
      	  update_cell_flag.  cell_remove, and cell_set_text do that for us.
      	(cmd_set_date_time_redo) : Ditto.
      	  Use StyleFormat.
      	* src/clipboard.c (paste_cell) : Take the ExprRewriteInfo as an
      	(clipboard_paste_region) : Init the ExprRewriteInfo.  We need to do
      	  this here rather than in cell_relocate because we may be moving a
      	  region, not just a single cell, and references within the region
      	  should not be changed.
      	* src/cell.c (cell_relocate) : Take the relocation info as an
      	  argument.  Non NULL indicates a request to check bounds.  We can not
      	  do this at the cell level. becuase we may be moving a block rather
      	  than just a single cell, and references into the block should NOT be
      	(cell_set_text_and_value) : Take a StyleFormat.
      	(cell_assign_value) : Ditto.
      	(cell_set_value) : Ditto.
      	(cell_set_expr_internal) : Ditto.
      	(cell_set_expr_unsafe) : Ditto.
      	(cell_set_expr) : Ditto.
      	* src/auto-format.c (do_af_suggest) : Expression now refers directly
      	  to functionDef.
  18. 20 Jun, 2000 1 commit
    • Jody Goldberg's avatar
      We need to manually trigger a changed event after setting the position · 739a6dc7
      Jody Goldberg authored
      2000-06-19  Jody Goldberg <jgoldberg@home.com>
      	* dialog-function-wizard.c (formula_guru_set_expr) : We need to
      	  manually trigger a changed event after setting the position becuase
      	  pre-gtk-1.4 setting the text reset the cursor position to 0.
      	(cb_formula_guru_entry_event) : new function.
      	(cb_formula_guru_rolled_entry_event) : new function.
      2000-06-19  Jody Goldberg <jgoldberg@home.com>
      	* src/eval.c (invalidate_refs) : const.
      	(do_deps_destroy) : const.
      	* src/cell.c (cell_set_expr_internal) : Be careful about unrefing.
      	* src/item-edit.c (entry_event) : Rather than catching 'event' and
      	  checking for the type of event we want.  Catch the events directly.
      	  That way the events can take place BEFORE we look for our position.
  19. 06 Jun, 2000 1 commit
    • Jody Goldberg's avatar
      silence a few warnings. · 8adf2128
      Jody Goldberg authored
      Fix a problem with the new expr_relocate flag for pasting when soring.
      2000-06-05  Jody Goldberg <jgoldberg@home.com>
      	* src/cell.c (cell_relocate) : when relocating the expression
      	  be careful to use the offsets when calculating the validity.
      	* src/workbook-edit.c (workbook_auto_complete_destroy) : Only remove
      	  signal if it has been activated.  Only delete the completer if it
  20. 05 Jun, 2000 1 commit
    • Jody Goldberg's avatar
      renamed from sheet_cell_formula_{link,unlink}. · 7f94ba9e
      Jody Goldberg authored
      2000-06-05  Jody Goldberg <jgoldberg@home.com>
      	* src/sheet.c (sheet_cell_expr_{link,unlink}) : renamed from
      	* src/cell.c (cell_relocate) : Doh! use the offset flags now that they
      	  are being passed.
      	* src/clipboard.c (paste_cell) : Renamed from paste_cell_flags.
      	* src/expr.c (compare) : value_is_empty_cell -> VALUE_IS_EMPTY.
      	* src/value.c (VALUE_IS_EMPTY) : rename from value_is_empty_cell.
      	* src/sheet-private.h : Add resize_scrollbar.
      	* src/sheet.c (sheet_{col,row}_add) : Use resize_scrollbar flag rather
      	  than manually updating the scrolling bar.
      	(sheet_update) : Handle resize_scrollbar.
      	(sheet_cell_expr_link) : renamed from sheet_cell_formula_link.
      	(sheet_cell_expr_unlink) : renamed from sheet_cell_formula_unlink.
  21. 04 Jun, 2000 1 commit
    • Jody Goldberg's avatar
      Set the CELL_IN_SHEET_LIST flag. (sheet_cell_remove_from_hash) : Clear the · c6a63d53
      Jody Goldberg authored
      2000-06-04  Jody Goldberg <jgoldberg@home.com>
      	* src/sheet.c (sheet_cell_add_to_hash) : Set the CELL_IN_SHEET_LIST
      	(sheet_cell_remove_from_hash) : Clear the CELL_IN_SHEET_LIST flag.
      	(cb_remove_allcells) : Ditto.
      	(sheet_cell_formula_link) : Set the CELL_IN_EXPR_LIST flag.
      	(sheet_cell_formula_unlink) : Clear the CELL_IN_EXPR_LIST flag.
      	(sheet_formulas_unlink) : Ditto.
      	* src/clipboard.c (paste_cell_flags) : Take some additional arguments
      	  so that pasted cells can potentially have their references made
      	  invariant, this is for sorting.
      	(clipboard_paste_region) : Pass the additional offsets when
      	  PASTE_EXPR_RELOCATE is specified.
      	(append_cell_closure_t) : Delete this type.  Move the origin cell info
      	  into CellRegion.
      	* src/cell.c (cell_copy) : Clear the sheet and associated flags for
      	  the copied cell.  This avoids accidentally realizing comments that
      	  become undeletable.
      	(cell_relocate) : Remove the unlink flag now that we have the
      	  additional cell_flags.
  22. 24 May, 2000 2 commits
    • Morten Welinder's avatar
      Style now needs to be initialised before formats. · 169f4952
      Morten Welinder authored
      2000-05-24  Morten Welinder  <terra@diku.dk>
      	* src/main.c (gnumeric_main): Style now needs to be initialised
       	before formats.
      	* src/number-match.c (format_match): Take a StyleFormat ** instead
       	of a char ** for the suggested format.  All callers changed.
      	(format_parse_t): rename member format to format_str and
       	introduce new member format, a StyleFormat *.
      	(format_match_define): Get a style at this point.
      	* src/datetime.c (datetime_value_to_serial_raw): Don't supply a
       	format return variable to format_match since we aren't interested
       	in the result.
      	* src/parse-util.c (parse_text_value_or_expr): Return a
       	StyleFormat * instead of a char *.  All callers changed.
      	* src/expr.c (expr_parse_string): Take a StyleFormat ** instead of
       	a char ** for the suggested format.  All callers changed.
      	* src/parser.y (make_string_return): Turn parser_desired_format
       	into a StyleFormat **.
      	(gnumeric_expr_parser): Take a StyleFormat ** instead of a char **
       	for the suggested format.  All callers changed.
      	* src/auto-format.c (auto_style_format_suggest): New function.
      	* src/sheet-style.c (sheet_style_optimize): Include adjacent
       	ranges in the list of styles to consider.  Handle intervening
       	styles better.  Don't stop searching for matching pairs just
       	because we merge -- only when the merge kills the slave.
      	* src/ranges.c (range_dump): Don't print "\n".  All callers
       	changed as needed.
      	* src/sheet-style.c (sheet_style_optimize, sheet_styles_dump):
       	Send all debugging output to stderr.  (As opposed to half stderr
       	and half stdout.)
    • Jody Goldberg's avatar
      Actually assign the format after we ref it. (cell_get_format) : Cells with · 45e0d807
      Jody Goldberg authored
      2000-05-24  Jody Goldberg <jgoldberg@home.com>
      	* src/cell.c (cell_set_expr_internal) : Actually assign the format
      	  after we ref it.
      	(cell_get_format) : Cells with format 'General' may appear to have
      	  a format via autoformat or via the text that was entered.
  23. 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
      	* 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
      	* 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.
  24. 20 May, 2000 2 commits
    • Jody Goldberg's avatar
      Still more Chema discovery. · 7355ba25
      Jody Goldberg authored
      2000-05-19  Jody Goldberg <jgoldberg@home.com>
      	* src/cell.c (cell_set_format) : Apply the format to a NEW style, not the current
      	   style which may be say .... the DEFAULT!!!
    • Jody Goldberg's avatar
      Doh! Fix the rest of the paste crashes. · 451b2fd3
      Jody Goldberg authored
      Fix the rest of the paste crashes.
      2000-05-19  Jody Goldberg <jgoldberg@home.com>
      	* src/cell.c (cell_copy) : Ref the format if one exists.
  25. 17 May, 2000 1 commit
    • Jody Goldberg's avatar
      Fix bugs 10705 10775 11159 Morten's autofill UMR Han's crash on sheet · efd376c0
      Jody Goldberg authored
      Fix bugs
          Morten's autofill UMR
          Han's crash on sheet deletion.
      2000-05-17  Jody Goldberg <jgoldberg@home.com>
      	* src/sheet.c (sheet_get_extent) : Disable the use of
      	  sheet_style_get_extent until it is more intelligent.
      	* configure.in : Produce a Using OAF message in the non-bonobo case
      	  too.  Limit xml to version 1.x for now.
      	* src/cell.c (cell_set_text_and_value) : Set the entered_text BEFORE
      	  the value so that cells with format = text render correctly.
  26. 09 May, 2000 2 commits
  27. 06 May, 2000 2 commits
    • Jody Goldberg's avatar
      Split from cell_set_expr. · 4d72a2e6
      Jody Goldberg authored
      2000-05-06  Jody Goldberg <jgoldberg@home.com>
      	* src/cell.c (cell_set_expr_unsafe) : Split from cell_set_expr.
      	* src/eval.c (invalidate_refs) : Use cell_set_expr_unsafe.
      	* src/sheet.c (sheet_set_zoom_factor) : Depending on the order of
      	  initialization we may also need to render some unrendered values.
    • 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
      	* 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.
  28. 03 May, 2000 2 commits
    • Jody Goldberg's avatar
      Fix leak morten found. · 43002eb0
      Jody Goldberg authored
      Fix leak morten found.
      2000-05-03  Jody Goldberg <jgoldberg@home.com>
      	* src/cell.c (cell_set_array_formula) : Add some invariants to catch
      	  inverted arrays.  The function should use the supplier's
      	  reference.  It should not re-reference the supplied expression.
      	  Document this.
    • Jody Goldberg's avatar
      Begin to rationalize support for inverted and 3D references. · de62dd3a
      Jody Goldberg authored
      More renaming and movement name rationalization.
      Some minor improvements in the function wizard.
      2000-05-03  Jody Goldberg <jgoldberg@home.com>
      	* EvalPosition -> EvalPos
      	  ParsePosition -> ParsePos
      	  new struct RangeRef used in ValueRange
      	  eval_pos_init* -> position.[ch]
      	* src/workbook.c : Reorder the toolbar a bit.
      	(workbook_foreach_cell_in_range) : New function.
      	(cb_autofunction) : New routine.
      	(workbook_set_auto_expr) : DO NOT put real code into pre/post
      	  conditions.  It will be removed when debugging is eventually
      	* src/position.c (range_ref_normalize) : New function.
      	* src/ranges.c (range_normalize) : New function.
      	* src/expr.c (expr_implicit_intersection) : Use range_ref_normalize.
      	* src/eval.c (cell_eval_content) : No need to release the value.
      	  cell_assign_value already does that.
      	(dependency_range_ctor) : Use range_normalize.
      	* src/auto-format.c (do_af_suggest) : Use workbook_foreach_cell_in_range.
      	* src/cell.c (cell_set_expr_and_value) : link the new expression but
      	  do not queue it for recalc.
      	(cell_assign_value) : Release the old value.
      	(cell_copy) : Init the value to empty.
      	* src/func.c (function_iterate_do_value) : Use
      	* src/dialogs/dialog-function-wizard.c (create_description) : Use
      	  a label rather than a text entry widget.  It looks better.
      	* src/functions/fn-string.c (gnumeric_expression) : range is already
      	* src/functions/fn-stat.c (gnumeric_linest) : Handle inverted ranges.
      	(gnumeric_logest) : Ditto.
      	* src/functions/fn-information.c (gnumeric_countblank) : Use
      	(gnumeric_{row,column}) : Handle inversions.
      	* src/functions/fn-lookup.c (gnumeric_offset) : No need to make
      	  absolute.  The marshaller already did that.
      2000-05-02  Jody Goldberg <jgoldberg@home.com>
      	* src/eval.c (dependency_range_ctor) : normalize the range.
      	* src/xml-io.c (xml_write_cell_and_position) : Suppress warning.
      	* src/pixmaps.h : Add function wizard and equal sign.
  29. 01 May, 2000 1 commit
    • Jody Goldberg's avatar
      ExprName -> NamedExpression ArrayRef -> ExprArray · 8d168628
      Jody Goldberg authored
      2000-05-01  Jody Goldberg <jgoldberg@home.com>
      	* ExprName -> NamedExpression
      	  ArrayRef -> ExprArray
      	change ExprTree to be a union of similar types and split
      	the elements into discrete types.
      	    expr->oper -> expr->any.oper
      2000-04-29  Jody Goldberg <jgoldberg@home.com>
      	* src/value.c (value_new_empty) : Don't allocate any memory.
      	(value_release) : Don't free any either.
      	* src/sheet-style.c (border_check) : Init outer_style to remove a
  30. 29 Apr, 2000 2 commits
  31. 27 Apr, 2000 2 commits
    • Jody Goldberg's avatar
      Do redraws respans, and redimensions here. · a92f62cc
      Jody Goldberg authored
      2000-04-27  Jody Goldberg <jgoldberg@home.com>
      	* src/workbook-format-toolbar.c (modify_cell_region) : Do redraws
      	  respans, and redimensions here.
      	* src/cell.c (cell_set_format) : Do not attempt to render or redraw
      	  the value.
    • Jody Goldberg's avatar
      Batch of quickies. · 27d8d83b
      Jody Goldberg authored
      2000-04-26  Jody Goldberg <jgoldberg@home.com>
      	* src/gnumeric-sheet.c (start_cell_selection_at) : Only hide the
      	  primary cursor when selecting cells on a different sheet.
      	* src/expr.c (eval_expr_real) : Pass EVAL_PERMIT_NON_SCALAR to
      	  eval_expr_real when evaluating an array.
      	* src/cell.c (cell_set_array_formula) : typo.
      	* src/sheet.c (sheet_find_boundary_{horizontal,vertical}) : Another thinko.
  32. 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
      	(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_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
      	(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
      	(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
      	* 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
      	* 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
      	(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
      	(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.