1. 28 Nov, 1998 1 commit
    • Miguel de Icaza's avatar
      OH MY GOD! This has been on my laptop for AGES! and it never went into CVS. What a dork I am · 11be5291
      Miguel de Icaza authored
      So, here it is:
      1998-11-13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/sheet-autofill.c (autofill_cell): Simplify by using
      	* src/expr.c (expr_parse_string): Take a sheet argument
      	(expr_decode_tree): Same
      	* sheet.c (cellref_name): Now takes a sheet argument and decodes the
      	cellref depending on the sheet.
      	* cell.c (CellRef): Now they include the sheet location.
  2. 28 Oct, 1998 1 commit
    • Miguel de Icaza's avatar
      Use extra argument. · 4443c9f4
      Miguel de Icaza authored
      1998-10-27  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/parser.c (dump_tree): Use extra argument.
      	* src/expr.c (function_call_with_values): Use the extra argument
      	to symbol_lookup
      	* src/func.c (constants_init): Use the extra argument to symbol_install.
      	* src/main.c (main): Invoke global_symbol_init.
      	* src/symbol.h: Symbol routines now take an extra argument; the
      	symboltable they work on.  Now the code can have multiple symbol
      	tables (this is required for the cell range name bindings in a
      	per-sheet fashion.
  3. 14 Oct, 1998 1 commit
  4. 02 Oct, 1998 1 commit
    • Miguel de Icaza's avatar
      Removed unused variables · e5d027e2
      Miguel de Icaza authored
      1998-10-01  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/item-grid.c (item_grid_event): Removed unused variables
      	* src/gnumeric-sheet.c (gnumeric_sheet_start_cell_selection,
      	gnumeric_sheet_selection_cursor_place): New routines for letting
      	the user use the mouse to select a cell range.  Invoked from
      	* src/item-grid.c (item_grid_event): Clean and reorgranize the
      	event handler, remove unused variables.
      	* src/gnumeric-sheet.c (selection_expand_horizontal): -1 now means
      	"shrink the selection", which means Left/Up keys shrink.
      	Right/Down expand.
      	(selection_expand_vertical): likewise.
      	* src/format.c (format_number): Fixed memory leak: this is a
      	pretty bad construction: g_string_append (s, alloc_string()).  I
      	just did not see it coming.  Taking metal note of this.
      	* src/number-match.c (format_create_regexp): Fixed memory leaks.
      	The strings returned by create_option_list need to be released.
      	* src/style.c (style_color_new): Important bug fix:  The key I was
      	passing was a GdkColor, but our hash table stored StyleColors
      	* src/format.c (append_year): Better fix, suggested by Morten
      	Welinder <terra@diku.dk>
  5. 29 Sep, 1998 3 commits
    • Arturo Espinosa's avatar
    • Miguel de Icaza's avatar
      Changed the formatting of it to be like the rest of Gnumeric. · ef54b95e
      Miguel de Icaza authored
      1998-09-29  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/xml-io.c: Changed the formatting of it to be like the rest
      	of Gnumeric.
      	* src/fn-math.c, src/fn-date.c: Simplify routines to use
      	value_float and value_int.
      	* src/expr.c (value_float, value_int): New utility functions to
      	create values of type integer and float.
      	* src/sheet.c (sheet_set_text): Use the matching engine on entered text
      	* src/cell.c (cell_set_text_simple): New function.  Does not queue
      	cell computations nor queue any redraws
      	(cell_content_changed): New function: Queues recomputations for
      	cells that depend on the contents of the argument.
      	(cell_set_format_simple): New routine, like cell_set_format but
      	does not render the value nor queues a redraw.
      	* src/xml-io.c: Use workbook_recalc_all instead of workbook_recalc
      	* src/fn-math.c (gnumeric_log10, gnumeric_log, gnumeric_log2):
      	Range check fix was wrong.  The valid range does not include
      	zero.  Thanks to Morten Welinder for noticing this.
      	(gnumeric_cosh): Call cosh, not cos.
      	Reordered this file to have the help always before the function
      	that defines it.
      	(callback_function_or): Bug fix: any non-zero value is considered
      	to be TRUE.
      	(gnumeric_fact): Use exp (lgamma (n+1)) to compute large
      	factorials (this only applies to factorials over 40).
      	* src/about.c (dialog_about): Stop using gnome_dialog_set_modal.
    • Miguel de Icaza's avatar
      New: · f4929ca6
      Miguel de Icaza authored
      	- Excel-like magic on strings works.  This means that everytime
      	  a string appears in an expression, it will be tried to match
      	  against all of the stock formating codes in Gnumeric to see
      	  if there is a match (basically, the inverse to format.c).
      	  If there is one, then the input is converted to a float using
      	  the format rules and the format for the cell is set to the
      	  matching format.
      	  This basically means, you can do stuff like:
      		="1/1/1997"+200 and get "7/20/1997"
      	  It also works for hours and also lets you input in your own
      	  language (if the locale provides proper translation), ie,
      	  you can input:
      		="15 pesos" + 10
      	  And get the result.
      	- Made another autogen.sh hack to shutup the noisy libtool during
      	  final link stage.
      	- Abbreviated months and days now include an asterisk at the
      	  beginning to let translators provide unambiguated strings
      	  (like, may->may).
      Full ChangeLogs:
      1998-09-29  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/fn-date.c (gnumeric_now, gnumeric_date, gnumeric_today):
      	Note that jannuary 1st is day 1, not day zero.
      	* src/format.c (append_month): Fixed handling: tm_mon is zero based.
      	(split_time): Fixed silly mistake I did last time I looked at this code
      	* src/cell.c (cell_set_formula): Try to set the cell style if the
      	style is General.
      	* src/parser.y (return_symbol): Try to match the input with the
      	format matching engine.
      	* autogen.sh (PKG_NAME): Another hack to get rid of the annoying
      	extracing symbols list, which, slows down my link time :-)
      1998-09-28  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/number-match.c (compute_value): New file:  Implements a
      	smart way of parsing numbers:  From all of the registered formats,
      	it creates regexps for matching at the time the user inputs data.
      	If that data matches any of the regexps, then the input is
      	converted into a float, and a display format is assigned to it.
      	* src/format.c (append_day, append_month): Skip the -now included-
      	start at the begining for internationalization purposes.
      	(split_time): Fixed the hour and second renddering.
      	(format_number): Fix:  hour_seen was not being set.
      	* src/sheet-autofill.c (matches_list): Allow the lists to include
      	an asterisk to be able to distinguish between abbreviations and
      	full descriptions.
  6. 28 Sep, 1998 1 commit
    • Miguel de Icaza's avatar
      Check the return value from symbol_lookup. · ae3dda69
      Miguel de Icaza authored
      1998-09-27  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/expr.c (function_call_with_values): Check the return value
      	from symbol_lookup.
      1998-09-26  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/sheet-object.c (sheet_view_object_realize): Swap coordinates
      	before passing to the canvas item.
      	* plugins/python/python.c (init_plugin): Use the system
      	installation directory to load the python scripts.
      	* autogen.sh: Hack to make libtool add library dependcy
      	information (it modifies the libtool file after it has been
      	* src/workbook.c (workbook_set_filename): New routine to set the
      	filename being edited of the workbook.
      	* src/sheet-object.c (create_object): Swap arguments to the
      	ellipse object to guarrantee we pass valid information.
      	* src/render-ascii.c (cell_region_render_ascii): Ok, remove the
      	leaks now.
  7. 23 Sep, 1998 2 commits
  8. 21 Sep, 1998 1 commit
    • Miguel de Icaza's avatar
      When decoding a tree, include the argument separator. Also, loop properly · 70717960
      Miguel de Icaza authored
      1998-09-21  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/expr.c (do_expr_decode_tree): When decoding a tree, include
      	the argument separator.  Also, loop properly trough the arguments
      	being decoded.
      	(function_call_with_values, function_def_call_with_values): New
      	functions: these ones are for the plugins so that a plugin can
      	invoke other functions in Gnumeric.
      	* src/fn-date.c (gnumeric_now): The serial number returned by
      	NOW() should be relative to 1900/1/1, not year zero.
      1998-09-20  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/expr.c (eval_expr): Fix the way we computed expressions.
      	* src/eval.c (cell_eval): Maintain a CELL_ERROR flag to know if
      	the value is NULL due to an error or to the cell not being
      	* src/expr.c (funcion_call_with_values): Add a routine to allow
      	plugins to call other functions defined in Gnumeric.
      	* src/style.c: Handle the pattern property of the styles.
      	* src/style.h: Pattern style is now just a 4 bit quantity, instead
      	of a RefCounted structure.
      	* src/plugin.c: Include gnumeric-util.h
  9. 18 Sep, 1998 1 commit
    • Miguel de Icaza's avatar
      If there is a selection of columns or rows, change the sizes of all of the · f8ea4ab6
      Miguel de Icaza authored
      1998-09-17  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/sheet-view.c (sheet_view_row_size_changed,
      	sheet_view_col_size_changed): If there is a selection of columns
      	or rows, change the sizes of all of the columns.
      	* src/sheet.c (sheet_row_get_distance, sheet_col_get_distance):
      	optimized to be O(n) instead of O(n^2) using
      	(col_row_distance): new routine to compute distances.
      	* src/sheet-view.c (sheet_view_redraw_cell_region): Add the
      	scrolling offset to the x and y positions to draw properly
      	* src/xml-io.c (readXmlSheet): Call sheet_set_zoom_factor to
      	initialize the ->pixels field.
  10. 16 Sep, 1998 1 commit
    • Arturo Espinosa's avatar
      Autofill lists work: · ef0634ee
      Arturo Espinosa authored
      Autofill lists work:
      	Integers, Floats, Formulas and constant strings works.
      	Lists of known strings and strings with numbers embedded
  11. 26 Aug, 1998 1 commit
    • Arturo Espinosa's avatar
      Today: · 061a1e74
      Arturo Espinosa authored
      	- Column delete and Row delete work.  Bindings all over the
      	  place are working (context menus, menus, etc).
      	- Made scrollbars usable and include a tooltip-like thing
      	  like Excel does.
      	  They still are kind of inacurrate, and I just figured
      	  out a terrible design mistake that will be fixed tomorrow
      	  (it is kind of big).
      	- Various bug fixes to little things I had overlooked in
      	  cell insert/shift routines.
  12. 20 Aug, 1998 1 commit
    • Miguel de Icaza's avatar
      New value format framework installed. · e32cdefe
      Miguel de Icaza authored
      New value format framework installed.
      The idea is that we will precompile formats to avoid parsing the
      format everytime a cell is repainted.
      1998-08-19  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/format.c (format_value): The new entry point for formating
      	values.  This takes a Value instead of a float.
      	NULL is never returned from format_value now: if there is a format
      	error, then value_string is used to display it.
      	(format_compile): This routine should always return, it cant fail,
      	in the worst * case it should just downgrade to simplistic formatting.
      	(format_destroy): This routine is invoked when the last user of
      	the format is gone (ie, refcount has reached zero) just before the
      	StyleFormat structure is actually released.  resources allocated
      	in format_compile should be disposed here
  13. 18 Aug, 1998 1 commit
    • Miguel de Icaza's avatar
      Today: · 8df6dcc8
      Miguel de Icaza authored
      	- Cell format dialog box + working number formats.
      1998-08-17  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/eval.c (cell_eval): Use the formating routine now.
      	* src/expr.c (value_format): Format a Value with a StyleFormat.
      	* src/item-cursor.c (item_cursor_set_bounds_visibly): Force a
      	canvas update after moving the selection.
      	* src/sheet.c (sheet_selection_to_list): New function: generates a
      	list of cells from the sheet->selections list.
      	* src/style.c: Now styles have a "valid_flag" that has a bit
      	turned on for those parts of the style that are actually used.
      	This is required for adding the regions of style application in a
      	(style_destroy): destroy only those valid parts in a style.
      	* src/dialog-cell-format.c: New file.   Implements the cell/format
      	dialog box.
      	* src/cell.c (cell_render_value): new routine used to render the
      	cell->value into cell->text.
      	(cell_queue_redraw): new routine to queue individual redraws of
      	the screen.  I believe it is buggy, as the screen does not update
      	after an apply in the cell/format dialog box.
      	(cell_set_format): New routine to change the format of an existing
      	* src/format.c (format_number): Added color argument;  smaller
      	fixes to use it within gnumeric.
      	* src/main.c (main): Include i18n setup as per namsh's suggetion.
  14. 15 Aug, 1998 1 commit
    • Arturo Espinosa's avatar
      Various little fixes here and there: · c3a522d6
      Arturo Espinosa authored
      Various little fixes here and there:
      	- Basic support for dragging the selection is in (still does
      	  not do anything, will do the action binding later).
      	- Fixes to the cell-selection-code-when-you-type-a-formula code
      	- ExprTrees are now properly refcounted (instead of only
      	  refcounting the root node).  This is required for the
      	  Paste special/with-arithmetic operation feature.
      	- Expression decoding (for pasting a formula with relative
      	  references) now takes into account operator precedence to
      	  avoid cluttering the pasted expression with extra paretheses.
      	Other smallish fixes which I forget now.
  15. 14 Aug, 1998 1 commit
  16. 13 Aug, 1998 1 commit
  17. 12 Aug, 1998 1 commit
  18. 11 Aug, 1998 1 commit
  19. 10 Aug, 1998 1 commit
  20. 08 Aug, 1998 1 commit
    • Arturo Espinosa's avatar
      It autocalcs! · d2c3b2ba
      Arturo Espinosa authored
      It autocalcs!
      My technique is incredibly cool!  The engine should support
      most excel features for recursive computations (we just need
      the dialog boxes now).
      It still has a wierdo crash from a mismatched string ref/unref
      but that is going to be trivial to fix.
      Next step:  Functions in Perl.
  21. 07 Aug, 1998 2 commits
    • Arturo Espinosa's avatar
      More GNOME vaporware code. · 53e25dd4
      Arturo Espinosa authored
      More GNOME vaporware code.
      I am actually commiting empty files, just to increase our line
    • Arturo Espinosa's avatar
      Lots of work as usual :-) · c875c8db
      Arturo Espinosa authored
      Lots of work as usual :-)
      Cell lookup is still broken.
      More functions!  COUNT, AVERAGE, AND, OR.
      Changed the function framework: it is now easier to write
      functions that take multiple arguments.
      Added some documentation on writing functions.
  22. 06 Aug, 1998 1 commit
    • Arturo Espinosa's avatar
      Lots of things today: · b261e986
      Arturo Espinosa authored
      Lots of things today:
      - New functions implemented:
      	SELECTION(),  SUM(),  IF()
      - Autocompute of an expression that applies to the selection.
      - Added comparission to the expression grammar.
      - Added array values.
      Bug fixes as usual and lots other thingies I forget.
  23. 05 Aug, 1998 3 commits
  24. 30 Jul, 1998 1 commit
    • 0's avatar
      Free the record that tracks the allocation records. (alloc_clean): Handle · 69def31c
      0 authored
      1998-07-30    <miguel@nuclecu.unam.mx>
      	* src/parser.y (alloc_clean): Free the record that tracks the
      	allocation records.
      	(alloc_clean): Handle Strings.
      	(alloc_list_free): New function: cleans up the allocation list.
      	* src/gnumeric-sheet.c (gnumeric_sheet_load_cell_val): Fix to use
      	the new Strings.
      	* src/cell.h: Use the new Strings instead of the Symbols.  That
      	was just a stupid idea.
      	* src/str.c (string_ref): New file:  Implements string sharing.
      	* src/symbol.c (symbol_install): Use our copy of the allocated key
      	when installing the symbol.
      1998-07-29    <miguel@nuclecu.unam.mx>
      	* src/symbol.c (symbol_unref_ptr): New function that does symbol
      	unreferencing and if the reference count reaches zero, it also
      	sets the value pointed to NULL.
      	* src/sheet.c (cell_set_text): Release evaluation tree after
      	entering new contents in a cell.
      	* src/sheet.h (Cell): We now keep all of the character information
      	as refcounted Symbols.
      	* src/expr.c (eval_node_release): Renamed and made static.  New
      	allocation strategy: EvalTree's top node are now refcounted to
      	simplify cell duplication.
      	(eval_expr): Now it takes column and row arguments for evaluating
      	the expression in that context.
      	(expr_parse_string): Same.
      	* src/parser.y: Renamed EvalNode to EvalTree.
      	(return_cellref): CellRefs now contain offsets relative to the
      	current column/row if the references are not absolute.
      	* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Use new
      	helper routines for doing the scrolling.  Scroll vertically.
      	(gnumeric_sheet_set_top_row, gnumeric_sheet_set_top_col): New
      	routines for keeping the contents of the canvas and the bars in
      	(gnumeric_sheet_new): Take the ItemBars for the columns and rows
      	as a parameter now.
      	* src/sheet.c (sheet_select_all): New routine: select the complete spreadsheet.
      	* src/item-bar.c (item_bar_class_init): Signal now takes an extra
      	argument which indicates the beginning of a column selection.
      	* src/sheet.c (sheet_selection_col_extend_to,
      	sheet_selection_row_extend_to): New methods for implementing the
      	extending column and row selection.
      	(sheet_row_selection_changed, sheet_col_selection_changed): Now
      	they use the new parameter to start the selection.
  25. 24 Jul, 1998 2 commits
  26. 23 Jul, 1998 2 commits
  27. 22 Jul, 1998 1 commit
    • Miguel de Icaza's avatar
      Numbers are parsed correctly. Bits of Oleo number parsing plugged in. · ef28d5f2
      Miguel de Icaza authored
      1998-07-21  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/parser.y (yylex): Numbers are parsed correctly.  Bits of
      	Oleo number parsing plugged in.
      	* src/util.c, src/util.h: New files with assorted number utilities.
      	* src/numbers.h: New file: takes care of using gmp or regular
      	* src/expr.c (eval_release_node): Implement.
      	(eval_release_value): New function.
      	* src/sheet.c (sheet_col_selection_changed,
      	sheet_row_selection_changed): Implement.
      	(sheet_selection_clear, sheet_selection_clear_only): Splitted
      	functionality into two routines.
      	(sheet_selection_clear_only): Remove any marks from the bars.
      	(sheet_row_set_selection, sheet_col_set_selection): Implement.
      	* src/item-bar.c (is_pointer_on_division): Return the column
      	* src/item-grid.c (item_grid_draw_cell): Fix the computation for
      	right indentation.
  28. 20 Jul, 1998 1 commit