2005-06-13 Jody Goldberg * Release 1.5.2 2005-06-13 Jody Goldberg * src/expr-name.c (gnm_named_expr_collection_lookup) : be more careful. 2005-06-12 Jody Goldberg * src/value.c (value_get_as_bool) : handle err == NULL 2005-06-12 Morten Welinder * src/workbook.c (workbook_detach_view): Just dispose of the view. That will both break cycles and indirectly unref. (workbook_sheet_delete): Ditto. * src/workbook-view.c (wb_view_sheet_add): Don't leak a ref to the new view. * src/sheet-view.c (sheet_view_new): Ref the sheet view when we add it to the sheet's list of views. (sv_real_dispose): Unref as we remove from said list. 2005-06-10 Morten Welinder * src/dependent.c (link_cellrange_dep, unlink_cellrange_dep): Fix condition for swapping sheet indices. Fix loop. (dependent_unlink): Don't try to unlink dynamic dependencies from a NULL container. * src/dependent.c (gnm_dep_container_sanity_check): New function. (dependents_revive_sheet): Check sanity here. (gnm_dep_container_dump): And here. (handle_outgoing_references): New function. Properly unlink dependencies that reference stuff outside current sheet. (do_deps_destroy, do_deps_invalidate): Use handle_outgoing_references. * src/dependent.c (dependents_invalidate_sheets): Handle 3d deps here. Avoid crashes by not modifying the hash while we go over it. * src/workbook.c (workbook_sheet_delete): Not here. * src/xml-sax-write.c (xml_write_sheet): Write visibility. * src/xml-sax-read.c (xml_sax_attr_enum): New function. (xml_sax_sheet_start): Restore visibility. * src/xml-io.c (xml_read_selection_info): Don't crash if we lack a view. (xml_write_selection_info): Ditto. (xml_sheet_read): Restore visibility. (xml_sheet_write): Write visibility. 2005-06-09 Jody Goldberg * src/workbook-control-gui.c (cb_realize) : init the menu prefs on realization. 2005-06-09 Jody Goldberg * src/item-edit.c (ie_scan_for_range) : call gnm_expr_entry_set_parsepos to be sure we're using the right notional position. This only really matters for R1C1 refs. * src/rendered-value.c (rendered_value_render) : use the Sheet::convs to display expressions. (cell_get_entered_text) : ditto. * src/parse-util.c (rangeref_as_string) : r1c1 support. (cellref_as_string) : ditto. * src/item-bar.c (item_bar_draw) : for r1c1 use numbers for col headers. (item_bar_calc_size) : ditto. * src/sheet.c : Add use-r1c1 property (re_render_formulas) : split from (sheet_set_display_formulas) : here. (sheet_set_use_r1c1) : for use here. * src/wbcg-actions.c (toggle_actions) : Add r1c1 toggle * src/GNOME_Gnumeric-gtk.xml : use it 2005-06-09 Morten Welinder * src/workbook.c (workbook_sheet_delete): Merge workbook_sheet_detach into this. (workbook_sheet_detach): Removed. All callers changed. * src/dependent.c (cb_dep_hash_destroy): Track changes to dependencies. (clear_revive_info): Free dep_exprs also. (dependents_revive_sheet): Undo changes to dependencies too. 2005-06-08 Morten Welinder * src/sheet.c (gnm_sheet_class_init): Rename "visible" property to "visibility" and make it an enum. All users changed. * src/sheet.h (struct _Sheet): Ditto for is_visible member. * src/workbook-view.c (wb_view_sheet_remove): New function to mirror wb_view_sheet_add. * src/workbook.c (workbook_sheet_hide_controls): Use wb_view_sheet_remove. 2005-06-08 Ivan, Wogn Yat Cheung * src/sheet-control-gui.c (scg_drag_receive_uri_list): adapt to the change of go_get_mime_type(). [#304074] 2005-06-07 Jody Goldberg From Ivan, Wong Yat Cheung * src/Makefile.am : enable libspreadsheet 2005-06-07 Jody Goldberg * src/parser.y : Pass the convention to the range_ref parser * src/parse-util.c (r1c1_get_index) : make this more robust. (cellref_r1c1_get) : adjust calling to new get_index args. (r1c1_rangeref_parse) : new. (rangeref_parse) : connect into the r1c1 parser. (parse_util_init) : add an r1c1 convention set 2005-06-07 Morten Welinder * src/workbook.c (workbook_sheet_state_restore): Revive sheets being re-attached. * src/workbook-control-gui.c (scg_delete_sheet_if_possible): Use cmd_reorganize_sheets2. * src/sheet.h (struct _Sheet): Add extra "revive" member. * src/expr-name.c (gnm_named_expr_collection_relink, gnm_named_expr_collection_unlink): New functions. (gnm_named_expr_collection_free): Remove the extra indirection. All callers changed. * src/dependent.c (handle_dynamic_deps, handle_referencing_names): Extracted from do_deps_destroy. (do_deps_invalidate, clear_revive_info, dependents_revive_sheet): New functions. (dependents_link): Do not free the argument list. All callers changed. (do_deps_destroy): Call clear_revive_info. (invalidate_name): Renamed from cb_name_invalidate. Add "destroy" argument. If not destroying, save the name-expression pairs. (cb_collect_deps_of_names): Collect also the names. (dependents_invalidate_sheet, dependents_invalidate_sheets): Add extra "destroy" argument. All callers changed. (dep_hash_destroy): Walk over the hash once, not three times. 2005-06-06 Morten Welinder * src/mathfunc.c (lgamma): Define when needed. (lgamma_r): Base the implementation on lgammacor, not lgamma. * src/sheet-control-gui.c (scg_drag_receive_uri_list): Add warning about things we do not understand. 2005-06-04 Jody Goldberg http://bugzilla.gnome.org/show_bug.cgi?id=165172 * src/gnumeric-canvas.c (gnm_canvas_key_mode_sheet) : quick and cheesy handling of Delete while editing. It forces an end to autocompletion rather than unintentionally clearing the cell as if we were not editing. 2005-06-04 Jody Goldberg http://bugzilla.gnome.org/show_bug.cgi?id=164779 * src/sheet-control-gui.c (scg_objects_nudge) : no nudging while creating an object. 2005-06-04 Jody Goldberg http://bugzilla.gnome.org/show_bug.cgi?id=163589 * src/print.c (print_page_cells) : Use the PrintInfo from the supplied sheet rather than something global. (print_page_repeated_rows) : ditto. (print_page_repeated_cols) : ditto. (print_page_repeated_intersect) : ditto. (print_hf_element) : ditto. (print_hf_line) : ditto. (print_headers) : ditto. (print_footers) : ditto. (setup_scale) : ditto. (print_page) : ditto. (print_range_down_then_right) : ditto. (print_range_right_then_down) : ditto. (print_job_info_init_sheet) : ditto. (print_sheet_range) : ditto. (compute_sheet_pages) : ditto. (compute_pages) : ditto. (print_sheet) : ditto. (workbook_print_all) : delete. (sheet_print_real) : and merge into here. (print_job_info_update_from_config) : merge into print_job_info_init_sheet. (print_job_info_get) : Do not attempt to load a PrintInfo from the first sheet. We'll set things up on a per sheet basis. (print_job_info_destroy) : we do not have a local copy of a PrintInfo anymore. 2005-06-04 Ivan, Wong Yat Cheung * tools/gconf-schemas-to-win32-reg.c (convert_schemalist): Use REGEDIT4 so that Win9x knows. 2005-06-03 Jody Goldberg * src/gnumeric.h : s/GnmRow/GnmStyleRow/ That is clearer 2005-06-03 Jody Goldberg * configure.in : bump gsf req to 1.12.1 for the new GSF_DYNAMIC_CLASS signatures 2005-06-02 Morten Welinder * src/mathfunc.c (binomialcf): Fix log_p case. (pfuncinverter): Handle NaNs better. (qbeta): Improve initial guess. * src/number-match.c (compute_value): When matching with strto[u]l, make sure to store the result in a variable large enough. Fixes #306254. 2005-06-01 Morten Welinder * src/xml-io.c (xml_write_cell_and_position): Don't duplicate ExprIDs for arrays. * src/xml-sax-write.c (xml_write_cell_and_position): Ditto. 2005-06-01 Stepan Kasal * src/ranges.c (undo_cell_pos_name, undo_range_name, undo_range_list_name): New functions. (max_range_name_width, range_list_name_try): New static functions. * src/commands.c (undo_global_range_name, cmd_cell_pos_name_utility): (cmd_range_list_to_string_utility, cmd_range_to_str_utility): Nuke; all callers should use the new functions from ranges.c. * schemas/gnumeric-general.schemas.in (max_descriptor_width): Change the default to 40; "Clearing contents in Sheet1!A12:C34" should fit in without truncating. The prefix is about 20 chars and about 20 chars should remain for the range name itself. 2005-05-31 Morten Welinder * src/xml-sax-read.c (xml_sax_cell): Fix asserts. (xml_sax_cell_content): Guard against bogus values. 2005-05-31 Jody Goldberg * src/xml-sax-read.c (gnm_xml_file_open) : register the doc if necessary, and hook it too the application for destruction. 2005-05-31 Morten Welinder * src/mathfunc.c (random_hypergeometric): Define trivially using qhyper thus avoiding some performance problems. (qhyper): Move from plugins/fn-r/extra.c (pfuncinverter): Improve case where initial guess is outside valid range. 2005-05-31 Stepan Kasal * src/dialogs/dialog-solver.c (solver_max_time_err): Move the variable and its initialization... * src/gutils.c (gutils_init): ... here. * src/gutils.h (solver_max_time_err): Declare. * src/tools/solver/solver.c: Include gutils.h instead of the declaration of solver_max_time_err. 2005-05-31 Stepan Kasal * src/commands.c (cmd_set_text): Remove the variable `GObject *obj'; it's not needed. Similarly for other 43 command functions. 2005-05-31 Ivan, Wong Yat Cheung * src/ssconvert.c (main): * src/ssindex.c (main): Use go_shell_argv_to_glib_encoding() as well. 2005-05-31 Jody Goldberg http://bugzilla.gnome.org/show_bug.cgi?id=304559 * src/sheet-object-widget.c (sheet_object_widget_new_view) : keep the view hidden until we can set the bounds 2005-05-30 Ivan, Wong Yat Cheung * src/main-application.c (main): Use go_shell_argv_to_glib_encoding(), so we can open file with name in any encoding when users "open" them in explorer (Win32). 2005-05-29 Jody Goldberg http://bugzilla.gnome.org/show_bug.cgi?id=167584 * src/sheet-object-widget.c (cb_adjustment_config_ok_clicked) : relink after changing the expression. (sheet_widget_adjustment_set_details) : ditto. (cb_checkbox_config_ok_clicked) : ditto. (sheet_widget_checkbox_set_link) : ditto. 2005-05-29 Jody Goldberg http://bugzilla.gnome.org/show_bug.cgi?id=165061 * src/mstyle.c (mstyle_equal_header) : new * src/ranges.c (range_has_header) : use it. 2005-05-29 Jody Goldberg * src/dependent.c (cb_collect_deps_of_name) : collect all deps of names, even those we're about to lose. Things need to be unlinked. 2005-05-27 Jody Goldberg http://bugzilla.gnome.org/show_bug.cgi?id=305405 * src/gui-clipboard.c (x_targets_received) : Add biff atoms to support pastes from MS Excel. (table_content_received) : ditto. 2005-05-27 Morten Welinder * src/mathfunc.c (discpfuncinverter, pfuncinverter): Make public. * src/position.c (eval_pos_init_cell): Constness fix. * src/cell.h (CELL_TO_DEP): Preserve constness. * src/dependent.c (dump_range_dep): Use range_name. (cell_queue_recalc): Not const. 2005-05-26 Stepan Kasal * src/clipboard.c: Remove unneeded includes. * src/gnumeric-gconf.c: Move common headers to the top, add more stubs for build without gtk. * src/ranges.c (range_name): Simplify. (global_range_name): Make the first parameter const. * src/ranges.h (global_range_name): Ditto. 2005-05-26 Morten Welinder * src/mathfunc.c (discpfuncinverter): New function. (qpois): New implementation based on discpfuncinverter. 2005-05-25 Morten Welinder * src/gui-clipboard.c (text_to_cell_region): Fall back to string. Fixes #305404. * src/workbook-control-gui.c (wbcg_create_edit_area): Add tooltips for ok_button, cancel_button, and func_button. 2005-05-23 Morten Welinder * src/commands.c (cmd_reorganize_sheets_delete_recreate_sheet): Plug leak. * src/dependent.c (cb_name_invalidate): Fix a crash relating to globally scoped names. * src/workbook-edit.c (cb_entry_delete_text): Make this work for non-rich text also. Turn off auto-completion. (cb_entry_insert_text): Make this work for non-rich text also. Turn off auto-completion if the insert is not at the end. (cb_entry_cursor_pos): Make this work for non-rich text also. Turn off auto-completion if the cursor is no longer at the end. (wbcg_edit_finish): Always turn off signals if they have been connected. (wbcg_edit_start): Always bind insert_text, delete_text, and cursor position signals here. (wbcg_edit_init_markup): Don't connect to insert_text, delete_text and cursor position signals here. (auto_complete_matches): Get rid of ugly event hack. * src/commands.c (command_redo): Keep a ref to the command and handle someone clearing the redo queue. Fixes #305007. 2005-05-23 Stepan Kasal * src/position.c (parse_pos_init): Don't perform the same check twice. * src/graph.c, src/sheet-object-widget.c (*_debug_name): All these functions now take a GString as the second parameter; adapt to it. 2005-05-21 Morten Welinder * src/dependent.c (dependents_link): Drop pointless rwinfo argument. All callers changed. 2005-05-20 Morten Welinder * src/dependent.c (gnm_dep_container_dump): Dump also dynamic dependencies and name dependencies. * src/workbook-control.c (wb_control_parse_and_jump): Use expressions like A1, not A1:A1 for single cells. 2005-05-20 Stepan Kasal * src/sheet-filter.c (filter_view_set_bounds): Remove unused variable so. 2005-05-19 Morten Welinder * src/sheet.h (struct _Sheet): add being_invalidated flag. * src/dependent.c (dependents_workbook_destroy): Renamed from workbook_deps_destroy. Mark all sheets being_invalidated before actually doing so. (dependents_invalidate_sheet): Renamed from sheet_deps_destroy. (do_deps_destroy): Don't take a GnmExprRewriteInfo argument -- create it locally. * src/expr.h (struct _GnmExprRewriteInfo): Combine GNM_EXPR_REWRITE_SHEET and GNM_EXPR_REWRITE_WORKBOOK into GNM_EXPR_REWRITE_INVALIDATE_SHEETS. 2005-05-19 Morten Welinder * src/workbook.c (pre_sheet_index_change): Use dependent_unlink directly as callback. (post_sheet_index_change): Use dependent_link directly as callback. * src/dependent.c (dependent_link, dependent_unlink, link_expr_dep, unlink_expr_dep): Drop the pos argument, infer when needed. All callers changed. 2005-05-18 Morten Welinder * src/dependent.c (dependent_pos): New utility function. (dependent_set_sheet, dependent_add_dynamic_dep, dependent_unlink, dependents_link, do_deps_destroy, dynamic_dep_free): use dependent_pos. (link_expr_dep, unlink_expr_dep, dependents_unrelocate_free, dependents_unrelocate): Avoid cast. 2005-05-18 Jody Goldberg * src/expr-name.c (expr_name_new) : make public (expr_name_add) : accept a stub object. 2005-05-17 Jody Goldberg * src/workbook.c (workbook_focus_other_sheet) : fix 2005-05-17 Morten Welinder * src/expr-name.c (expr_name_set_expr): Don't relink deps for sheets that are being destroyed. 2005-05-16 Morten Welinder * src/print-cell.c (print_cell): Fix and simplify rotated case. * src/cell-draw.c (cell_draw): Simplify rotated case. * src/rendered-value.c (rendered_value_remeasure): Collect extra information for rotated values. (rendered_value_init): Setup a separate pool for rotated cells. (rendered_value_shutdown): Shut that down. 2005-05-16 Stepan Kasal * src/sheet-control-gui.c (scg_drag_receive_uri_list): Change the type of local variable `mime' to `const gchar *'. 2005-05-16 Morten Welinder * configure.in (set_more_warnings): Kill -Wcast-align. It does not catch anything useful. We run-time check, either in gobject macros or else by virtue of running on a Sparc. Also we do *tons* of valid cast from base classes to derived classes after carefully checking the dynamic type. 2005-05-16 Jody Goldberg * src/sheet-filter.c (filter_foo_view_init) : remove debug spew 2005-05-16 Stepan Kasal * configure.in (PKG_PROG_PKG_CONFIG): Fix the explanation above. 2005-05-15 Jean Brefort * src/graph.c: (gnm_go_data_vector_get_value), (gnm_go_data_matrix_get_value): always release the value returned by value_coerce_to_number. 2005-05-15 J.H.M. Dassen (Ray) * configure.in: Bumped the goffice requirement as we need GORegexp now. Enable a number of additional warnings (when available) for which the current code base is already virtually clean. * src/func.c, src/gnumeric-gconf.c: Clean up function declarations. * src/sheet.h: Include prototype for sheet_apply_border. 2005-05-13 Jody Goldberg http://bugzilla.gnome.org/show_bug.cgi?id=164950 * src/ranges.c (range_trim) : make this more efficient. 2005-05-14 Jody Goldberg http://bugzilla.gnome.org/show_bug.cgi?id=165734 * src/value.c (find_rows_that_match) : The column in the condition is absolute, not relative to the start of the input range. 2005-05-14 Jody Goldberg * src/ranges.c (gnm_sheet_range_from_value) : renamed from value_to_global_range. (gnm_sheet_range_new) : renamed from global_range_new. (gnm_sheet_range_free) : renamed from global_range_free. (gnm_sheet_range_overlap) : renamed from global_range_overlap. (gnm_sheet_range_dup) : renamed from global_range_dup. * src/value.c (value_new_cellrange_str) : renamed from global_range_parse. 2005-05-13 Morten Welinder * src/rendered-value.c (get_rotated_layout_bounds): Remove. (rendered_value_remeasure): Rework the rotated case to match Excel much better. (rendered_value_new): Setup new noborders member. * src/sheet.c (sheet_apply_border): New functions. Setting borders for rotated cells actually causes different rendering. * src/commands.c (cmd_format_undo): Fix CRITICAL. (cmd_format_redo): Use sheet_apply_border instead of going directly to sheet_style_apply_border. * src/cell-draw.c (cell_draw): Rework rotated case to match Excel much better. * src/style.c (style_default_halign): Handle that down rotations are now angles >180, not <0. 2005-05-13 Stepan Kasal * src/xml-sax-read.c (content_ns, gnumeric_1_0_dtd): Mark these variables with G_GNUC_UNUSED, the #warning below is enough. 2005-05-12 Jody Goldberg * src/value.c (parse_database_criteria) : remove old FIXME with a simple test. http://bugzilla.gnome.org/show_bug.cgi?id=165700 * src/commands.c (update_after_action) : re-focus only controls for the current view, not all controls. 2005-05-12 Jody Goldberg * src/sheet-filter.c (filter_expr_eval) : for regexp based matches make sure we matched the whole string. 2005-05-10 Jean Brefort * src/value.c: (value_get_as_gstring): exchange row_sep and col_sep when formatting an array formula. 2005-05-10 Jody Goldberg * configure.in : post release bump