OChangeLog-2000-02-23 37.6 KB
Newer Older
1 2 3 4 5 6
1998-09-03  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/utils.c (int_get_from_range): Bug fix, we were not doing the
	range thing for the "big" case.  Thanks to Alan for finding this
	bug. 

Tristan Tarrant's avatar
Tristan Tarrant committed
7 8 9 10
1998-09-02  Tristan Tarrant  <ttarrant@etnoteam.it>

	* configure.in: Included it in ALL_LINGUAS

Arturo Espinosa's avatar
Arturo Espinosa committed
11 12
1998-09-02  Miguel de Icaza  <miguel@nuclecu.unam.mx>

13 14 15 16 17 18 19 20
	* src/cell.c (cell_set_alignment): Bug fix:  optimize only if
	auto_return is the same value that we have set

	* src/gnumeric-sheet.c: Define lots of cool patterns.  Where cool
	in this sentence is defined as 13 (to leave room for the solid
	pattern). 
	(gnumeric_sheet_realize): Create the pattern stipples here. 

21 22 23 24 25 26 27 28 29
	* src/file.c (workbook_save_as, workbook_save,
	dialog_query_load_file): New file, new routines to deal with file
	save and file load dialog boxes.

	* src/workbook.c: Improved our toolbar with new actions.

	* src/xml-io.c: Fixed the order in which parameters were passed to
	sheet_cell_get/sheet_cell_new

Arturo Espinosa's avatar
Arturo Espinosa committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
	* src/sheet.c (sheet_clear_region): Redraw the deleted region. 
	(sheet_clear_region_content): Same.
	(sheet_cell_remove): same.

	* src/sheet-view.c (sheet_view_redraw_cell_region): 

	* src/cell.c (cell_set_halign): New routine:  Only changes the
	Horizontal alignment of a cell.
	(cell_set_format, cell_set_text, cell_set_font_from_style,
	cell_set_halign, cell_set_alignment): Queue a redraw to a cell
	before making changes to the properties, to repaint correctly the
	regions it covers before the change.

	* src/workbook.c (center_cmd, left_align_cmd, right_align_cmd,
	set_selection_halign):  New routines used to bind the alignment
	commands from the toolbar.

	* src/sheet-view.c (sheet_view_redraw_cell_region): Silly mistake
	fix.  Last time I touched this routine i got too excited.  I
	should use *_col_get_distance only for numbers, not rows.

	My variables were badly named and I thus commmited a mistake, fix.

53 54 55 56 57 58 59 60 61 62 63 64
1998-09-01  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/dialog-cell-format.c (create_align_page): Added support for
	the "add returns automatically" formatting option. 

	* src/cell.c (cell_draw): Finished implementing my new drawing
	scheme.  It now supports all of the Excel 5.0 alignements.
	
	Added missing calls to cell_calc_dimensions in various spots. 

	* src/workbook.c: Added a toolbar with some actions.

65 66 67 68 69 70 71 72 73 74
1998-08-31  Tristan Tarrant  <ttarrant@etnoteam.it>

	* TODO: some ideas for key shortcuts (from Excel :-)

	* src/gnumeric-sheet.c (gnumeric_sheet_key): Implemented page up,
	page down and home keys. They don't work for selections at the moment.
	Implemented clear. It currently does a clear_all, but ideally it
	should pop-up a dialog asking the user what kind of clear he/she wants,
	as in Excel. Also clearing cells doesn't update the display.

75 76
1998-08-31  Miguel de Icaza  <miguel@nuclecu.unam.mx>

77 78 79 80
	* src/cell.c (cell_do_calc_dimensions): New routine that computes
	the dimenssions of a cell based on the alignement constraints of
	the cell. 

81 82 83 84 85 86 87 88 89 90
	* src/item-bar.c (item_bar_event): grab the focus when selecting
	as well. 

	* src/sheet-view.c (sheet_view_redraw_cell_region): Implemented
	correctly: we now use cell_get_span on every cell in the range to
	actually compute which areas need to be updated.

	* src/cell.c (cell_get_span): New routine.  Computes the number of
	columns spanned by a cell.

91 92 93 94 95
Sun Aug 30 17:19:02 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>

	* src/xml-io.c: added saving of the current workbook as one
	  file, added code to load the workbook. Some part are really
	  untested/incomplete especially the style support. 
96
	
97 98 99
	* src/main.c (main): added loading of "default.wb" on startup
	  i.e. the default workbook.

100 101 102 103 104 105 106
1998-08-29  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/item-bar.c (item_bar_get_line_points): New helper routine,
	used to create the position of the tracking line for the bar resizing.
	(item_bar_event, item_bar_start_resize): Fix the incremental
	tracking. 

107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
1998-08-28  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/sheet.c (sheet_row_set_internal_height): New routine used to
	change the heigh of a sheet.  Now we also keep a variable to see
	if the user has hardcoded the dimensions of the row.
	(sheet_compute_visible_ranges): New function to compute the
	visible ranges of the Sheets.

	* src/item-edit.c (item_edit_init): Init all values.
	(item_edit_set_arg): Set the child bounds
	(item_edit_draw): Use the style font for the current cell when
	drawing the cell.

	* src/dialog-cell-format.c (apply_font_format, create_font_page):
	New cell property configuration page: font selector.

	* src/cell.c (cell_set_font, cell_set_font_from_style): New
	routines to change a cell's font.
	

	* src/item-bar.c (item_bar_start_resize): Fix routine after the
	massive changes of yesterday.

130 131 132 133 134 135 136
1998-08-28  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/format.c (format_number): Rewrote the format parser.  I
	took Chris's number formatting routine and made it a
	number-rendering only thing to support the complexities of the
	Excel formating codes.

Arturo Espinosa's avatar
Today:  
Arturo Espinosa committed
137 138
1998-08-27  Miguel de Icaza  <miguel@nuclecu.unam.mx>

139 140 141 142 143 144
	* src/format.c (format_number): Add support for text quoting
	inside a format (double quotes and single character quotes); Add
	support for space skipping (_) and concatenation of the allowed
	characters. 
	Added color lookup.
	
Arturo Espinosa's avatar
Today:  
Arturo Espinosa committed
145 146 147 148
	* src/sheet-view.c, src/sheet.c, src/gnumeric.c: Massive changes
	to the structure of the code to accomodate the fact that we should
	be able to have multiple views for a single sheet.

Arturo Espinosa's avatar
Arturo Espinosa committed
149 150
1998-08-26  Miguel de Icaza  <miguel@nuclecu.unam.mx>

Arturo Espinosa's avatar
Today:  
Arturo Espinosa committed
151 152 153 154 155
	* src/sheet.c (sheet_clear_region_content): New function to remove
	the contents of a region of cells.

	* src/dialog-zoom.c (dialog_zoom): Add Zoom window.

Arturo Espinosa's avatar
Arturo Espinosa committed
156 157 158 159 160 161 162 163 164 165 166 167
	* src/style.c (style_color_new, style_color_ref,
	style_color_unref): New functions.  Color for a cell will be kept
	as part of the style.  Hack note: if valid_flags reports
	STYLE_COLOR style->color might be NULL: this means use the default
	sheet colors for this cell. 

	* src/cell.h: Get rid of GdkColor field.

	* src/item-grid.c (item_grid_draw_cell): Draw selected cells
	smartly.  Now we invert the resulting area (this works for my
	16-bpp display, have to try the XOR trick tomorrow on a paletted
	display). 
Arturo Espinosa's avatar
Today:  
Arturo Espinosa committed
168 169
	(context_clear_cmd): New context command that clears the content
	of a cell region.
Arturo Espinosa's avatar
Arturo Espinosa committed
170

Arturo Espinosa's avatar
Today:  
Arturo Espinosa committed
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
1998-08-25  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/sheet.c (sheet_row_selection_changed,
	sheet_col_selection_changed): Use sheet_selection_clear_only to
	avoid getting two selections.
	(sheet_col_add): Keep track of the last used columns/rows.
	(set_tip_label): New routine to set the tooltip to the value of
	the current scroll section
	(vertical_scroll_change, horizontal_scroll_change): Update the
	tooltip to reflect the current value.
	(vertical_scroll_event, horizontal_scroll_event): Create and
	destroy the tooltips
	(sheet_col_add, sheet_row_add): Keep track of the maximum sheet size

	(sheet_delete_col): New public routine. 
	(sheet_delete_row): New public routine.
	(sheet_move_column): New helper routine, it was part of
	sheet_insert_col before. 
	(sheet_insert_row): Manipulate the structures carefully.  I was
	changing a list that I was using. 

	* src/dialog-delete-cells.c (dialog_delete_cells): Use
	sheet_delete_col, sheet_delete_row.  This completes this dialog
	box. 

1998-08-24  Miguel de Icaza  <miguel@nuclecu.unam.mx>
197

Arturo Espinosa's avatar
Today:  
Arturo Espinosa committed
198 199 200 201 202 203 204 205 206 207 208
	* src/sheet.c (sheet_shift_row): Bug fix:  We can not be making
	changes to the column/row lists when we are walking them.  

	* src/cell.c (cell_formula_relocate): Re-parse the expression
	after relocating the formula: the resulting expression might have
	invalid cell references.

	* src/sheet.c (sheet_shift_col): Implement the column shift
	operation. 

1998-08-23  Miguel de Icaza  <miguel@nuclecu.unam.mx>
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238

	* src/dialog-cell-format.c (apply_align_format): Actually store
	the style selection on the computed style.

	* src/eval.c (intersects): Write in terms of range_contains.

	* src/utils.c (range_contains): New utility routine.

	* src/style.c (style_destroy): It now allow
	(style_merge_to): Implement new routine for gradually compute the
	full value of a style.
	(style_duplicate): Make the routine duplicate only
	the valid fields, not all of them.
	(style_destory): account for the fact that now we might have
	non-complete styles. 
	(sheet_style_compute): Make it fully functional.
	
	* src/sheet.c (sheet_cell_formula_link,
	sheet_cell_formula_unlink): Now we maintain the dependencies at
	formula link/unlink time
	(sheet_shift_row, shift_insert_col, shift_insert_row): Compute the
	dependencies for any changed cells and recalculate. 
	(sheet_style_attach): Implement.
	(sheet_destroy): Destroy the column and row information.
	
	* src/item-grid.c (context_insert_cmd): Use the
	dialog_insert_cells instead of the dummy test code we had before. 

	* src/workbook.c (insert_cols_cmd, insert_rows_cmd): Implement.

Arturo Espinosa's avatar
Arturo Espinosa committed
239 240 241 242
1998-08-22  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/sheet.c (sheet_redraw_all): Redraw also the column and row
	bars. 
243 244 245 246 247 248
	(sheet_insert_row): Fix.  I was accessing the wrong information;
	Fix, on the row selection code;  
	(sheet_cell_add): Recompute the dimensions properly of the cell
	after insertion (this is to fit the use of this routine in a new
	context). 
	(sheet_shift_row): Fix the 
Arturo Espinosa's avatar
Arturo Espinosa committed
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267

	* src/dialog-insert-cells.c (dialog_insert_cells): Learn to use
	GtkCauldroun's way of dealing with radio buttons.

	* src/sheet.c (sheet_selection_paste): Now the clipboard fills the
	region which is the union of the current selection and the
	information in the clipboard.

	* src/clipboard.c (clipboard_paste_region): Check the region where
	we pasted for possible dependencies, and if so, queue a recalc.
	(clipboard_paste_region): It now takes a region to be filled
	instead of just using the contents of the clipboard.

	* src/eval.c (search_cell_deps): Updated to search on cell ranges
	instead of a single cell.
	(region_get_dependencies): Get dependencies for a complete
	region. 
	(cell_get_dependencies): Reworked to use new scheme

Arturo Espinosa's avatar
Arturo Espinosa committed
268 269
1998-08-21  Miguel de Icaza  <miguel@nuclecu.unam.mx>

Miguel de Icaza's avatar
Today:  
Miguel de Icaza committed
270 271 272 273
	* src/dialog-insert-cells.c: New file.  Handle the insert cells
	dialog box.  This uses GtkCauldron for the first time.  That
	routine is soooo cool!
	
Arturo Espinosa's avatar
Arturo Espinosa committed
274 275 276 277 278 279 280 281 282
	* src/sheet.c (sheet_cell_remove): Remove the memory used by the
	key in the hashtable as well.
	(sheet_insert_col): new routine used to insert columns in the
	spreadsheet, it is pretty elaborate.
	(sheet_col_destroy, sheet_row_destroy): New routine used by the
	column-overflow logic in the insertion routines.
	(sheet_cell_add): Only attach a style to a cell if it does not
	have any yet.
	(sheet_move_row): New routine: shifts a row a number of columns.
Miguel de Icaza's avatar
Today:  
Miguel de Icaza committed
283 284 285 286
	(sheet_verify_selection_simple): New routine for warnging about
	the multiple-selections case.  In the future it should provide a
	help context. 
	(sheet_insert_row): Implement this new routine.  
Arturo Espinosa's avatar
Arturo Espinosa committed
287 288 289 290 291 292 293 294 295 296

	* src/clipboard.c (paste_cell): Simplify.

	* src/cell.c (cell_make_value, cell_formula_relocate): New routines
	based on the code that was done for the clipboard.  Now they are
	used in other places as well.  cell_make_value actually fixes a
	potential bug that caused formulas to reappear magically on
	paste-values commands (never hit the bug, but it was there, I
	swear to god).

Arturo Espinosa's avatar
Arturo Espinosa committed
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311
1998-08-20  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/gnumeric-sheet.c (gnumeric_sheet_set_cursor_bounds): New
	routine to set the cursor bounds.

	* src/sheet.c (sheet_selection_paste): Set the cursor and the
	selection to the new spot. 

	* src/dialog-paste-specia.c: Move the dialog code here. 

	* src/format.c (format_number): Do not abort after we have
	processed the whole format, but rather append the rest of the
	format string. 
	(style_entry_free): Kill the warnings

Chris Lahey's avatar
Chris Lahey committed
312 313 314 315 316 317 318 319 320 321
1998-08-20  Chris Lahey  <clahey@umich.edu>

	* src/style.h: Added StyleFormatEntry and changed StyleFormat.

	* src/format.c: Added multi-field formatting.  format_text now
	takes a StyleFormatEntry.
	
	(check_valid): Returns true if the given StyleFormatEntry is
	applicable to the given value.

322 323
1998-08-19  Miguel de Icaza  <miguel@nuclecu.unam.mx>

324 325 326 327 328 329 330 331 332 333 334 335 336 337
	* 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


Miguel de Icaza's avatar
Miguel de Icaza committed
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363
	* 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.

364 365 366 367 368 369 370 371 372
	* src/item-cursor.c (item_cursor_do_drop): New function:  Handles
	the action from the cursor drag operation.

	* src/gnumeric-util.c (run_popup_menu): New utility function to
	popup menus created from an array of strings. 

	* src/sheet.c (sheet_selection_cut, sheet_selection_copy): They
	now return whether it was possible to perform the operation.

373 374
1998-08-18  Miguel de Icaza  <miguel@nuclecu.unam.mx>

375 376 377 378 379 380 381 382 383
	* src/cell.c (cell_set_alignment): Provide a way to change the
	cell alignment.

	* src/dialog-cell-format.c (create_align_page): Implement the cell
	formats/alignment page. 

	* src/item-cursor.c (item_cursor_realize): Add stypple support for
	drag and autofill cursors.

384 385 386 387 388 389 390
	* src/gnumeric-sheet.c (gnumeric_sheet_compute_visible_ranges):
	Make the selected column and row be always fully visible (ie, use
	the ->last_full_[col|row] instead of last_visible_[col|row].

	* src/cell.c (cell_set_format): Call cell_queue_redraw after
	changing the cell contents.

Chris Lahey's avatar
Chris Lahey committed
391 392 393 394 395 396
1998-08-18  Chris Lahey  <clahey@jennifer.reshall.umich.edu>

	* src/format.c (format_number): Fixed the small '.' error.
	(decimal point shown even if not requested in numeric
	conversions.)

397 398
1998-08-17  Miguel de Icaza  <miguel@nuclecu.unam.mx>

Miguel de Icaza's avatar
Today:  
Miguel de Icaza committed
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428
	* 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. 

429 430
	* src/main.c (main): Include i18n setup as per namsh's suggetion. 

Chris Lahey's avatar
Chris Lahey committed
431 432 433 434 435 436 437
1998-08-15  Chris Lahey  <clahey@umich.edu>

	* src/format.c: Merged format_text and format_date into
	format_number.  
	Added parsing of am/pm.
	Added a short format description.

438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456
1998-08-15  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/item-cursor.c (item_cursor_drag_event): Make the drag cursor
	actually dragable. 

	* src/item-grid.c (item_grid_event): Use the converted cordinates.
	(item_grid_find_row, item_grid_find_col): Rename and export these
	routines to be used by the ItemCursor.

	* src/gnumeric-sheet.c (gnumeric_sheet_key): Do not remove the
	selection string when the input has been accepted.

	* src/expr.c (expr_tree_ref): Strategy change:  Now every ExprTree
	node is properly refcounted, as soon we will start sharing parts
	of the ExprTree between cells.
	(do_expr_decode_tree): Decoding an expression now takes into
	account the precedence of the operators and uses paretheses only
	when they are actually required.

Arturo Espinosa's avatar
Arturo Espinosa committed
457 458
1998-08-14  Miguel de Icaza  <miguel@nuclecu.unam.mx>

459 460 461 462 463
	* src/item-grid.c (item_grid_event): Implemented context sensitive
	menu for the grid.
	(item_grid_event): Use <control> instead of <shift> for extending
	a selection

Arturo Espinosa's avatar
Arturo Espinosa committed
464 465 466
	* src/clipboard.c (clipboard_paste_region): After pasting, trigger
	a recalculation. 

467 468 469 470 471 472 473
1998-08-14  Jaka Mocnik  <jaka.mocnik@kiss.uni-lj.si>

	* src/clipboard.h: changed PASTE_ALL to PASTE_ALL_TYPES.
	* src/gnumeric-util.c (gtk_radio_group_get_selected):
	changed to work. I guess it is a bit weird trying to
	access a next member of an int ;).

474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505
1998-08-13  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/workbook.c (workbook_set_region_status): Support going to a
	cell by typing the cell name on the entry line.
	(workbook_parse_and_jump): new routine for jumpting to a specific
	cell. 

	* src/dialog-goto-cell.c: New file.  Implements the goto cell
	dialog box. 

	* src/clipboard.c: implemented paste-special dialog box.
	(clipboard_paste_region): Redraw after clearing and after each
	cell is pasted.

	* src/sheet.c (sheet_selection_changed_hook): Display the current
	selection.
	(sheet_selection_walk_step): Fix the movememnt code to walk
	correctly over the selection.

	* src/cell.c (cell_formula_changed): New function used to notify
	of a cell formula change (required for recomputation and to add
	the cells to the proper computation lists).

	* src/expr.c (expr_decode_tree): Goes from ExprTree to a string
	representation.  This is required when copying cell values to
	recompute the string that is displayed to the user.

	* src/util.c (cellref_name): New function, get a string
	representation for a CellRef.
	(parse_cell_name): New function, returns integers for col, row
	from a cell string representation. 
	
506 507 508 509
Thu Aug 13 19:08:28 1998  Tom Tromey  <tromey@cygnus.com>

	* src/xml-io.c: Look in gnome-xml for tree.h and parser.h.

510 511 512
Thu Aug 13 00:02:23 EDT 1998  Daniel Veillard <Daniel.Veillard@w3.org>

	* src/xml-io.c : adapated to the new version 0.2 of the xml lib
513
	
514 515
1998-08-11  Miguel de Icaza  <miguel@nuclecu.unam.mx>

516 517 518
	* src/fn-math.c (gnumeric_bin2dec): finish implementation of
	BIN2DEC 

519 520 521
	* src/item-grid.c (item_grid_event): Call
	gnumeric_sheet_accept_pending_output before moving the cursor.

Arturo Espinosa's avatar
Arturo Espinosa committed
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541
	* src/item-cursor.c (item_cursor_event): Event handler for the
	item_cursors. 

	* src/item-cursor.h: More cursor types: ITEM_CURSOR_AUTOFILL (for
	the case where the small drag box is used) and ITEM_CURSOR_DRAG
	(for when the item is being dragged).

	* src/clipboard.c (clipboard_paste_region,
	clipboard_copy_cell_range): New functions for cut and paste
	support. 

	* src/cell.c (cell_destroy, cell_copy): New functions.  Preparing
	for cut and paste support.

	* src/expr.c (value_copy_to): Finish implementing all cases.
	(value_duplicate): New function.  Duplicates a value.

	* src/sheet.c (sheet_cell_remove): Implement a way to remove
	cells. 

542 543 544 545 546 547
	* src/eval.c (workbook_recalc): New recomputation strategy:  We
	now keep a generation flag for determining whenever a cell value
	has been recomputed for this generation.  The generation variable
	is a char.  Everytime we are about to overflow the char, we walk
	the list of formulas and reset the generation flag.

548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564
1998-08-10  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/eval.c (workbook_recalc): Queue computation for cells that
	have been recomputed.

	* src/expr.c (eval_expr): Implement the concatenation operator. 

1998-08-09  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/expr.c (eval_expr): Implement comparission.

	* src/str.c (string_unref_ptr, string_unref): Remove the string
	from the string_hash_table when the refcount reaches zero.

	* src/symbol.c (symbol_unref): Remove the symbol from the hash
	table when the refcount reaches zero.

565 566
1998-08-07  Miguel de Icaza  <miguel@nuclecu.unam.mx>

Arturo Espinosa's avatar
Arturo Espinosa committed
567 568 569 570 571 572 573 574
	* src/gnumeric-sheet.c: Renamed all references to (GnumericSheet
	*) called "sheet" to "gsheet".

	* src/sheet.h: Renamed parent_workbook in to be workbook.

	* src/cell.h: Include a Sheet * in the cell.  Make routines that
	required a Sheet parameter only use the Cell parameter now.

575 576 577 578 579 580 581 582 583 584
	* src/eval.c (add_tree_deps, cell_add_dependencies,
	add_value_deps, dependency_hash_init, dependency_hash,
	dependency_equal): New functions to maintain the
	DependencyRanges. 

	* src/fn-math.c 
	(gnumeric_max): Implemented function MAX.
	(gnumeric_min): Implemented function MIN.
	

Arturo Espinosa's avatar
Arturo Espinosa committed
585 586
1998-08-06  Miguel de Icaza  <miguel@nuclecu.unam.mx>

Arturo Espinosa's avatar
Arturo Espinosa committed
587 588 589
	* src/expr.c (eval_expr): Implemented exponentiation.
	Removed the code that used GMP.

Arturo Espinosa's avatar
Arturo Espinosa committed
590 591
	* src/parser.y (yylex): Bug fix: allocate the string.

Arturo Espinosa's avatar
Arturo Espinosa committed
592 593 594 595 596 597 598 599
	* src/sheet.c (CRowSort): Sort in the other direction my list of
	cells.
	(sheet_cell_foreach_range): Iterate over the lists with ->next,
	not with ->data.   Important bug fix.

	* src/parser.y (return_cellref): Fix the cell parsing routine to
	store the correct information.

Arturo Espinosa's avatar
Arturo Espinosa committed
600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619
	* src/fn-math.c: Moved the math functions to this file. 
	(gnumeric_sum): Make it use the new function_iterate_argument_values.
	(gnumeric_and): Implement AND function.
	(gnumeric_or):  Implement OR function.

	* src/func.c (function_iterate_argument_values): New function to
	ease the creation of functions with multiple arguments.  It
	generates Value * for a list of expressions that might include
	arrays and cell ranges. 

	* src/expr.c (cell_get_col_row): New routine to get the absolute
	cordinates with respect to an evaluation column and row.

	* src/parser.y (return_symbol): Support for constants.

	* src/expr.c (value_copy_to): Support for making Value copies
	(only used for our constants actually).

	* src/symbol.c (init_constants): Declare TRUE and FALSE.

Arturo Espinosa's avatar
Arturo Espinosa committed
620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650
	* src/sheet.c (sheet_selection_changed_hook): Autocomputation
	routine.  Whenever selection changes this routine will execute an
	arbitrary expression (kept in the workbook) and display the
	result. 

1998-08-05  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/expr.c (value_release): Release the value.
	(value_release): Add support for arrays.

	* src/symbol.c (g_strcase_hash): Use case insensitive hash tables.

	* src/item-bar.c (item_bar_unrealize): Call parent unrealize
	(item_bar_realize): Call parent realize

	* src/item-grid.c (item_bar_unrealize): Call parent unrealize
	(item_bar_realize): Call parent realize
	
	* src/item-cursor.c (item_bar_unrealize): Call parent unrealize
	(item_bar_realize): Call parent realize.
	(item_cursor_point): Implement correctly.

	* src/expr.c, parser.y (eval_expr): Added comparission operators.

	* src/fn-sheet.c (gnumeric_if): 
	Implemented IF function.
	Implemented SELECTION function.

	* src/func.c (gnumeric_sum): 
	Implement SUM function.
	
Arturo Espinosa's avatar
Arturo Espinosa committed
651 652
1998-08-05    <miguel@nuclecu.unam.mx>

653 654 655 656 657
	* src/expr.c (eval_funcall): No need for the the extra argc
	parameter on the functions with strong prototypes. 
	
	* src/func.c (gnumeric_cosh): More functions.
	
Arturo Espinosa's avatar
Arturo Espinosa committed
658 659
	* src/item-edit.c (item_edit_set_arg): 

Arturo Espinosa's avatar
Arturo Espinosa committed
660 661 662 663 664 665 666 667
	* src/gnumeric-sheet.c (cancel_pending_input): Cancel changes
	made.
	(start_editing_at_cursor): Make a copy of the original text, and
	clear the actual text to fix the redraw problems.

	* src/item-edit.c (item_edit_set_editor): Make the cursor be in
	sync with the GtkEntry by hooking to the "event" signal and
	catching key press and key release events.
Arturo Espinosa's avatar
Arturo Espinosa committed
668 669 670 671 672 673 674 675

	* src/func.c: More functions added.

	* src/symbol.c (g_strcase_equal): Symbol hash table does is
	case-insensitive. 

	* src/expr.c (eval_funcall): Added function evaluation.

Arturo Espinosa's avatar
Arturo Espinosa committed
676 677 678 679 680 681 682 683
1998-08-03  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/eval.c: New file.  Move the evaluation routines here.

	* src/func.c: Functions will go here.

	* src/parser.y (alloc_glist): Keep track of argument lists. 

684 685
1998-07-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>

686 687 688 689 690 691 692 693 694 695 696 697 698 699
	* src/sheet.c (canvas_bar_realized): 
	* src/gnumeric-sheet.c (gnumeric_sheet_realize): Neat X hack:  set
	the window backing pixmap to NULL, so that the window does not get
	cleared when it receives an exposure event.  It will just leave
	whatever bits were on the window when the expose happened.  This
	allows us to avoid flicker.  *** MIGUEL, LOOK AT THIS ***

	* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Fixed
	width/height confusion (cut&paste bug).

	* src/sheet.c (new_canvas_bar): Set outrageously big scrolling
	limits.  This has to be fixed to use the real sheet's dimensions.
	(sheet_new): Use correct table expansion parameters.

700 701 702 703 704 705 706 707 708
	* src/sheet.c (sheet_set_zoom_factor): Use gnome_canvas_scroll_to().

	* src/gnumeric-sheet.c (gnumeric_sheet_set_top_row): Scroll using
	gnome_canvas_scroll_to().
	(gnumeric_sheet_set_top_col): Likewise.
	(gnumeric_sheet_make_cell_visible): Get the offsets using
	gnome_canvas_get_scroll_offsets().
	(gnumeric_sheet_make_cell_visible): Use gnome_canvas_scroll_to().

709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729
	* src/gnumeric-sheet.c (gnumeric_sheet_color_alloc): Query the
	colormap with gtkdget_get_colormap(), because the canvas structure
	no longer has a colormap field in it.
	(gnumeric_sheet_set_top_row): Use the canvas layout adjustment to
	scroll.
	(gnumeric_sheet_set_top_col): Use the canvas layout adjustment to
	scroll.
	(gnumeric_sheet_make_cell_visible): Get the values from the canvas
	adjustments.

	* src/sheet.c (new_canvas_bar): Call gnome_canvas_new() correctly.
	(scroll_to): New helper function to scroll a canvas.
	(sheet_set_zoom_factor): Use scroll_to().

	* src/gnumeric-sheet.c (gnumeric_sheet_create): Do not call
	gnome_canvas_construct() at is does not exist anymore.
	(gnumeric_sheet_new): Use outrageously big values for the canvas
	scrolling region, for now.  This needs to be fixed.
	(gnumeric_sheet_make_cell_visible): Use the canvas layout
	adjustment to scroll.

730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789
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.

790 791 792 793 794 795
1998-07-28    <miguel@nuclecu.unam.mx>

	* src/sheet.c (sheet_cell_new): Insert the row, not the cell in
	the column list.
	(sheet_cell_foreach_range): Fixety fix

796 797
1998-07-27    <miguel@nuclecu.unam.mx>

798 799 800 801
	* src/sheet.c (sheet_cell_new): Cells are born with their propper
	width. 
	(cell_set_text): Width should include the margins. 

802 803 804 805 806 807 808 809 810 811 812 813 814
	* src/main.c (main): Rename currentWorkbook to current_workbook,
	so that it follows the style of the rest of my code ;-)

	* src/item-cursor.c (item_cursor_init): Add a timeout handler for
	drawing the anted animation.
	(item_cursor_set_bounds): Setup the Canvas Item bounding box when
	the bounds of the cursor change.

	* src/gnumeric-sheet.c (start_cell_selection): Create the
	selection cursor at the same position the regular cursor is. 

	(gnumeric_sheet_init): Share colors between items and the canvas.

815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834
Sun Jul 26 17:39:53 EDT 1998  Daniel Veillard <Daniel.Veillard@w3.org>

	* configure.in: added GNOME_XML_CHECK

	* src/Makefile.am: added xml-io.c to GNUMERIC_BASE_SOURCES and
	  GNOME_XML_LIB to gnumeric_LDADD and test_parser_LDADD

	* src/xml-io.[ch]: Added, provides saving to XML format

	* src/main.c: added currentWorkbook global variable

	* sheet.h: added currentWorkbook global variable

	* workbook.c: added currentWorkbook global variable, a Save menu with
	  save_cmd callback.

	* src/sheet.c: cell_set_text, initialized is_float to zero

	* doc/saving.txt: Added, what to be saved and first example.

835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892
1998-07-25  Miguel de Icaza  <miguel@redhat.com>

	* src/item-cursor.c (item_cursor_draw): Minimal code to support
	the anted-cursor.  There is a bug, I just dont know where :-)

	* src/gnumeric-sheet.c (gnumeric_sheet_key): Added support for
	selecting cell values with the cursor keys.
	(start_cell_selection): Starts the interactive selection of a cell
	(stop_cell_selection): Stops the interactive selection of a cell.
	(selection_remove_selection_string): Removes the text that has
	been inserted into the text line for selection purposes.
	(selection_insert_selection_string): Updates the entry with the
	contents of the selection range.
	(selection_expand_vertical, selection_expand_horizontal): Expands
	the selection.

	* src/item-cursor.h (item_cursor_set_bounds): Change prototype to
	reflect actual argument names.  I was a victim of my own lazyness.

	* src/gnumeric-sheet.c (move_cursor_vertical, move_cursor,
	move_cursor_horizontal): Renamed to allow formatting in 80
	columns. 

	* src/utils.c (cell_name): New routine.  Renders a cell name.


	* src/sheet.h (IS_SHEET): Added a signature to Sheet strucutres
	and a signature to test with.

	* src/symbol.c (symbol_ref_string): New function: it makes sure a
	symbol exists: it either increases the refcount for an existing
	string, or creates it.

1998-07-24    Miguel de Icaza <miguel@redhat.com>

	* src/workbook.c (workbook_get_current_sheet): New function.

	* src/sheet.c (cell_set_formula): New function.  Loads a cell with
	a formula.

	* src/parser.y (eval_value_string): New routine to return a string
	representation of a Value *.  This should use the format.c that
	Chris is working on, but we need Chris to commit his changes ;-).
	For now it uses %d and %g.

	* src/numbers.h: Compatibility functions to make the code work
	with or without GMP.
	
	* src/gnumeric-sheet.c (gnumeric_sheet_set_current_value): Sets
	the value to whatever happens to be on the input line.

	* src/expr.c (eval_cast_to_float): New function: casts a value to
	float. 
	(eval_cell_value): new function.
	(eval_node_value): evaluates the expression tree.

	* src/cell.h: Keep the computed value as well.

893 894 895 896 897 898 899 900 901 902
Sat Jul 25 14:10:23 1998  Tom Tromey  <tromey@cygnus.com>

	* src/Makefile.am (test_parser_LDADD): Added INTLLIBS.
	(test_format_LDADD): Likewise.
	(check_PROGRAMS): Renamed from noinst_PROGRAMS.

	* src/format.c (do_roundup): Renamed from roundup (my Linux
	install has a 2-argument `roundup' macro in sys/types.h).  Now
	static.

Nuno Ferreira's avatar
Nuno Ferreira committed
903 904 905 906
1998-07-25  Nuno Ferreira  <nmrf@rnl.ist.utl.pt>

	* configure.in (ALL_LINGUAS): Added "pt".

907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932
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.

Arturo Espinosa's avatar
Arturo Espinosa committed
933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948
1998-07-17  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/gnumeric-sheet.c (gnumeric_sheet_key): Add support for
	keyboard-selection.

	* src/item-edit.c (item_edit_destroy): Request a repaint for every
	area we touched at destruction time.

	* src/sheet.c (sheet_redraw_cell_region, sheet_redraw_selection):
	New functions to request that only a specific range of cells be
	redrawn.
	(sheet_selection_extend_vertical,
	sheet_selection_extend_horizontal): new routines to deal with
	mouse selection. 
	Use those functions all over sheet.c

949 950 951 952 953
1998-07-19  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* src/gnumeric-sheet.c src/item-bar.c src/sheet.c: Removed the
	canvas parameter from calls to gnome_canvas_item_new().

954 955 956 957 958
1998-07-18  Raja R Harinath  <harinath@cs.umn.edu>

	* src/Makefile.am (noinst_PROGRAMS): Don't bother installing
	`test-format' and `test-token'.

Arturo Espinosa's avatar
Arturo Espinosa committed
959 960 961 962 963 964 965 966 967 968 969 970 971 972 973
1998-07-15  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/gnumeric-sheet.c (gnumeric_sheet_cursor_set): Add tracking.

	* src/sheet.c (sheet_destroy): Add destructor.
	(sheet_selection_append): New functions for managing the cell
	selection. 

	* src/style.c (style_destroy): Add destructor.

1998-07-13  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/item-edit.c: New file.  Adds the editing widget to the
	spreadsheet. 

974 975 976 977 978
1998-07-15  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* src/item-bar.c (item_bar_event): Use
	gnome_canvas_item_grab/ungrab() now that they exist.

979 980
1998-07-14  Federico Mena Quintero  <federico@nuclecu.unam.mx>

981 982 983 984 985
	* src/item-bar.c (item_bar_realize): Set the item_bar->gc's
	foreground color to black (it is by default initialized to pixel
	value 0, which is not black on all default colormaps).
	(bar_draw_cell): Center the cell's text correctly.

986 987 988 989 990 991 992 993 994 995 996 997 998 999
	* src/gnumeric-sheet.c (gnumeric_sheet_create): Use
	gnome_canvas_construct() to initialize the canvas.

	* src/item-bar.c (get_col_name): Fixed generation of column names.
	(get_row_name): Rows are numbered from 1, not 0.  Also, assert
	that the row number is less than 65536.
	(item_bar_event): Grab/ungrab the mouse on button press/release.
	(item_bar_event): On motion_notify, only call set_cursor() if we
	are not resizing.
	(item_bar_event): Only take care of enter_notify events if we are
	not resizing.

	* po/es.po configure.in: Added Spanish translation.

1000 1001 1002 1003
1998-07-12  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/item-bar.c (item_bar_event): Do world->canvas cordinate
	conversion to get zoomed resizng working).
1004
	(bar_draw_cell): Minor look fix.
1005 1006 1007 1008

	* src/sheet.c (sheet_row_set_height): Silly mistake, add the newly
	created rowinfo to the row array, not the column array.

Arturo Espinosa's avatar
Arturo Espinosa committed
1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019
1998-07-11  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/style.c (style_duplicate): New function.  Does style
	duplication.

	* src/sheet.c (sheet_new): Simple hook signals to test the code. 

	* src/item-bar.c (item_bar_class_init): Added signals:
	size_changed and selection_changed.
	(item_bar_event): Add support for resizing columns and rows. 

1020 1021 1022 1023 1024
1998-07-10  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/style.c: New file.  Implement the style manager for the
	spreadsheet. 

1025 1026
1998-07-09  Miguel de Icaza  <miguel@nuclecu.unam.mx>

1027 1028 1029 1030
	* src/*: Dropped the ColInfo and RowInfo structures, they are now
	unified into a single ColRowInfo structure, they were really the
	same thing.  Thanks to Federico for the suggestion.

1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045
	* src/item-grid.c: 
	New paint strategy for the grid (uses what apparently Excel does);
	It now correctly uses the coordinate system from the canvas (ie,
	zoom in and zoom out work);
	
	* src/item-cursor.c: Implemented new version of the cursor.  I am
	using black lines for the cursor.  One day, when I find the
	strenght, I will use inversion and the inversion will do the right
	thing.

	* src/item-bar.c: New file.  Implements the titles for the columns
	and rows;

	* src/*: made stuff fit together.  

1046 1047 1048 1049
1998-07-06  Raja R Harinath  <harinath@cs.umn.edu>

	* configure.in: Remove duplicated AM_GNU_GETTEXT.

Manish Singh's avatar
Manish Singh committed
1050 1051 1052 1053
Sat Jul  4 15:07:49 PDT 1998 Manish Singh <yosh@gimp.org>

	* fixed up intl autoconf stuff

1054 1055 1056 1057 1058 1059 1060 1061
1998-07-04  Chris Lahey  <clahey@umich.edu>

	* src/Makefile.am (bin_PROGRAMS): Added test-format to compile the
	formatting tests.

	* src/format.c (format_time): Added date formatting.
	(format_text): More accurate numeric formatting.

1062
1998-07-03  Chris Lahey  <clahey@umich.edu>
Arturo Espinosa's avatar
Arturo Espinosa committed
1063

1064
	* src/format.c: New file to do excel style number formatting.
Arturo Espinosa's avatar
Arturo Espinosa committed
1065

1066
1998-07-03  Chris Lahey  <clahey@umich.edu>
Arturo Espinosa's avatar
Arturo Espinosa committed
1067

1068
	* ChangeLog: Cleared the gnome-games entries from the ChangeLog.
Arturo Espinosa's avatar
Arturo Espinosa committed
1069