1. 29 Sep, 1998 1 commit
    • Miguel de Icaza's avatar
      New: · f4929ca6
      Miguel de Icaza authored
      
      
      New:
      
      	- 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).
      
      Miguel.
      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.
      f4929ca6
  2. 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
      	created).
      
      	* 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.
      ae3dda69
  3. 23 Sep, 1998 2 commits
  4. 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
      	evaluated.
      
      	* 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
      70717960
  5. 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.
      f8ea4ab6
  6. 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.
      
      Todo:
      
      	Lists of known strings and strings with numbers embedded
      
      Miguel.
      ef0634ee
  7. 26 Aug, 1998 1 commit
    • Arturo Espinosa's avatar
      Today: · 061a1e74
      Arturo Espinosa authored
      
      
      Today:
      
      	- 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.
      
      Miguel.
      061a1e74
  8. 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.
      
      Miguel.
      
      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
      e32cdefe
  9. 18 Aug, 1998 1 commit
    • Miguel de Icaza's avatar
      Today: · 8df6dcc8
      Miguel de Icaza authored
      
      
      Today:
      
      	- Cell format dialog box + working number formats.
      
      Miguel.
      
      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
      	Sheet.
      	(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
      	cell.
      
      	* 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.
      8df6dcc8
  10. 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.
      
      Miguel.
      c3a522d6
  11. 14 Aug, 1998 1 commit
  12. 13 Aug, 1998 1 commit
  13. 12 Aug, 1998 1 commit
  14. 11 Aug, 1998 1 commit
  15. 10 Aug, 1998 1 commit
  16. 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.
      d2c3b2ba
  17. 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
      count.
      
      Miguel.
      53e25dd4
    • 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.
      
      Miguel.
      c875c8db
  18. 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.
      
      Miguel
      b261e986
  19. 05 Aug, 1998 3 commits
  20. 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
      	sync.
      	(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.
      69def31c
  21. 24 Jul, 1998 2 commits
  22. 23 Jul, 1998 2 commits
  23. 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
      	double/int.
      
      	* 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
      	changed.
      
      	* src/item-grid.c (item_grid_draw_cell): Fix the computation for
      	right indentation.
      ef28d5f2
  24. 20 Jul, 1998 1 commit