1. 26 Jun, 1999 1 commit
    • Miguel de Icaza's avatar
      The big GNUMERIC_PRINT merge into HEAD. · a5e65a30
      Miguel de Icaza authored
      The big GNUMERIC_PRINT merge into HEAD.
      Still some features are missing.  Check the TODO to see what is
      1999-06-26  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/pixmaps.h: Removed unused pixmaps.
      	* src/corba-sheet.c (Sheet_corba_class_init): Fill in some missing
      	values fomr the GNOME::Gnumeric::Sheet epv interface.
      	* src/expr.c (eval_funcall): Removed unused variable.
      	* src/workbook.c (workbook_sheets): prepend and reverse instead of
      	appending all the time.  It is more efficient.
      	* src/style.c (x11_font_compute_hints): Renamed as well.  Might be
      	useful in the future.
      	* src/gnumeric-util.c (x11_font_get_italic_name,
      	x11_font_get_bold_name, x11_font_change_component): Renamed these
      	functions to reflect their actual usage.
      	* src/expr.c (expr_tree_new_constant): Change style to use early
      	return to keep indentation of the rest of the code at tab-1.  This
      	is a trick to keep indentation nice with 8-tab spaces.  Liberal
      	use of early returns, early continues, early breaks.
      	* src/cell.h (CELL_TEXT_GET): Kill unused macro.
      1999-06-25  Miguel de Icaza  <miguel@gnu.org>
      	* src/xml-io.c (xml_read_cell): Merge the style we just read with
      	the existing information from the cell (which are the defaults).
      	This is only for compatibility with the old format
      1999-06-24  Miguel de Icaza  <miguel@gnu.org>
      	* src/xml-io.c (style_font_new_from_x11): Implemented
      	* src/style.c (style_font_new): Improved matching of the font.
      	* src/xml-io.c 	(xml_write_style): Save Bold and Italic
      	properties.  Save Units as double.
      	(xml_read_style): Add conversion hook from old format.
      	(xml_read_style): Load properly italic and bold properties.
      	(xml_read_cell): Add new style reading code.  It is
      	compatible with the old Style reading code.
      	(xml_read_rows_info, xml_read_cols_info, xml_read_styles): Moved
      	Cols, Rows and Styles loading code here, for code clarity.
      	* src/style.c (style_font_new_simple): Include the scale in the
      	key lookup variable.
      	* src/xml-io.c: The FontDefs and the HREFs to the fonts were never
      	being used.  The new code for styles simplifies this.  Kill all
      	the references to the FontDefs urls and the font indeces.
      	* src/xml-io.c
      1999-06-23  Miguel de Icaza  <miguel@gnu.org>
      	* src/xml-io.c: Major updates.
      	(xml_read_colrow_info): Use floating point for loading the
      	units, margin_a and margin_b.
      	(xml_write_colrow_info): Save units, margin_a and margin_b using
      	floating point.
      	(xml_set_value_double): Activate this function.
      	(xml_write_cell): Do not save the style here.  Lookup the style
      	id, and write a record with the style id link.
      	(xml_sheet_write): Add call to xml_cell_styles_init and
      	xml_cell_styles_shutdown to init and shutdown the cell styles in a
      	per-sheet basis.
      	Renamed functions to suit the gnumeric coding
      	sytle.  Fixed indentation.
      	File format now saves a different version.  We store all cell
      	styles first, and then we reference them.
      	(parse_xml_context_t): renamed from
      	parseXmlContext.  Add style_table hash table for storing all the
      	styles used by the cells on a workbook.  Used to dump Styles first
      	and then have the cells reference it.
      	* src/style.c (style_hash, style_compare): New routines to
      	put Styles on hash tables.
      	* src/workbook.c (workbook_sheets): Use g_list_prepend instead of
      	g_list_append and reverse the result.
      1999-06-14  Miguel de Icaza  <miguel@gnu.org>
      	* src/cell.h: Killed ColType and RowType definitions.  They do not
      	save any noticeable amount of memory; we are not using them but
      	on the most useless places and finally they are the current limit
      	to our spreadsheet size.
      	* src/gnumeric-sheet.h: Use int instead of ColType, RowType
      	* src/item-cursor.h: Use int instead of ColType, RowType
      	* src/item-grid.h: Use int instead of ColType, RowType
      	* src/print-cell.c (CELL_DIM): Use _pt variants of the margins here.
      	(print_cell_text): and here.
      	(print_cell): and here.
      	(print_cell_range): and here.
      	(print_cell_grid): and here.
      1999-06-13  Miguel de Icaza  <miguel@gnu.org>
      	* src/sheet.c (sheet_compute_col_row_new_size): Update margin_a
      	and margin_b from the points.
      	(col_row_info_init): New function to initialize a sample
      	ColRowInfo.  Inits the _pt fields.
      	(col_row_unit_distance): Use the new fields in computation.
      	(sheet_col_get_unit_distance): Use new fields in computation.
      	* src/dialog-printer-setup.c (do_setup_margin): Set scroll region.
      	(preview_page_create): Implement routine that draws the page for
      	the margin setup.
      	* src/sheet.h (ColRowInfo): Units are now doubles; margin_a_pt and
      	margin_b_pt are doubles that represent the a and b margins in
      	* src/sheet.c (sheet_compute_col_row_new_size): Use the
      1999-06-11  Miguel de Icaza  <miguel@gnu.org>
      	* src/cell-draw.c (cell_draw): Move the foreground setting routine
      	here and handle single-line and multiline coloring properly.
      	* src/print-info.c (unit_name_to_unit): New routine, returns the
      	UniName from the string name.
      	* src/dialog-printer-setup.c (dialog_printer_setup): Use
      	print_info_save and kill the do_save_settings routine for the
      	cleaner print_info routine.
      	* src/print-info.c (print_info_new): Now loads the default
      	settings from the saved configuration.
      	(print_info_save): Saves the print information to the gnome_config.
      1999-06-08  Miguel de Icaza  <miguel@gnu.org>
      	* src/utils.c (str_trim_spaces): Moved str_trim_spaces ere.
      	* src/dialog-printer-setup.c (do_setup_main_dialog): Connect print
      	* src/print-cell.c (print_cell_grid): Simplify routine.
      	* src/sheet.c (sheet_row_get_unit_distance,
      	sheet_col_get_unit_distance): Include  margins in computation.
      	This is broken, as the margins are now pixels, and they should be
      	made points.
      	* src/dialog-printer-setup.c (do_fetch_page_info): Fetch other values.
      	(do_save_settings): Saves the configuration.
      	* src/print-cell.c (print_border): Implement border drawing.
      	(print_cell_grid): Make this work as it should.
      	* src/print.c (compute_groups): Handle the case where the contents
      	fit entirely in one page.
      1999-06-07  Miguel de Icaza  <miguel@gnu.org>
      	* src/print.c: New file.  Implements high-level printing.
      	* src/dialog-printer-setup.c: New file.  Implements the "Print
      	Setup" dialog box.
      1999-04-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/cell-draw.c: New file.  All of the cell screen drawing code
      	has been moved here now.
      	* src/print-cell.c: Enhanced code.
      	* src/workbook.c: hardcoded page size for testing purposes.
      1999-03-10  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	I do not like the current approach.  I do think that StyleFonts
      	should be static with regard to Zoom.
      	And we would keep a cache of X fonts that are used for a
      	particular size.
      	* src/style.c (style_font_new_from): New routine that creates a
      	new font.
      	* src/sheet.c (sheet_set_zoom_factor): Scale fonts used in the
      1999-02-15  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/dialog-printer-setup.c: New file.  Implements the workbook
      	page configuration dialog box.
      	* src/print-info.c, src/print-info.h: Manages the per-worbook
      	print options.
      1999-02-07  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/style.c (font_equal): Adapt function to the new StyleFont.
      	(style_font_new, style_font_new_simple): Adapt for the upcoming
      	gnome-print support.
      	(font_init): Adapt.
      	* src/xml-io.c: Use Gnome Print font scheme.
      	* src/workbook.c: ditto.
      	* src/cell.c: ditto.
      	* src/item-bar.c, src/item-edit.c: ditto
      	* src/dialog-cell-format.c: Disable font selector for now.
  2. 24 Jun, 1999 1 commit
  3. 23 Jun, 1999 1 commit
  4. 08 Jun, 1999 1 commit
  5. 03 Jun, 1999 1 commit
  6. 26 May, 1999 1 commit
  7. 22 May, 1999 1 commit
  8. 15 May, 1999 1 commit
  9. 12 May, 1999 1 commit
  10. 07 May, 1999 1 commit
  11. 04 May, 1999 1 commit
  12. 03 May, 1999 1 commit
  13. 26 Apr, 1999 1 commit
    • Miguel de Icaza's avatar
      New files that keep track of the construction of the graphic process. · cdf033b3
      Miguel de Icaza authored
      1999-04-26  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* graphic-context.[ch]: New files that keep track of the
      	construction of the graphic process.
      	* graphics.glade: Renamed some widgets I need to manipulate.
      1999-04-26  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/eval.c (intersects): Typo fix.  Sheet was being assigned
      	instead of being tested for equality.  This got Michael to crash
      	Gnumeric (as there was no test for can_remove)
      1999-04-26  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* ms-excel.c (ms_excel_workbook_detach): Check the return value of
      	(ms_excel_read_sheet): If detaching fails, there is a dependency.
  14. 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
      	(pick_next_cell_from_queue): Clear the cell's
      	(cell_unqueue_from_recalc): New routine to remove a cell queued
      	for recomputation.
      	* src/clipboard.c (new_node): Trim leading spaces.
  15. 13 Apr, 1999 1 commit
  16. 11 Apr, 1999 2 commits
  17. 07 Apr, 1999 1 commit
    • Miguel de Icaza's avatar
      Enable the function wizard only if the --debug flag was passed. · 5efadaf1
      Miguel de Icaza authored
      1999-04-06  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/workbook.c: Enable the function wizard only if the --debug
      	flag was passed.
      	* src/dialog-function-wizard.c, src/dialog-function-select.c:
      	Adapt to the rest of Gnumeric coding style.
      	Use a different way of creating the GUI and controlling the
      	* src/func.c, src/func.h (function_iterate_do_value): Use my
      	indentation and coding style here.
      	* src/dialog-cell-format.c (render_formated_version): Handle the
      	case where the value might be NULL.
  18. 27 Mar, 1999 1 commit
  19. 10 Feb, 1999 1 commit
  20. 11 Jan, 1999 1 commit
    • Miguel de Icaza's avatar
      Use 0.0########## instead. Looks saner. · c46a2f59
      Miguel de Icaza authored
      1999-01-10  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/format.c (format_value): Use 0.0########## instead.  Looks saner.
      1999-01-10  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/workbook.c (change_auto_expr_menu): Use the event->button
      	field to get the popup menu to behave correctly.
      	(workbook_setup_auto_calc): Put the information display inside a
      	* src/item-bar.c (set_cursor): This routine can be invoked before
      	we are realized.
      	* src/workbook.c (sheet_label_button_press): We need to do the
      	page flipping ourselves, as the GtkNotebook wont take events if
      	they are not for a window it knows about.
      	* src/widget-editable-label.c (el_button_press_event): Forward
      	events to parent.
      	* src/parser.y: New non-terminal "cellref".  Make this
      	non-terminal include CELLREF and SHEETREF!CELLREF constructions.
      	* src/expr.c: Changed the whole module according to the dropping
      	of VALUE_CELLREF.
      	* src/expr.h: VALUE_CELLREF did not make much sense.  Better add
      	to the ExprTree union a CellRef field specifically for OPER_VAR
  21. 10 Jan, 1999 1 commit
    • Miguel de Icaza's avatar
      Reorganization. Hanlde VALUE_CELLREF here and make OPER_VAR and · 910cc0b7
      Miguel de Icaza authored
      1999-01-10  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/eval.c (add_value_deps): Reorganization.  Hanlde
      	VALUE_CELLREF here and make OPER_VAR and OPER_CONSTANT call
      	* src/expr.c (do_expr_tree_relocate, expr_tree_relocate): New
      	routine that returns an ExprTree relocated.
      	(value_copy_to): Handle the VALUE_CELLREF type.
      	* src/expr.h: define VALUE_CELLREF
      	* src/parser.y (yylex): Type fix.
      	When creating values of type VALUE_CELLREF, set this value.
      1999-01-09  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/sheet.c (sheet_move_column): Update to new cell_relocate
      	(sheet_shift_row): ditto.
      	(sheet_insert_row): ditto.
      	(sheet_delete_row): ditto.
      	(sheet_shift_col): ditto.
      	* src/clipboard.c: Update to new cell_relocate semantics.
      	Remove the old GTK compatibility code.
      	* src/cell.c (cell_relocate): We do not need to reference this
      	This routine now takes delta-x and delta-y values for the
      	relocation, instead of absolute cordinates.  To implement the
      	proper semantics of cell movement that other spreadsheets implement
  22. 29 Sep, 1998 1 commit
  23. 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
  24. 19 Sep, 1998 1 commit
  25. 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
  26. 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.
  27. 22 Aug, 1998 1 commit
  28. 20 Aug, 1998 1 commit
    • Arturo Espinosa's avatar
      Change of strategy: · 352bf4dd
      Arturo Espinosa authored
      Change of strategy:
      	- We dont do "smart" autoformat of numbers and strings.
      	  That is what the "general" format is for.
  29. 19 Aug, 1998 1 commit
    • Miguel de Icaza's avatar
      Basically: · af81b693
      Miguel de Icaza authored
      	- auto-alignment on cells without style works.
      	- Clean ups (use the new cell_ routines).
      	- Couple of bug fixes.
      	- Figured that aligment code works better if you
      	  actually call the routine on the cell.
      1998-08-19  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      	* src/sheet.c (sheet_cursor_set): New function.  Use this instead
      	of the view-specific routine (gnumeric_cursor_set).
      	* src/gnumeric-sheet.c (gnumeric_sheet_can_move_cursor): ':' is a
      	valid separator for activating the cursor-cell selection mode.
      	* src/cell.c (cell_auto_align): New function.  This tries to
      	auto-align the cell contents depending on the value type.
      	* src/dialog-cell-format.c (cell_properties_apply): Create a
      	single style that is attached to a region and let each property
      	page fill the structure in.
      	(apply_align_format): Implement.  No wonder it was not working
      	last night.
      	(apply_number_formats): Fill the passed Style structure only.
      	Remove obsolete code.
      	* src/sheet.c (sheet_cell_new): New cells are born with auto-style
      	flag turned on.
      	* src/clipboard.c (paste_cell): Render the cell after computation
      	is finished.  Clean up the usage of the cell manipulation;  make
      	auto-style work on pasted cells.
      	* src/str.c (string_ref): Return the value referenced.
  30. 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.
  31. 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.
  32. 11 Aug, 1998 1 commit
  33. 10 Aug, 1998 1 commit
  34. 08 Aug, 1998 2 commits
    • 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.
    • Arturo Espinosa's avatar
      Today it probably does not compile, but I have to leave now. · 6b09bc61
      Arturo Espinosa authored
      Today it probably does not compile, but I have to leave now.
      This is basically the framework for getting computations working.
      My current approach is to register areas of interest for a cell.
      This is not perfect, but good enough:
      	The idea is to walk the expression tree and look for
      	cell references (cell references or ranges) and register
      	those areas of "interest" for a cell.
      	When a new text is entered into a cell, the "regions" of
      	interest list is checked and if a match is found, then
      	the cells on that region of interest are queued for
      Of course, I do not know yet how to handle the recursive references.
      One option is to keep a counter (that starts at zero) during
      recomputation, ie something like:
      eval_cell (Cell *cell)
      	if (cell->use_count > threshold)
      		return "Cycle too depth";
      	on value lookup:
      		eval_cell (cell);
  35. 04 Aug, 1998 1 commit