1. 16 Jul, 2003 1 commit
    • Jody Goldberg's avatar
      always register the object. · 5751c359
      Jody Goldberg authored
      2003-07-16  Jody Goldberg <jody@gnome.org>
      
      	* ms-obj.c (ms_read_OBJ) : always register the object.
      
      	* ms-container.c : Make the obj_queue a GSList.
      	(ms_container_get_obj) : new.
      	(ms_container_realize_objs) : only realize MSObjs that have gnumeric
      	  objects.
      
      	* ms-escher.c (ms_escher_header_init) : init new 'release_attrs' flag
      	  to allow us to pass management of an attr bag to an object, but still
      	  retain access to it.
      	 (ms_escher_header_release) : honour the flag.
      	 (ms_escher_read_ClientData) : set the flag.
      
      	* ms-excel-read.c (excel_read_NOTE) : Discover an undocumented flag.
      	  0x100 == no indicator visible
      	  While we're here store the author, and the inidcator position.
      	(excel_read_HLINK) : frames are 0x80 not 0x8
      	(ms_sheet_realize_obj) : cheat to handle cell comments.  In xl97 and
      	  up the comment objects store the possition of the display box, not the
      	  position of the indicator.  We need a better comment object.
      	(ms_sheet_realize_obj) : Store the text for text boxes too.
      	(ms_sheet_create_obj) : no need to set a blank text, we assign it later.
      	(ms_sheet_create_obj) : create comments.
      
      2003-07-15  Jody Goldberg <jody@gnome.org>
      
      	From John Gill :
      	* schemas/gnumeric-general.schemas.in : Add core/gui/editing/transitionkeys
      	* src/application.c (application_history_add) : new.
      	(application_set_transition_keys) : new.
      	* src/gnumeric-gconf.c (gnm_conf_init) : load the new pref.
      	(gnm_gconf_set_transition_keys) : new.
      
      	* src/item-cursor.c (item_cursor_selection_event) : Improve the
      	  heuristics even further.
      5751c359
  2. 23 Jun, 2003 1 commit
    • Jon Kåre Hellan's avatar
      Add xhtml_range saver. Used when exporting to clipboard. · 82c37b04
      Jon Kåre Hellan authored
      * plugins/html/plugin.xml.in: Add xhtml_range saver. Used when
      exporting to clipboard.
      
      * plugins/html/html.[ch] (xhtml_range_file_save): New function. Save
      range as xhtml. Used when exporting to clipboard.
      
      * plugins/html/html.c (write_sheet): Add save_scope parameter. Don't add
      caption if scope is 'range'.
      (html_file_save): Call write_sheet with save_scope argument.
      
      * src/plugin-service.c (plugin_service_file_saver_read_xml):
      Recognize save_scope value "range".
      
      * src/gui-file.c (make_format_chooser): Leave savers with scope
      'range' out from menu.
      
      * src/gui-clipboard.c (table_cellregion_write): New
      function. Convert to memory buffer in format wanted by clipboard
      by pasting into a temporary workbook, saving that to a memory
      output stream.
      (x_clipboard_get_cb): Export to clipboard as xhtml.
      
      * src/file.h (enum FileSaveScope): Add FILE_SAVE_RANGE, used when
      exporting to clipboard.
      82c37b04
  3. 05 May, 2003 1 commit
    • Andreas J. Guelzow's avatar
      add argument to call of wb_view_new_from_input · 002c067b
      Andreas J. Guelzow authored
      
      	* src/bonobo-io.c (gnm_persist_stream_load): add argument
      	  to call of wb_view_new_from_input
      
      	* src/charset.c: new file
      	* src/charset.h: new file
      	* src/file-priv.h: (_GnmFileOpenerClass): add argument to
      	  declaration of open method
      	(_GnmFileOpener): add encoding_dependent field
      	(gnm_file_opener_setup): add argument
      
      	* src/file.c (gnm_file_opener_open_real): new argument to pass
      	  to open call
      	(gnm_file_opener_setup): new argument to be used for
      	  initialization of added field
      	(gnm_file_opener_new): add argument to call of
      	  gnm_file_opener_setup
      	(gnm_file_opener_new_with_enc): new function
      	(gnm_file_opener_is_encoding_dependent): new function
      	(gnm_file_opener_open): new argument
      
      	* src/file.h (GnmFileOpenerOpenFuncWithEnc): new type
      	(gnm_file_opener_new_with_enc): new function
      	(gnm_file_opener_open): new argument
      	(gnm_file_opener_is_encoding_dependent): new function
      
      	* src/gui-clipboard.c (table_cellregion_read): add argument
      	  to call of wb_view_new_from_input
      
      	* src/gui-file.c (file_format_changed_cb_data): new type
      	(make_format_chooser): only make option menu
      	(gui_file_read): new argument to be passed to call of
      	  wb_view_new_from_file
      	(file_format_changed_cb): new callback
      	(gui_file_open): add encoding selector to load file dialog
      
      	* src/gui-file.h (gui_file_read): new argument
      	* src/history.c (file_history_cmd): add argument to call of
      	  gui_file_read
      
      	* src/main-application.c (main): add argument to call of
      	  wb_view_new_from_file
      
      	* src/plugin-service.c (gnm_plugin_file_opener_open): new
      	  argument
      	(gnm_plugin_file_opener_new): add argument to call of
      	  gnm_file_opener_setup
      
      	* src/stf.c (stf_open_and_read): new argument
      	(stf_preparse): handle encoding conversion
      	(stf_read_workbook_auto_csvtab): new argument to be passed to
      	  the call of stf_parse
      	(stf_init): setup encoding
      
      	* src/workbook-view.c (wb_view_new_from_input): new argument to
      be
      	  passed to the call of gnm_file_opener_open
      	(wb_view_new_from_file): new argument to be passed to the call
      of
      	  wb_view_new_from_input
      
      	* src/workbook-view.h (wb_view_new_from_input): new argument
      	(wb_view_new_from_file): new argument
      
      
      	* corba-application.c (capp_workbook_open): add argument
      	  to call of wb_view_new_from_file
      
      	* Makefile.am: add src/charset.[ch]
      002c067b
  4. 27 Mar, 2003 1 commit
    • Jody Goldberg's avatar
      doh! Thanks Morten. · 70688602
      Jody Goldberg authored
      
      2003-03-27  Jody Goldberg <jody@gnome.org>
      
      	* src/style.c (style_font_new_simple) : doh!  Thanks Morten.
      
      2003-03-26  Jody Goldberg <jody@gnome.org>
      
      	* src/pattern.c (gnumeric_background_set_gc) : trivial optimization to
      	  avoid multiple calls to gdk_gc_set_values.
      	(gnumeric_pattern_get_stipple) : no need to publicize this for now.
      	  simply a bit.
      
      2003-03-18  Jody Goldberg <jody@gnome.org>
      
      	* src/gui-util.c (gnumeric_inject_widget_into_bonoboui) : make it more
      	  forgiving in the face of installation problems.
      
      2003-03-17  Jody Goldberg <jody@gnome.org>
      
      	* src/dependent.c (name_dep_debug_name) : new.
      	(dynamic_dep_eval) : new.
      	(dependent_types_init) : register name pseudo type a name is not
      	  really a dependent, but it is useful for relocation to have a unique
      	  type for it.
      
      	* src/dependent.h : Add relocation flavour to handle the needs of
      	  names and potentially eventually sorting.
      
      	* src/clipboard.c (clipboard_paste_region) : set relocation flavour.
      	* src/sheet-autofill.c (autofill_cell) : ditto.
      	* src/sheet.c (cb_set_cell_content) : ditto.
      	* src/workbook.c (workbook_sheet_detach) : ditto.
      
      	* src/item-edit.c (recalc_spans) : support the use of partial columns
      	  at the edges.
      	* src/sheet-control-gui.c (gnm_canvas_make_cell_visible) : don't
      	  scroll past the requested col/row if it is larger than the screen.
      
      2003-03-15  Jody Goldberg <jody@gnome.org>
      
      	* src/file.h : fix the naming of a few methods (Still needs cleanup)
      	  and add gnm_file_saver_for_file_name.
      70688602
  5. 04 Feb, 2003 1 commit
  6. 05 Dec, 2002 1 commit
    • Jon Kåre Hellan's avatar
      Renamings: · 4afde1db
      Jon Kåre Hellan authored
      GnumFile  -> GnmFile
      gnum_file -> gnm_file
      GNUM_FILE -> GNM_FILE
      4afde1db
  7. 29 Nov, 2002 1 commit
    • Jody Goldberg's avatar
      Add include for gsf-output.h (applix_write) : tidy up the constness. · 4152a7f6
      Jody Goldberg authored
      
      2002-11-29  Jody Goldberg <jody@gnome.org>
      
      	* applix-write.c : Add include for gsf-output.h
      	(applix_write) : tidy up the constness.
      
      2002-11-29  Jody Goldberg <jody@gnome.org>
      
      	* ms-excel-write.c (excel_write_WINDOW1) : make view const
      	(excel_write_state_new) : ditto.
      
      	* ms-excel-read.c (excel_prepare_autofilter) : new.
      	(excel_read_NAME) : handle autofilters.
      
      	* ms-escher.c (ms_escher_read_ClientTextbox) : store the text.
      
      	* plugins/excel/boot.c (excel_save) : make the view const not the
      	  output.
      	(excel_dsf_file_save) : ditto.
      	(excel_biff8_file_save) : ditto.
      	(excel_biff7_file_save) : ditto.
      
      2002-11-26  Jody Goldberg <jody@gnome.org>
      
      	* ms-excel-read.c (ms_sheet_create_obj) : use the new label setting
      	  utilities.
      
      
      2002-11-29  Jody Goldberg <jody@gnome.org>
      
      	* src/workbook-control-gui.c (wbcg_menu_state_update) : add auto
      	  filter.
      	(cb_auto_filter) : initial quicky implementation.
      	(cb_data_pivottable) : ditto.
      	(workbook_control_gui_init) : init the autofilter.
      
      	* src/value.c (value_equal) : new util.
      	(value_cmp) : new.
      
      	* src/style-color.c (gnumeric_color_init) : add green.
      
      	* src/stf.c : quiet a few warnings.
      
      	* src/sheet.c (sheet_new) : init filters and pivots.
      	(sheet_destroy_contents) : free the filters and pivots.
      	(sheet_range_calc_spans) : no one sets NO_DRAW so don't check for it.
      	(sheet_cell_calc_span) : ditto.
      
      	* src/sheet-view.c (sv_edit_pos_in_filter) : new.
      
      	* src/sheet-object.c (sheet_object_print) : no warning if the object
      	  does not print.
      	(sheet_object_clone) : nor is it a problem if it can not be cloned.
      
      	* src/sheet-object-widget.c (sheet_widget_button_set_label) : new.
      	(sheet_widget_checkbox_set_label) : new.
      	(cb_checkbox_config_cancel_clicked) :use sheet_widget_checkbox_set_label
      	(cb_checkbox_label_changed) : ditto.
      	(sheet_widget_radio_button_finalize) : free the label.
      	(sheet_widget_radio_button_set_label) : new.
      
      	* src/ranges.c (setup_range_from_value) : remove ugly release argument.
      	(setup_range_from_range_ref) : ditto.
      	(value_to_global_range) : take a GlobalRange as an arg.  No need to
      	  allocate the result.
      
      	* src/item-bar.c (item_bar_realize) : create a GC for filtered regions
      	(item_bar_unrealize) : free it.
      
      	* src/io-context.c (workbook_io_progress_set) : const the workbook.
      
      	* src/gnumeric.h : Add GnmFilter.
      	  Remove unused SPANCALC_NO_DRAW.
      
      	* src/file.c (gnum_file_saver_save_real) : view is const not output.
      	(gnum_file_saver_save) : ditto.
      
      	* src/file-priv.h (save) : view is const not output.  delete save to
      	  stream.
      
      	* src/consolidate.c (consolidate_set_destination) : adjust to less
      	  silly interface to setup_range_from_value.
      	(consolidate_add_source) : ditto.
      
      	* src/pixmaps/Makefile.am : add the pivottable icons
      	* src/application.c (gnumeric_application_setup_icons) : ditto.
      
      	* src/Makefile.am : add pivot table stub and auto filter
      	  implementation
      
      2002-11-28  Jody Goldberg <jody@gnome.org>
      
      	* src/expr-name.c (sheet_names_get_available) : document.
      	(cb_get_names) honour is_hidden.
      	(expr_name_new) : init is_hidden.
      4152a7f6
  8. 28 Nov, 2002 1 commit
    • Jon Kåre Hellan's avatar
      Port to gsf output. · c1071afc
      Jon Kåre Hellan authored
      * plugins/applix/applix.h (applix_write): Port to gsf output.
      
      * plugins/applix/boot.c (applix_file_save): Ditto.
      
      * plugins/applix/applix-write.c (applix_write): Ditto.
      
      * plugins/dif/dif.c (dif_file_save): Port to gsf output.
      
      * plugins/excel/boot.c (excel_save, excel_dsf_file_save, excel_biff8_file_save)
      (excel_biff7_file_save): Receive gsf output stream from higher
      layer rather than creating and closing it here.
      
      * plugins/gnome-glossary/gnome_glossary.py (save_sheet_as_po): Port to
        gsf output.
      
      * plugins/html/html.c (html_print_encoded, html_write_cell_content)
      (html_write_one_border_style_40, html_write_border_style_40)
      (write_cell, write_row, write_sheet, html_file_save): Ditto.
      
      * plugins/html/latex.c (latex_fputs, latex_math_fputs)
      (latex2e_write_file_header, latex2e_write_table_header)
      (latex2e_print_vert_border, latex2e_write_blank_cell)
      (latex2e_write_multicolumn_cell, latex2e_print_hhline): Ditto.
      
      * plugins/html/roff.c (roff_dvi_file_save): Remove.
      
      * plugins/html/plugin.xml.in: Remove dvi via roff.
      
      * plugins/python-loader/python-loader.c
      (gnumeric_plugin_loader_python_func_file_save): Port to gsf output.
      
      * src/file-priv.h (struct _GnumFileSaverClass::save): Replace
      file_name with GsfOutput *output.
      
      * src/file.h (GnumFileSaverSaveFunc, gnum_file_saver_save): Ditto.
      
      * src/file.c:
      (gnum_file_saver_save_real, gnum_file_saver_save): Ditto.
      
      * src/plugin-service.h
      (PluginServiceFileSaverCallbacks::plugin_func_file_save): Ditto
      
      * src/plugin-service.c:
      (gnum_plugin_file_saver_save): Ditto
      
      * src/workbook-view.c: Include gsf/gsf-output-stdio.h.
      (wbv_save_to_file): New function. Creates a gsf output stream from
      file.
      (wb_view_save_as, wb_view_save): Call wbv_save_to_file rather than
      gnum_file_saver_save.
      
      * src/stf.c (stf_text_to_columns): Call
      gsf_output_memory_get_bytes with new signature.
      (stf_open_for_write): Remove.
      (stf_write_func): Use gsf_output_puts.
      (stf_write_workbook): Replace file_name with GsfOutput *output.
      Don't open and close file. Higher layer does that.
      
      * src/xml-io.c (gnumeric_xml_write_workbook): Replace file_name
      with GsfOutput *output.  Don't open and close file. Higher layer
      does that.
      c1071afc
  9. 14 Nov, 2002 1 commit
    • Jon Kåre Hellan's avatar
      Remove "open" and "import" attributes. · e551bdbf
      Jon Kåre Hellan authored
      * plugins/applix/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/dif/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/excel/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/gnumeric_1_0/plugin.xml.in: Remove "open" and "import"
      attributes.
      
      * plugins/html/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/lotus-123/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/mps/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/oleo/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/openoffice/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/plan-perfect/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/psiconv/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/qpro/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/sc/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/sylk/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/xbase/plugin.xml.in: Remove "open" and "import" attributes.
      
      * plugins/xml_sax/plugin.xml.in: Remove "open" and "import" attributes.
      
      * src/gui-file.c (gui_file_open): Use get_file_openers instead of
      get_file_importers.
      
      * src/plugin-service.c (struct _PluginServiceFileOpener):
      can_open, can_import, default_importer_priority: Remove.
      (plugin_service_file_opener_read_xml)
      (plugin_service_file_opener_read_xml): Ignore "open" and "import"
      properties.
      (plugin_service_file_opener_activate): Don't use
      register_file_opener_as_importer or
      register_file_opener_as_importer_as_default.
      
      * src/file.c (default_file_importer_list, file_importer_list,
      default_file_importer_cmp_priority,): Remove.
      
      * src/stf.c (stf_init):
      s/register_file_opener_as_importer_as_default/
      register_file_opener/
      
      * src/dialogs/dialog-preferences.c: (cb_pref_file_set_import_all_op,
      cb_pref_file_import_all_op_toggled): Remove
      (pref_file_page_initializer): Remove "Import with all Openers".
      e551bdbf
  10. 07 Nov, 2002 1 commit
  11. 29 Sep, 2002 1 commit
    • Jody Goldberg's avatar
      document and fix a bit. still untested. (rangeref_parse) : touch up a bit. · 6d31c1c7
      Jody Goldberg authored
      
      2002-09-29  Jody Goldberg <jody@gnome.org>
      
      	* src/parse-util.c (wbref_parse) : document and fix a bit.  still
      	  untested.
      	(rangeref_parse) : touch up a bit.
      	(gnm_1_0_rangeref_parse) : new, untested.
      
      	* src/parser.y (gnm_expr_parse_str) : add
      	  GNM_EXPR_PARSE_USE_OPENCALC_CONVENTIONS.  To hard code the
      	  seperators rather than extracting them from the locale.  Its quick
      	  and dirty, but will do the job for now.  Later it would be nice to
      	  abstract the parse state a bit more so that we don't need to
      	  re-initialize every time.
      	(yylex) : handle xml escaping for opencalc.
      
      	* src/parse-util.c (row_parse) : fix.
      
      2002-09-27  Jody Goldberg <jody@gnome.org>
      
      	* src/expr-name.c (expr_name_create) : delete because it was hard
      	  coding which rangeref parser to use.
      
      2002-09-27  Jody Goldberg <jody@gnome.org>
      
      	* src/parser.y : remove bogus error message and fix the other message
      	  to be correct when faced with the wrong type of array seperator.
      6d31c1c7
  12. 27 Jun, 2002 1 commit
    • Jody Goldberg's avatar
      add missing break. · c7e7774e
      Jody Goldberg authored
      
      2002-06-26  Jody Goldberg <jody@gnome.org>
      
      	* src/expr.c (do_gnm_expr_unref) : add missing break.
      
      2002-06-26  Jody Goldberg <jody@gnome.org>
      
      	* src/gui-util.c (gui_file_open) : move the magic directory selector
      	  for here.
      	(gnumeric_dialog_file_selection) : to here, so that it works for other
      	  situations too.
      c7e7774e
  13. 08 Jun, 2002 1 commit
    • Jody Goldberg's avatar
      libgsf has landed. · 7c1e9d5c
      Jody Goldberg authored
      
      libgsf has landed.
      
      2002-06-07  Jody Goldberg <jody@gnome.org>
      
      	* src/workbook-view.c (wb_view_open) : convert to libgsf.
      
      	* src/stf.c (stf_open_and_read) : convert to libgsf.
      	(stf_preparse) : ditto.
      	(stf_read_workbook) : ditto.
      	(stf_read_workbook_auto_csvtab) : ditto.
      	(stf_read_default_probe) : ditto.
      
      	* src/stf-parse.c (stf_parse_is_valid_data) : actually disable the
      	  wide char support if it is not available.
      
      	* src/gutils.c (gnm_extension_pointer) : copied from libgnome to
      	  decrease our dependence on it.
      
      	* src/gui-util.c (gnumeric_editable_enters) : modernize a bit.
      
      	* src/gnumeric-simple-canvas.c (gnm_simple_canvas_grab) : suppress
      	  warning.
      
      	* src/file.c (gnum_file_opener_probe_real) : Use libgsf.
      	(gnum_file_opener_open_real) : ditto.
      	(gnum_file_opener_probe) : ditto.
      	(gnum_file_opener_open) : ditto.
      	(gnum_file_saver_save_to_stream_real) : disable, we can move this out
      	  of here when GsfOutput comes online.
      
      	* src/collect.c (string_range_function) : suppress warning.
      
      	* src/cell.c (cell_set_array_formula) : Adjust to the signature change
      	  for gnm_expr_new_array.
      	* src/sheet-autofill.c (autofill_cell) : ditto.
      
      2002-06-07  Jody Goldberg <jody@gnome.org>
      
      	* configure.in : require libgsf.
      
      	* src/xml-io.c (xml_check_version) : move the sanity checking here.
      	(gnumeric_xml_read_workbook) : rather than here.  Support GsfInput.
      	(xml_probe) : and here.
      	(gnumeric_xml_write_workbook_to_stream) : delete.
      
      2002-05-31  Jody Goldberg <jody@gnome.org>
      
      	* src/gnumeric-simple-canvas.c (gnm_simple_canvas_grab) : actually
      	  return the result.
      7c1e9d5c
  14. 13 Apr, 2002 1 commit
    • Jody Goldberg's avatar
      move the really broken bonobo stuff here. · c2671493
      Jody Goldberg authored
      2002-04-12  Jody Goldberg <jody@gnome.org>
      
      	* src/workbook-private.c :  move the really broken bonobo stuff here.
      
      	* src/sheet-control-gui.c (scg_object_update_bbox) : Use fabs to
      	  handle inversion.
      	(scg_mode_edit_object) : Be a touch more anal.
      
      	* src/style.c (get_substitute_font) : add more font mappings.
      
      	* src/item-grid.c (ig_obj_create_finish) : no need to moneky with the
      	  internals of scg.  Setting the mode clears the new object.  Setting
      	  the sheet adds a ref, so there are no worries that it will go away.
      
      	* src/gnumeric-canvas.c : rip out the drag and drop support.
      	* src/workbook-control-gui.c : move it here.
      	(cb_insert_image) : silence a warning.
      	(cb_edit_cut) : at least make the object deletetion undoable.
      	(workbook_close_if_user_permits) : reorder to conform to HIG.
      
      2002-04-08  Jody Goldberg <jody@gnome.org>
      
      	* src/sheet-control-gui.c (scg_object_stop_editing) : unref the
      	  current object.
      	(scg_mode_edit_object) : ref the current object.
      
      	* src/item-grid.c (ig_obj_create_finish) : Use
      	  scg_mode_edit_object.
      	* src/gnumeric-canvas.c (gnm_canvas_key_mode_object) : Use
      	  sc_mode_edit to handle objects that are still being created.
      
      2002-04-06  Jody Goldberg <jody@gnome.org>
      
      	* src/sheet-control-gui.c (scg_object_update_bbox) : abs the dif when
      	  checking for middle ctrl points.
      
      2002-04-01  Jody Goldberg <jody@gnome.org>
      
      	* src/gui-util.c (gnumeric_toolbar_new) : minor clean up.
      	  one init is sufficient.
      c2671493
  15. 15 Feb, 2002 1 commit
    • Jody Goldberg's avatar
      We can now make distcheck · f84a08c5
      Jody Goldberg authored
      Requires a GAL update, and a gtk+ update
      
      2002-02-15  Jody Goldberg <jody@gnome.org>
      
      	* src/item-cursor.c (item_cursor_tip_setlabel) : enable now that the
      	  canvas bug is fixed.
      
      	* src/sheet-control-gui.c (cb_hscrollbar_adjust_bounds) : new.
      	(cb_vscrollbar_adjust_bounds) : new.
      
      	* src/gui-util.c (gtk_button_stock_alignment_set) : new.
      	(gnumeric_init_help_button) : new.
      
      	* src/gnumeric-canvas.h : Move declaration of
      	  GnumericCanvasSlideHandler here.
      
      	* src/gnumeric-canvas.c (gnm_canvas_guru_key) : forward to the entry,
      	  not the GnumericExprEntry wrapper.
      	(gnm_canvas_key_mode_sheet) : ditto.
      
      	* src/formats.c (cell_format_classify) : handle general.
      
      	* src/file-priv.h : Inherit from GObject.
      
      	* src/complete-sheet.c (complete_sheet_finalize) : call class_peek
      	  here to avoid potential reference problems.
      
      	* src/commands.c (cmd_set_text) : doh!  fix multi-line text.
      	(cmd_autoformat) : const.
      
      	* src/cell.c (cell_relocate) : const.
      	* src/clipboard.c (paste_cell_with_operation) : const.
      	(paste_cell) : ditto.
      
      	* src/application.c (application_init) : add jimmac's expr-entry icon.
      
      	* src/Makefile.am : distribute the marshaller.list
      
      	s/GtkType/GType/
      	s/GtkSignalFunc/GCallback/
      	s/gtk_signal_connect/g_signal_connect/  + reformating.
      	s/GTK_CHECK_CAST/G_TYPE_CHECK_INSTANCE_CAST/
      	s/GTK_CHECK_TYPE/G_TYPE_CHECK_CLASS_CAST/
      	s/GTK_CHECK_CLASS_CAST/G_TYPE_CHECK_INSTANCE_TYPE/
      	s/GTK_CHECK_CLASS_TYPE/G_TYPE_CHECK_CLASS_TYPE/
      
      2002-02-11  Jody Goldberg <jody@gnome.org>
      
      	* src/stf.c (stf_init) : Make the names of the text import/export
      	  clearer.
      f84a08c5
  16. 26 Aug, 2001 1 commit
    • Chyla Zbigniew's avatar
      Added "overwrite_files" field. · e06c7615
      Chyla Zbigniew authored
      * src/file-priv.h (struct _GnumFileSaver):
      Added "overwrite_files" field.
      
      * src/file.h (gnum_file_saver_set_overwrite_files): New function.
      
      * src/file.c
      (gnum_file_saver_init): Initialize overwrite_files (set to TRUE).
      (gnum_file_saver_save): Report an error and abort saving if file with
      given name already exists and overwrite_files == FALSE.
      
      * src/plugin-service.h (struct _PluginServiceFileSaver):
      Added "overwrite_files" field.
      
      * src/plugin-service.c (plugin_service_file_saver_read,
      gnum_plugin_file_saver_new): Handle overwrite_files flag.
      
      * src/xml-io.c (gnumeric_xml_read_workbook):
      Use fstat to get file size. Corrected error message.
      e06c7615
  17. 07 Aug, 2001 1 commit
    • Chyla Zbigniew's avatar
      Fixes #58648 Added support for default importers (with specified priority) · 3a31512f
      Chyla Zbigniew authored
      Fixes #58648
      Added support for default importers (with specified priority)
      
      * file.[ch]
      (register_file_opener_as_importer_as_default,
      get_default_file_importer): New functions, added support for default
      importers (with specified priority).
      
      * gui-file.c (gui_file_import): Open the dialog with default importer
      selected.
      
      * plugin-service.h (struct _PluginServiceFileOpener):
      Added default_importer_priority field.
      
      * plugin-service.c (plugin_service_file_opener_read): If importer is
      enabled, read default_importer_priority attribute.
      (plugin_service_file_opener_initialize): Register as default importer if
      default_importer_priority is specified.
      
      * src/stf.c (stf_init): Register "Gnumeric_stf:stf_druid" as default
      file importer with priority 50.
      3a31512f
  18. 16 Jul, 2001 1 commit
    • Chyla Zbigniew's avatar
      Removed save_to_stream_func member. (gnum_file_saver_setup): Removed · 8a0a4c56
      Chyla Zbigniew authored
      * src/file-priv.h
      (struct _GnumFileSaver): Removed save_to_stream_func member.
      (gnum_file_saver_setup): Removed save_to_stream_func argument.
      
      * src/file.h
      (gnum_file_saver_new): Removed save_to_stream_func argument.
      (gnum_file_saver_supports_save_to_stream): Removed.
      
      * src/file.c
      (gnum_file_saver_save_to_stream_real):
      New implementation, uses temporary file and gnum_file_saver_save.
      (gnum_file_saver_setup): Removed save_to_stream_func argument.
      (gnum_file_saver_new): Removed save_to_stream_func argument.
      (gnum_file_saver_supports_save_to_stream): Removed.
      
      * src/gui-file.c
      (ask_for_file_saver): Show all file savers in format chooser.
      
      * src/bonobo-io.c (gnumeric_bonobo_io_init),
      src/plugin-service.c (gnum_plugin_file_saver_new),
      src/stf.c (stf_init):
      Adjusted to file.h change (removed save_to_stream_func argument).
      
      * src/xml-io.c
      (gnumeric_xml_write_workbook_to_stream): Removed.
      (xml_init): Adjusted to file.h change.
      8a0a4c56
  19. 10 Jul, 2001 1 commit
    • Lutz Müller's avatar
      Add a menu item "Send" to the file menu. If this one is clicked, pop up an · 51e7bf1e
      Lutz Müller authored
      2001-07-10  Lutz Müller <urc8@rz.uni-karlsruhe.de>
      
              * src/workbook-control-gui.c: Add a menu item "Send" to the file menu.
              If this one is clicked, pop up an Evolution-Composer with current
              workbook attached.
              * src/file-priv.h: New virtual function for GnumFileSaver:
              save_to_stream.
              Introduce GnumFileSaverSaveToStreamFunc. Keep a mime type.
              * src/file.[c,h]: Implement save_to_stream and mime_type detection.
              * src/gui-file.[c,h]: Reduce copy & paste by introducing
              (make_format_chooser) and (check_multiple_sheet_support_if_needed).
              New function: (gui_file_save_to_stream) which asks for the desired
              mime type.
              * src/bonobo-io.c: This file saver doesn't support save_to_stream.
              * src/stf.c: This one either.
              * src/xml-io.[c,h]: Implement save_to_stream.
              * src/plugin-service.c: Pass NULL for save_to_stream.
      51e7bf1e
  20. 04 Jun, 2001 1 commit
    • Chyla Zbigniew's avatar
      Displaying a question dialog if the user wants to export workbook with · 3975cb1c
      Chyla Zbigniew authored
      
      Displaying a question dialog if the user wants to export workbook
      with many sheets to file format supporting only one.
      
      * src/file-priv.h (struct _GnumFileSaver): Added save_scope.
      
      * src/file.h (gnum_file_saver_set_save_scope,
      gnum_file_saver_get_save_scope, enum FileSaveScope): New.
      
      * src/file.c
      (gnum_file_saver_init): Initialize save_scope with FILE_SAVE_WORKBOOK.
      (gnum_file_saver_set_save_scope, gnum_file_saver_get_save_scope): New.
      
      * src/gui-file.c (do_save_as): Optionally display a question dialog if
      we have many sheets and the saver can save only one.
      
      * src/plugin-service.h
      (struct _PluginServiceFileSaver): Added save_scope.
      
      * src/plugin-service.c (plugin_service_file_saver_read,
      gnum_plugin_file_saver_new): Support save_scope attribute.
      3975cb1c
  21. 29 May, 2001 1 commit
    • Chyla Zbigniew's avatar
      Added FileProbeLevel argument. (GNUM_FILE_OPENER_CLASS, · ecec4fee
      Chyla Zbigniew authored
      
      * src/file.h
      (typedef enum FileProbeLevel) New.
      (typedef GnumFileOpenerProbeFunc, gnum_file_opener_probe): Added
      FileProbeLevel argument.
      (GNUM_FILE_OPENER_CLASS, IS_GNUM_FILE_OPENER_CLASS,
      GNUM_FILE_SAVER_CLASS, IS_GNUM_FILE_SAVER_CLASS):
      Macros moved to file-priv.h.
      
      * src/file-priv.h
      (struct _GnumFileOpenerClass::probe):
      (GNUM_FILE_OPENER_CLASS, IS_GNUM_FILE_OPENER_CLASS,
      GNUM_FILE_SAVER_CLASS, IS_GNUM_FILE_SAVER_CLASS):
      Macros moved from file.h.
      
      * src/file.c
      (gnum_file_opener_probe_real, gnum_file_opener_probe):
      Added FileProbeLevel argument.
      
      * src/workbook-view.c
      (wb_view_open_custom): Iterate over FileProbeLevel values when probing
      the file (passing current value to probe function).
      
      * src/xml-io.c
      (xml_probe): Added FileProbeLevel argument, testing only file name if
      probe level == FILE_PROBE_FILE_NAME.
      
      * src/plugin-service.c (gnum_plugin_file_opener_probe):
      Use file_patterns only if probe level == FILE_PROBE_FILE_NAME, otherwise
      call module's probe function.
      
      * src/bonobo-io.c (gnumeric_bonobo_io_probe),
      src/plugin-service.h (struct _PluginServiceFileOpener),
      src/plugin-loader-module.c
      (gnumeric_plugin_loader_module_func_file_probe,
      struct ServiceLoaderDataFileOpener::module_func_file_probe):
      Added FileProbeLevel argument.
      ecec4fee
  22. 21 May, 2001 2 commits
    • Chyla Zbigniew's avatar
      Added gtk-doc style documentation. (struct _GnumFileOpener, struct · 434748ad
      Chyla Zbigniew authored
      
      * file.c
      (gnum_file_opener_setup, gnum_file_opener_new, gnum_file_opener_probe,
      gnum_file_opener_open, gnum_file_saver_setup, gnum_file_saver_new,
      gnum_file_saver_save, gnum_file_saver_fix_file_name,
      register_file_opener, register_file_opener_as_importer,
      unregister_file_opener, unregister_file_opener_as_importer,
      register_file_saver, register_file_saver_as_default,
      unregister_file_saver, get_default_file_saver,
      get_file_opener_by_id, get_file_saver_by_id,
      get_file_savers, get_file_openers, get_file_importers):
      Added gtk-doc style documentation.
      (struct _GnumFileOpener, struct _GnumFileOpenerClass,
      struct _GnumFileSaver, struct _GnumFileSaverClass): Removed structs
      already defined in file-priv.h.
      
      * workbook-view.c
      (wb_view_save_as, wb_view_save, wb_view_open, wb_view_open_custom):
      Added gtk-doc style documentation.
      
      * file.h
      (gnum_file_opener_setup, gnum_file_saver_setup): Declarations moved ...
      
      * file-priv.h: ... here
      434748ad
    • Chyla Zbigniew's avatar
      Cleaned up file i/o interface. · 33d35aa2
      Chyla Zbigniew authored
      
      Cleaned up file i/o interface.
      
      * src/Makefile.am: Added file-priv.h.
      
      * src/file.[ch]:
      Made GnumFileOpener and GnumFileSaver GtkObjects with virtual probe,
      open and save methods.
      New GnumFileOpener methods: get_id.
      New GnumFileSaver methods: get_id, fix_file_name.
      New functions: register_file_opener, register_file_opener_as_importer,
      unregister_file_opener, unregister_file_opener_as_importer,
      register_file_saver, register_file_saver_as_default,
      unregister_file_saver, get_default_file_saver,
      get_file_opener_by_id, get_file_saver_by_id,
      get_file_savers, get_file_openers, get_file_importers.
      
      * src/file-priv.h: New file with definitions of structs:
      _GnumFileOpener, _GnumFileOpenerClass, _GnumFileSaver,
      _GnumFileSaverClass.
      
      * src/workbook.h
      (struct _Workbook): Added file_saver_sig_id field.
      s/FileSaver/GnumFileSaver/
      (workbook_get_file_saver): New accessor function.
      
      * src/workbook.c
      (cb_saver_destroy_event, workbook_destroy, workbook_set_saveinfo):
      When setting new file_saver, connect to its "destroy" signal and
      set file_saver to NULL in signal handler. Disconnect when changing file
      saver or destroying the workbook.
      (workbook_get_file_saver): New accessor function.
      
      * src/workbook-view.[ch]
      (wb_view_set_attributev): Renamed to wb_view_set_attribute_list and
      simplified.
      (wb_view_save_as, wb_view_save, wb_view_open, wb_view_open_custom): New
      methods (some code moved from file.c).
      
      * src/gnumeric-sheet.c (gnumeric_sheet_filenames_dropped):
      Use wb_view_open() instead of workbook_try_read()+file_finish_load().
      
      * src/gui-file.c
      (gui_file_import): Use get_file_importers(). Use
      wb_view_open_custom() instead of file_opener_open() + manual creation
      of wb_view, error checking, etc.
      (is_saver_registered): Removed.
      (saver_activate): Don't check if saver is really registered.
      (file_saver_is_default_format): Use get_default_file_saver() instead
      of strcmp(extension, "gnumeric") hack.
      (do_save_as): Use gnum_file_saver_fix_file_name().
      Adjusted everything to file.h, workbook.h, workbook-control.h.
      
      * src/gui-file.h (gui_file_import): Signature change, now function
      returns gboolean.
      
      * src/gutils.[ch] (g_list_index_custom): New function.
      
      * src/history.c (file_history_cmd), src/main.c (gnumeric_main),
      src/workbook-control-gui.c (cb_file_open): Use wb_view_open()
      instead of workbook_read().
      
      * src/workbook-control-gui-priv.h (struct _WorkbookControlGUI):
      s/FileSaver/GnumFileSaver/
      
      * src/plugin-service
      Created GnumPluginFileOpener and GnumPluginFileSaver classes (derived
      from GnumFileOpener and GnumFileSaver respectively). Moved contents of
      plugin_service_file_opener_probe_func,
      plugin_service_file_opener_open_func,
      plugin_service_file_saver_save_func into
      gnum_plugin_file_opener_probe, gnum_plugin_file_opener_open,
      gnum_plugin_file_saver_save methods (slightly modified).
      (plugin_service_file_opener_read): Read "open" and "import" attributes
      of <service> tag.
      (plugin_service_file_opener_initialize,
      plugin_service_file_opener_cleanup): Register/unregister created
      file opener (GnumPluginFileOpener object) as normal opener and/or
      importer depending on "open" and "import" XML attributes.
      (plugin_service_file_opener_initialize,
      plugin_service_file_opener_cleanup): Register/unregister created
      file saver (GnumPluginFileSaver object).
      
      * src/plugin-service.h
      (struct _PluginServiceFileOpener):
      Added can_open and can_import fields.
      s/FileOpener/GnumFileOpener/
      (struct _PluginServiceFileSaver):
      s/FileSaver/GnumFileSaver/
      
      * src/plugin-loader-module.c
      (struct ServiceLoaderDataFileOpener, struct ServiceLoaderDataFileSaver),
      gnumeric_plugin_loader_module_func_file_probe,
      gnumeric_plugin_loader_module_func_file_open,
      gnumeric_plugin_loader_module_func_file_save):
      s/FileOpener/GnumFileOpener/
      s/FileSaver/GnumFileSaver/
      
      * src/stf.c
      (stf_read_workbook, stf_write_workbook): Signature change
      (don't return gboolean).
      (stf_init): Adjusted to file i/o interface changes.
      
      src/xml-io.[ch]
      (gnumeric_xml_get_opener, xml_probe):
      s/FileOpener/GnumFileOpener/
      (gnumeric_xml_get_opener):
      s/FileSaver/GnumFileSaver/
      (gnumeric_xml_read_workbook, gnumeric_xml_write_workbook): Signature
      change (don't return gboolean).
      (xml_init): Adjusted to file i/o interface changes.
      33d35aa2
  23. 24 Feb, 2001 1 commit
    • Chyla Zbigniew's avatar
      Added files: plugin-service.[ch], plugin-loader.[ch], · a924975e
      Chyla Zbigniew authored
      
      * src/Makefile.am: Added files:  plugin-service.[ch],
      plugin-loader.[ch], plugin-loader-module.[ch], module-plugin-defs.h.
      
      * src/error-info.[ch] (error_info_new_from_errno): New function.
      
      * src/file.c
      (struct _FileOpener, struct _FileSaver): Moved from file.h
      (file_opener_get_format_description, file_opener_has_probe,
      file_saver_get_extension,  file_saver_get_format_description):
      New accessor functions.
      (file_opener_probe, file_opener_open, file_saver_save,
      file_opener_set_user_data, file_opener_get_user_data,
      file_saver_set_user_data, file_saver_get_user_data): New
      functions.
      (get_file_opener_by_id, get_file_saver_by_id): Removed
      Now using FileOpener*/FileSaver* instead of FileOpenerId/FileSaverId
      everywhere.
      
      * src/file.h
      (struct _FileOpener, struct _FileSaver): Moved to file.c.
      Adjusted to file.c.
      
      * src/gui-file.c: Adjusted to file.[ch], now FileSaver.extension
      field should contain real extension (without a dot).
      
      * src/func.[ch]
      (enum FunctionFlags, struct _FunctionDefinition): Moved from func.h
      to func.c.
      (struct _FunctionCategory): Added "internal_name" and "display_name"
      in place of "name" field.
      (function_get_category_with_translation,
      function_category_remove_func, func_get_ref_count, function_remove,
      function_add_name_only): New functions.
      Now it's possible to load function implementation on demand (after
      registering function using function_add_name_only() and providing
      function of type FunctionGetFullInfoCallback).
      Rename fd and fndef to fn_def for consistency.
      
      * src/functions/fn-database.c (database_functions_init),
      src/functions/fn-date.c (date_functions_init),
      src/functions/fn-eng.c (eng_functions_init),
      src/functions/fn-financial.c (finance_functions_init),
      src/functions/fn-information.c (information_functions_init),
      src/functions/fn-logical.c (logical_functions_init),
      src/functions/fn-lookup.c (lookup_functions_init),
      src/functions/fn-math.c (math_functions_init),
      src/functions/fn-sheet.c (sheet_functions_init),
      src/functions/fn-stat.c (stat_functions_init),
      src/functions/fn-string.c (string_functions_init):
      Use function_get_category_with_translation, instead of
      function_get_category.
      
      * src/plugin.[ch]
      (struct _PluginInfo): Removed many fields.
      (plugin_info_get_extra_info_list):
      Just call gnumeric_plugin_loader_get_extra_info_list.
      (plugin_info_peek_services_data, plugin_info_peek_loader_type_str):
      New accessor functions.
      (plugin_info_read_service_list, plugin_info_read_loader,
      plugin_info_read):
      Read services and loader info, use functions from
      gal/util/e-xml-utils.h everywhere.
      (activate_plugin, deactivate_plugin): Just activate/deactivate all
      plugin services.
      (plugin_can_deactivate): Ask plugin services.
      (plugin_load_service, plugin_unload_service,
      plugin_info_offers_loader_by_type_str,
      plugin_loader_register_type, plugin_loader_register_id_only,
      plugin_loader_get_by_id, plugin_loader_is_available_by_id,
      plugin_list_sort_by_dependency):
      New functions.
      (plugin_db_activate_plugin_list): Activate plugins in correct order,
      using plugin_list_sort_by_dependency function.
      (plugin_info_print): Removed.
      (module_plugin_print_info, module_plugin_info_get_extra_info_list,
      module_plugin_free, module_plugin_info_read, module_plugin_activate,
      module_plugin_deactivate, module_plugin_can_deactivate): Removed,
      most code  moved to plugin-loader.c and plugin-loader-module.c.
      
      * src/plugin-service.[ch]: New files, support for plugin services
      (five types of these so far).
      
      * src/plugin-loader.[ch]: New files, base class for plugin loaders.
      
      * src/plugin-loader-module.[ch]: New files, support for "g_module"
      plugins.
      
      * src/plugin-util.[ch] (gnumeric_fopen_error_info,
      gnumeric_open_error_info, gnumeric_mmap_error_info): New functions.
      
      * src/gutils.[ch] (g_list_free_custom, g_slist_free_custom,
      gnumeric_time_counter_push, gnumeric_time_counter_pop):
      New functions.
      
      * src/io-context-priv.h (struct _IOContext): Added error_info field.
      
      * src/io-context.[ch] (gnumeric_io_context_new,
      gnumeric_io_context_free, gnumeric_io_error_info_set,
      gnumeric_io_error_info_push, gnumeric_io_error_info_pop,
      gnumeric_io_error_info_clear, gnumeric_io_error_info_display,
      gnumeric_io_has_error_info): New functions, quick hack to add
      support for ErrorInfo.
      
      * src/module-plugin-defs.h: New file, should be included be every
      g_module plugin.
      
      * src/auto-format.c: Use accessor function from func.h.
      
      * src/bonobo-io.c (gnumeric_bonobo_write_workbook,
      gnumeric_bonobo_read_workbook, gnumeric_bonobo_io_probe),
      src/stf.c (stf_read_workbook, stf_write_workbook),
      src/xml-io.[ch] (xml_probe, gnumeric_xml_read_workbook,
      gnumeric_xml_write_workbook):
      Signature changes.
      
      * src/workbook.c: Adjusted to
      workbook_load_from/gnumeric_xml_write_workbook signature change.
      
      * src/dialogs/dialog-function-select.c: Adjust to func.[ch].
      
      * src/dialogs/dialog-plugin-manager.c
      Adjust to plugin.[ch].
      (cb_pm_button_activate_plugin_clicked): Check if loader for current
      plugin is available, suggest activating loader plugin otherwise.
      a924975e
  24. 20 Feb, 2001 1 commit
    • Jon K Hellan's avatar
      Add level FILE_FL_MANUAL_REMEMBER. Fix typos: FILE_SAVER_ID_INVAID -> · caa620c4
      Jon K Hellan authored
      2001-02-19  Jon K Hellan  <hellan@acm.org>
      
      	* src/file.h: Add level FILE_FL_MANUAL_REMEMBER. Fix typos:
      	FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID,
      	FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
      
      	* src/file.c (file_format_register_open): Fix typo:
      	FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
      	(file_format_register_save): Fix typo: FILE_OPENER_ID_INVAID ->
      	FILE_SAVER_ID_INVALID.
      	(cb_unregister_save, workbook_save): Fix
      	typo: FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
      
      	* src/workbook.c (workbook_destroy): Only include in history is
      	file_format_level >= FILE_FL_MANUAL_REMEMBER.
      	(workbook_new, workbook_set_saveinfo): Fix typo:
      	FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
      
      	* src/xml-io.c: Fix typos: FILE_SAVER_ID_INVAID ->
      	FILE_SAVER_ID_INVALID, FILE_OPENER_ID_INVAID ->
      	FILE_OPENER_ID_INVALID.
      
      
      	* plugins/applix/boot.c (applix_load): Change file format level to
      	FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
      	FILE_SAVER_ID_INVALID.
      
      
      	* plugins/excel/boot.c (excel_load, excel_init): Change file
      	format level to FILE_FL_MANUAL_REMEMBER.
      
      
      	* plugins/lotus/boot.c (lotus_load): Change file format level to
      	FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
      	FILE_SAVER_ID_INVALID.
      
      	* plugins/oleo/boot.c (oleo_load): Change file format level to
      	FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
      	FILE_SAVER_ID_INVALID.
      
      	* plugins/plan-perfect/pln.c (pln_read_workbook): Fix typo:
      	FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
      
      	* plugins/sc/sc.c (sc_read_workbook): Fix typo:
      	FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
      
      	* plugins/sylk/sylk.c (sylk_read_workbook): Change file format
      	level to FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID
      	-> FILE_SAVER_ID_INVALID.
      
      	* plugins/xbase/boot.c (xbase_load): Change file format level to
      	FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
      	FILE_SAVER_ID_INVALID.
      
      	* plugins/xml2/xml2.c (xml2_open): Change file format level to
      	FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
      	FILE_SAVER_ID_INVALID.
      caa620c4
  25. 14 Feb, 2001 1 commit
  26. 25 Jan, 2001 1 commit
    • Chyla Zbigniew's avatar
      Added error-info.[ch] · fbc4a7c5
      Chyla Zbigniew authored
      
      * src/Makefile.am (GNUMERIC_BASE_SOURCES): Added error-info.[ch]
      
      * error-info.[ch]: New files.
      
      * src/plugin.[ch]: New plugin engine.
      
      * src/dialogs/dialog-plugin-manager.c,
      src/dialogs/plugin-manager.glade,
      src/dialogs/plugin-manager.glade.h:
      New plugin manager.
      
      * src/main.c (gnumeric_main): Call plugins_shutdown() on shutdown.
      
      * src/bonobo-io.c
      (gnumeric_bonobo_write_workbook, gnumeric_bonobo_read_workbook,
      gnumeric_bonobo_io_probe): Added "user_data" arg.
      (gnumeric_bonobo_io_init): Saving saver/opener id.
      
      * src/file-autoft.c (gnumeric_extra_autoformat_dirs): Used
      gnumeric_config_get_string_list function.
      
      * src/file.c
      (file_format_register_open, file_format_register_save): Added
      user_data parameter, return FileOpenerId/FileSaverId.
      (file_format_unregister_open, file_format_unregister_save): Take
      only FileOpenerId/FileSaverId as parameter.
      (get_file_saver_by_id, get_file_opener_by_id): New functions.
      (do_load_from): Pass user_data parameter to "probe" and "open"
      functions.
      (workbook_save_as, workbook_save): Pass user_data parameter to "save"
      function.
      
      * src/file.h
      (FileFormatProbe, FileFormatOpen, FileFormatSave): Adder user_data
      parameter.
      (struct _FileOpener, struct _FileSaver): Added opener_id/saver_id
      field.
      (file_format_register_open, file_format_register_save):
      Added user_data parameter, return FileOpenerId/FileSaverId.
      (file_format_unregister_open, file_format_unregister_save):
      Take only FileOpenerId/FileSaverId as parameter.
      
      * src/gnumeric-util.[ch]
      (gnumeric_error_info_dialog_show, static ctree_insert_error_info):
      New functions displaying dialog with ErrorInfo contents.
      
      * src/gui-file.c (gui_file_import): Pass user_data parameter to
      "open" function.
      
      * src/gutils.[ch]
      New functions: gnumeric_config_get_string_list,
      gnumeric_config_set_string_list, g_string_list_copy,
      g_strsplit_to_list.
      (g_create_list): Added missing va_end().
      
      * src/stf.c (stf_read_workbook, stf_write_workbook): Added user_data
      parameter.
      
      * src/workbook.[ch] (workbook_set_saveinfo): Now takes file_saver_id
      instead of save_fn.
      
      * src/xml-io.c
      (xml_probe, gnumeric_xml_read_workbook, gnumeric_xml_write_workbook):
      Added user_data parameter.
      (xml_init): Store xml_opener_id and xml_saver_id.
      (gnumeric_xml_get_opener_id, gnumeric_xml_get_saver_id): New
      functions.
      fbc4a7c5
  27. 04 Jan, 2001 1 commit
    • Jon K Hellan's avatar
      Add files gui-file.c, gui-file.h · 6f5fd289
      Jon K Hellan authored
      2001-01-04  Jon K Hellan  <hellan@acm.org>
      
      	* src/Makefile.am: Add files gui-file.c, gui-file.h
      
      	* src/file.[ch]: Factor out GUI dependent parts of workbook I/O
      	handling and move to gui-file.[ch].
      	(file_format_get_savers, file_format_get_openers):
      	New functions. Used by GUI to access file saver and file opener
      	lists.
      	(workbook_import): Move to gui-file.[ch].
      	(file_finish_load): Made visible in order to split out the GUI.
      	(workbook_save_as): The old version moved to gui-file.c and was
      	renamed to gui_file_save_as. The new version contains the GUI
      	independent part of the old do_save_as. It has explicit file name
      	and file saver parameters to remaining GUI independent function.
      	(workbook_save): No longer check if it should call
      	workbook_save_as. This happens at the GUI layer. Change control
      	parameter to WorkbookControl.
      
      	* src/file.h (struct _FileOpener, struct _FileSaver): Had to make
      	these visible in order to split out the GUI.
      
      	* src/file.c: Remove file static variable current_saver.
      	(file_format_unregister_save): Do not update current_saver.
      	(workbook_try_read): Report the error if failure.
      	(cb_select, handle_ok, saver_activate,
      	file_saver_is_default_format, fill_save_menu, make_format_chooser,
      	file_dialog_delete_event, fs_key_event, fs_set_filename,
      	wants_to_overwrite, can_try_save_to, dialog_query_load_file): Move
      	to gui-file.c
      
      	* src/gui-file.c, src/gui-file.h: New files. Gui dependent parts
      	of I/O handling moved here from file.[ch].
      	(gui_file_import): New name for workbook_import. Use
      	file_format_get_openers to access file opener list.
      	(is_saver_registered): New function. Check that a given file saver
      	is present in the file saver list.
      	(handle_ok): Fix a bug when changing into directory user entered,
      	and simplify code.
      	(saver_activate, file_saver_is_default_format, fill_save_menu):
      	Use file_format_get_savers to access file saver list.
      	(file_saver_is_default_format, make_format_chooser): Add GUI
      	control parameter.
      	(fill_save_menu): Save GUI control as object data on menu items.
      	(do_save_as): Don't call insure_saver. That check is redundant
      	here. Set view's preferred size to size of control's notebook
      	before saving, so that this size gets saved in workbook.
      	(gui_file_save_as): New name for old workbook_save_as.
      	Verify that control's current saver is still valid before displaying
      	dialog.
      	(dialog_query_load_file): Simplify code to select workbook's
      	directory.
      	(gui_file_save): New function. Set view's preferred size as in
      	do_save_as, then call workbook_save.
      
      	* src/workbook-control-gui.c (cb_autosave, cb_file_save): Call
      	gui_file_save instead of workbook_save.
      	(workbook_close_if_user_permits): Cast wbcg to WorkbookControl
      	before calling workbook_save.
      	(cb_file_import): Call gui_file_import instead of workbook_import.
      	(cb_file_save_as): Call gui_file_save_as instead of
      	workbook_save_as.
      
      	* src/workbook-control-gui-priv.h (struct _WorkbookControlGUI):
      	Add current_saver member. Include file.h.
      6f5fd289
  28. 31 Oct, 2000 1 commit
    • Jody Goldberg's avatar
      Set LC_MONETARY and LC_NUMERIC. Ditto. (xml_workbook_read) : Ditto. · ffac72f5
      Jody Goldberg authored
      
      2000-10-31  Jody Goldberg <jgoldberg@home.com>
      
      	* src/workbook-view.c (wb_view_auto_expr) : Set LC_MONETARY and
      	  LC_NUMERIC.
      	* src/xml-io.c (xml_workbook_write) : Ditto.
      	(xml_workbook_read) : Ditto.
      
      2000-10-31  Jody Goldberg <jgoldberg@home.com>
      
      	* src/dialogs/*.[ch] : WorkbookControlGUI is now required for gui
      	  operations.  A WorkbookView is required to know which sheet is the
      	  current.
      
      	* src/xml-io.c : We now load/save WorkbookViews.
      
      	* src/xml-io-autoft.c : Adjust to signature changes.
      
      	* src/workbook.c : Split the View into WorkbookView.
      	  Abstract the Controler interface, and move the GUI specific
      	  implementation of the Controler into WorkbookControlGUI.
      
      	* src/workbook-view.c : Complete rewrite with correct semantics.
      
      	* src/workbook-private.h : Move all the GUI specific stuff into
      	  WorkbookControlGUI were it belongs.
      
      	* src/workbook-private.c (workbook_private_class_init) : Fix typo.
      
      	* src/workbook-edit.c : These are now WorkbookControlGUI specific.
      	  We should rename the functions eventually.
      	* src/workbook-format-toolbar.c : Ditto.
      	* src/workbook-object-toolbar.c : Ditto.
      
      	* src/workbook-cmd-format.c : Adjust to signature changes.
      	  and use WorkbookControlGUI were necessary.
      
      	* src/style.c (style_font_new_from) : Delete dead code.
      
      	* src/solver-lp.c : Adjust to signature changes.
      	* src/sort.c : Ditto.
      	* src/stf.c : Ditto. Make dialog conditional on gui-ness.
      
      	* src/sheet.c (sheet_new_sheet_view) : IS_SHEET checks for NULL.
      	(sheet_detach_sheet_view) : renamed from sheet_destroy_sheet_view
      	  and only take a SheetView as argument.
      	(sheet_new) : Do not create a view by default.
      	(sheet_update_zoom_controls) : foreach control.
      	(sheet_update_editpos) : ditto.
      	(sheet_update) : handle multiple views and controls.
      
      	* src/sheet-view.c : Commands take WorkbookControls rather than
      	  CommandContexts.
      
      	* src/sheet-object-widget.c : Most things take WorkbookControlGUI
      	  rather than Workbooks.
      
      	* src/sheet-object-container.c (sheet_object_container_new_view) :
      	  Use the uic from the WorkbookControlGUI.
      
      	* src/sheet-control.c : New file. Unused so far.
      	  cp sheet-view.c sheet-control.c
      	  s/SheetView/SheetControl/
      
      	* src/print.c : Make the GUI dependency explicit.
      	  At some point the setup dialog should be split out of here.
      
      	* src/main.c (gnumeric_main) : Explicitly create a WorkbookControlGUI
      	  only adding sheets if nothing was loaded.  Improve handing of exit
      	  request while loading.
      
      	* src/item-grid.c (item_grid_draw) : Filter the edit cell from here
      	  because we know which control to use.
      	(context_menu_hander) : Switch to WorkbookControlGUI.
      	(item_grid_popup_menu) : Ditto.
      
      	* src/item-edit.c : Everything takes a WorkbookControlGUI inplace of a
      	  Workbook now.
      
      	* src/item-cursor.c (item_cursor_target_region_ok) : dialog_run takes
      	  a WorkbookControlGUI.
      	(item_cursor_do_action) : All the commands take WorkbookControls.
      
      	* src/item-bar.c (item_bar_event) : item_grid_popup_menu takes a
      	  SheetView now.
      
      	* src/history.c : Take WorkbookControlGUI.
      	  Update all controls for each workbook.
      
      	* src/gui-clipboard.c : Use 'unsigned char'
      
      	* src/gnumeric.xml : More work to split commands from layout.
      
      	* src/gnumeric-util.c (gnumeric_no_modify_array_notice) : Delete.
      	(gnumeric_notice) : Take a WorkbookControlGUI.
      	(gnumeric_wb_dialog_run) : Ditto.
      	(gnumeric_dialog_run) : Ditto.
      	(gnumeric_dialog_show) : Ditto.
      	(gnumeric_set_transient) : Ditto.
      	(gnumeric_glade_xml_new) : Ditto.
      	(gnumeric_non_modal_dialog) : Ditto.
      	(gnumeric_inject_widget_into_bonoboui) : Ditto.
      
      	* src/gnumeric-sheet.c : SheetView now has a WorkbookControlGUI member
      	  to keep track of which control it is associated with. Use it.
      
      	* src/file.c : Adjust to lots of signature changes.
      	  We now load/save WorkbookView rather than Workbook.
      	  Add a placeholder struct IOContext so that we can consider doing
      	  smarter import/export and dealing with warnings and missing things
      	  smoothly.
      
      	* src/eval.c (workbook_recalc_all) : After a recalc update all views.
      
      	* src/commands.c (undo_redo_menu_labels) : foreach control.
      	(command_undo) : ditto.
      	(command_redo) : ditto.
      	(command_push_undo) : change signature.  The workbookcontrol
      	  now acts as the command context.
      
      	* src/cmd-edit.c : Adjust to signature changes.
      
      	* src/clipboard.c : split the gui specific X handlers out into a new
      	  file.
      	* src/gui-clipboard.c :  here.
      
      	* src/cell-draw.c (cell_draw) : Do not test the sheet for whether or
      	  not to we are editing.  That is at the control level.  Test it in
      	  the rendering loop.
      
      	* src/bonobo-io.c : FIXME. adjusted to signature changes.  Totatly
      	  broken for now.  This needs a View rather than a Model and should be
      	  associated with something.
      
      	* src/application.c (application_workbook_list_add) : New function.
      	(application_workbook_list_remove) : New function.
      	(application_workbook_list) : New function.
      	(application_clipboard_copy) : foreach control.
      	(application_clipboard_cut) : foreach control.
      	(application_clipboard_clear) : foreach control.
      	(application_workbook_foreach) : renamed from workbook_foreach.
      	(application_set_selected_sheet) : FIXME. Disabled for now.
      
      	* src/about.c (cb_closed) : Associated the flag with the control
      	  directly.
      	(dialog_about) : dialogs are associated with gui-controls.
      
      	* src/analysis-tools.c : change all dialog signatures to handle MVC
      	  split of workbook.
      
      2000-10-30  Jody Goldberg <jgoldberg@home.com>
      
      	* src/Makefile.am : Add new command-context,  io-context,
      	  workbook-view, workbook-control, workbook-control-gui files.
      	  Remove old command-context-gui, command-context-corba, and disable
      	  corba-* for now.
      
      2000-10-29  Jody Goldberg <jgoldberg@home.com>
      
      	* idl/gnumeric-graphs.idl : Remove studdly caps.  I wish people would
      	  make up their minds.
      
      	* idl/Gnumeric.idl : Remove Workbook::show.
      
      2000-10-29  Jody Goldberg <jgoldberg@home.com>
      
      	* BUGS : Update.
      	* NEWS : Update.
      	* TODO : Update.
      ffac72f5
  29. 21 Aug, 2000 1 commit
    • Jody Goldberg's avatar
      Improve regexps. · 9ad38a63
      Jody Goldberg authored
      
      2000-08-21  Jody Goldberg <jgoldberg@home.com>
      
      	* src/number-match.c (format_create_regexp) : Improve regexps.
      
      	* src/formats.c (cell_format_is_number) : Format always uses standard
      	  decimal chars.
      
      	* src/format.c (gnumeric_setlocale) : New routine that clears cached
      	  locale info.
      	(format_get_decimal) : Improve use mon_decimal.
      	(format_get_thousand) : Improve use mon_thousands_sep.
      	(format_get_arg_sep) : New func.
      	(format_get_col_sep) : New func.
      	(format_destroy) : Use GPtrArray.
      	(render_number) : Improve localization.
      	(format_add_thousand) : rename format_toggle_thousands. De-localize.
      	(find_decimal_char) : De-localize.
      	(format_remove_decimal) : Ditto.
      	(format_add_decimal) : Ditto.
      	(format_number) : Ditto.
      
      	* src/expr.c (do_expr_tree_to_string) : Use format_get_arg_sep.
      
      	* src/cell.c (cell_get_format) : Update for the changes to StyleFormat.
      
      	* src/auto-format.c (auto_style_format_suggest) :
      	  style_format_new -> style_format_new_XL
      
      	* src/mstyle.c (mstyle_element_dump) : There is no direct access to
      	  the format string anymore.
      	(mstyle_set_format_text) : Add a warning.
      
      	* src/gutils.[ch] (float_get_from_range) : Delete.
      	(int_get_from_range) : Ditto.
      
      	* src/parser.y : Revamp lexer to use strtol, and strtod for number
      	  parsing.  Begin hooks for supporting row & col selection. (3:4 or A:B)
      
      	* src/print-info.c (render_value_with_format) : Changes to StyleFormat.
      
      	* src/sheet.h : Move SpanCalcFlags.
      	* src/gnumeric.h : here.
      
      	* src/style.[ch] : Privatize StyleFormat, move it to format.[ch]
      
      	* src/value.c (value_get_as_string) : Correctly localize things for
      	  output.
      
      	* src/workbook-format-toolbar.c (modify_cell_format) : format
      	  modification callback modifies the StyleFormat.
      
      	* src/workbook.c (workbook_set_auto_expr) : Use gnumeric_setlocale.
      
      	* src/xml-io.c (xml_workbook_read) : Use gnumeric_setlocale.
      	(xml_workbook_write) : Ditto.
      	(xml_read_cell) : Use style_format_new_XL.
      	(xml_write_cell_and_position) : Store the number formats in non localized XL form.
      	(xml_write_style) : Ditto.
      
      	* src/dialogs/dialog-cell-format.c (fmt_dialog_init_format_page) :
      	  Display localized number formats.
      	(fillin_negative_samples) : Not need to localize generated number
      	  formats.
      
      	* src/dialogs/dialog-function-wizard.c (formula_guru_set_expr) : Use
      	  format_get_arg_sep.
      
      	* src/dialogs/dialog-stf-format-page.c
      	  (stf_dialog_format_page_prepare) : StyleFormats are now explicitly
      	  stored in a locale neutral format.
      
      	* src/functions/fn-string.c (gnumeric_text) : changes to
      	  style_format_new.
      
      	* src/functions/fn-financial.c (coupdayb) : Silence some warnings.
      
      	* src/functions/fn-information.c (translate_cell_format) : This should
      	  now work for different locales.
      
      2000-08-18  Jody Goldberg <jgoldberg@home.com>
      
      	* src/number-match.c (compute_value) : Extend the match algorithms to
      	  handle the new regexps.
      
      	* src/format.c (format_get_thousand) : provide a better default for
      	  countries using ',' as a decimal point.
      9ad38a63
  30. 23 Mar, 2000 1 commit
    • Jon K Hellan's avatar
      Add "level" parameter. · 16e00012
      Jon K Hellan authored
      2000-03-23  Jon K Hellan  <hellan@acm.org>
      
      	* src/file.[ch] (file_format_register_save): Add "level" parameter.
      
      	* src/file.h: (FileFormatLevel): Add the enum. At the best level,
      	the save command saves to the given name without asking.  At the
      	worst level, no name has been assigned.
      
      	* src/file.c (_FileSaver): Add "level" member.
      	(file_format_unregister_save): Set level to manual for workbooks
      	which had this saver set.
      	(cb_unregister_save): New function. Helper for
      	file_format_unregister_save.
      	(workbook_read): Set save info. Tag as new.
      	(workbook_import): No longer set needs_name - importer will have
      	set file_format_level.
      	(fs_set_filename): New function: Set default filename in the file
      	selection dialog.
      	(workbook_save_as): Use fs_set_filename. Set save info.
      	(workbook_save): Punt to workbook_save_as if file_format_level <
      	AUTO. Save using wb->file_save_fn.
      
      	* src/workbook.[ch] (workbook_set_saveinfo): New function. Set
      	filename, level and save function, but do nothing if we already
      	have info at a higher level.
      
      	* src/workbook.h (struct _Workbook): Replace needs_name with
      	file_format_level. Add file_save_fn member. Include file.h
      	(workbook_set_saveinfo): Add "level" parameter.
      
      	* src/workbook.c (workbook_do_destroy): Insert in history list
      	when file format level > "new". We used to test needs_name.
      	(workbook_is_pristine): Test file_format_level > "new" instead of
      	needs_name true.
      	(workbook_new): Tag workbook as new. Set save function.
      	(workbook_set_filename): needs_name has no longer exists. Don't
      	set it.
      
      	* src/xml-io.c (gnumeric_xml_read_workbook): Set save info. Tag as
      	AUTO.
      	(xml_init): Tag saver as AUTO.
      
      	* src/corba-workbook.c (Workbook_set_filename): Add FIXME comment.
      
      	* src/history.c (history_item_label): Strip extension only when it
      	is ".gnumeric".
      
      	* plugins/dif/dif.c (dif_read_workbook): Set save info, tag as manual.
      	(init_plugin): Tag saver as manual
      
      	* plugins/ecel/boot.c (excel_load): No longer add ".gnumeric"
              to filename. Set save info. Tag filename as MANUAL. We could
              make it AUTO soon.
      	(excel_init): Tag saver as MANUAL.
      
      	* plugins/ff-csv/csv-io.c (csv_read_workbook): Set save info,
              tag as MANUAL.
      	(init_plugin): Tag saver as MANUAL.
      
      	* plugins/html/boot.c (html_init): Tag html savers as AUTO,
              the others as WRITE_ONLY.
      
      	* plugins/lotus-123/boot.c (lotus_load): No longer change
              filename extension to ".gnumeric". Set save info, tag as manual.
      	(LOTUS_TITLE, LOTUS_DESCR): No, we haven't got export.
      
      	* plugins/oleo/boot.c (oleo_load): No longer change filename
              extension to ".gnumeric". Set save info. Tag as MANUAL.
      	(OLEO_DESCR): Fix typo.
      
      	* plugins/plan-perfect/pln.c (pln_read_workbook): Set
              filename, tag it as MANUAL.
      
      	* plugins/sc/sc.c (sc_read_workbook): Set save info, tag as MANUAL.
      
      	* plugins/sylk/sylk.c (sylk_read_workbook): Set save info,
              tag as MANUAL
      
      	* plugins/text/text-io.c (text_read_workbook): Set save info.
              Tag as MANUAL.
      	(text_init): Tag saver as MANUAL.
      
      	* plugins/xbase/boot.c (xbase_load): No longer change filename
              extension to ".gnumeric". Set save info. Tag as MANUAL.
      	(XBASE_TITLE, XBASE_DESCR): No, we haven't got export.
      16e00012
  31. 28 Jan, 2000 1 commit
    • Jon K Hellan's avatar
      Megacommit. · 333a8167
      Jon K Hellan authored
      2000-01-29  Jon K Hellan  <hellan@acm.org>
      
      	Megacommit.
      
      	The purpose of the changeset is twofold:
      
      	1. Use CommandContexts for error reporting for file read/save.
      	2. This allows us to let FileFormatOpen return 0 on success, -1 on
      	   failure, same as FileFormatSave. The convention to return NULL
      	   on success was highly ideosyncratic.
      
      	* src/file.h (FileFormatOpen, FileFormatSave, workbook_load_from,
      	workbook_import): Add CommandContext
      	(FileFormatOpen, workbook_load_from): Return int instead of char*.
      
      	* src/file.c (workbook_load_from, workbook_try_read,
      	workbook_read, workbook_import, workbook_save_as, workbook_save)
      	(file_error_message): Remove function
      	(workbook_read, workbook_load_from, workbook_save_as,
      	workbook_save): Do not display message, message, plugin does -
      	using CommandContext.
      	(workbook_load_from): Return int instead of char*.
      	(workbook_load_from, workbook_import): fo->open returns int
      	instead of char*.
      	(workbook_try_read): Remove msg paramenter
      
      	* src/workbook.c (workbook_persist_file_load,
      	workbook_persist_file_save): Use workbook_command_context_gui.
      	(file_import_cmd): ditto
      	(file_open_cmd): ditto
      
      	* src/gnumeric-sheet.c (gnumeric_sheet_filenames_dropped): Use
      	workbook_command_context_gui. Call workbook_try_read without msg
      	argument.
      
      	* src/workbook.h (workbook_try_read, workbook_read,
      	workbook_save_as, workbook_save): Add command context
      	(workbook_try_read): Remove msg paramenter
      
      	* src/dialogs/dialog-autosave.c (dialog_autosave_callback):
      	ditto
      
      	* src/command-context.[ch] (gnumeric_error_read,
      	gnumeric_error_save): New functions.
      
      	* src/command-context-corba.c (ccc_error_read, ccc_error_save):
      	Ditto.
      	(ccc_init_class): Initialize error_read, error_save.
      
      	* src/command-context-gui.c (ccg_error_read, ccg_error_save):
      	Ditto.
      	(ccg_init_class): Initialize error_read, error_save.
      
      	* src/main.c (gnumeric_main): Make a CommandContext for use before
      	we make first workbook. Unref it when no longer needed. Call
      	plugins_init and workbook_read with CommandContext.
      
      	* src/plugin-manager.c (add_cb): Use gnumeric_error_plugin_problem.
      	(remove_cb): Ditto.
      
      	* src/plugin.c (plugin_load, plugin_unload): CommandContext
      	instead of workbook.
      	(plugins_init): Add CommandContext.
      
      	* src/plugin.c (plugin_load, plugin_unload): CommandContext
      	instead of workbook.
      	(plugin_unload): Use gnumeric_error_plugin_problem.
      	(plugin_load_plugins_in_dir, load_all_plugins, plugins_init): Add
      	CommandContext.
      
      	* src/xml-io.h:  ditto
      
      	* src/xml-io.c (gnumeric_xml_read_workbook,
      	gnumeric_xml_write_workbook):  ditto
      
      In plugins/dif:
      
      	* dif.c (dif_read_workbook, dif_write_workbook): Add
      	CommandContext.
      	(dif_read_workbook): Return 0 on success, -1 on failure.
      	 Use gnumeric_error_read to report errors.
      
      In plugins/excel:
      
      	* excel.h (ms_excel_read_workbook, ms_excel_write_workbook) Add
      	CommandContext. Return int.
      
      	* ms-excel-read.c (ms_excel_read_workbook): Add
      	CommandContext. Return 0 on success, -1 on failure. Use
      	gnumeric_error_read to display messages.
      
      	* ms-excel-write.c (write_sheet): Check max no. of rows for the
      	format.
      	(new_sheet): Return the ExcelSheet. Let caller add it to
      	wb->sheets.
      	(pre_pass): Add CommandContext.
      	(free_workbook): New function, previously in write_workbook.
      	(write_workbook): Change parameter from Workbook to ExcelWorkbook.
      	Move deallocation to free_workbook.
      	(check_sheet): New function. Check if we are able to save the
      	sheet.
      	(ms_excel_check_write): New function. Check if we are able to save
      	to the file. Do initialization previously in
      	ms_excel_write_workbook.
      	(ms_excel_write_workbook): Add CommandContext. Add state. Change
      	wb from Workbook to ExcelWorkbook. Use gnumeric_error_save to
      	report problems. Return 0 on success, -1 on failure.
      
      	* ms-excel-biff.h: Define enum for max no. of rows. Fix typo.
      
      	* boot.c (excel_load, excel_save, excel_save_98, excel_save_95):
      	Add CommandContext.
      	(excel_load): Return 0 on success, -1 on failure.
      	Use gnumeric_error_read to display messages. Remove "Opening .. "
      	message on stdout.
      	(excel_probe_write): New function. Check if we are able to save to
      	the file.
      	(excel_save): Use gnumeric_error_save to display messages.
      	Return 0 on success, -1 on failure.
      
      In plugins/ff-csv:
      
      	* csv-io.c (csv_read_workbook, csv_write_workbook,
      	csv_parse_sheet, csv_parse_field): Add CommandContext. Return 0 on
      	success, -1 on failure. Use gnumeric_error_read to report errors.
      
      In plugins/ff-stf:
      
      	* dialog-stf.h: Add CommandContext. Return int.
      
      	* dialog-stf.c (dialog_stf) : Add CommandContext. Return 0 on success,
      	-1 on failure. Use gnumeric_error_read to report errors.
      
      	* stf.c (stf_read_workbook): Ditto.
      
      In plugins/html:
      
      	* epsf.h (epsf_write_wb): Add CommandContext.
      
      	* epsf.c (epsf_write_wb): ditto.
      
      	* latex.h (html_write_wb_latex, html_write_wb_latex2e): ditto
      
      	* latex.c (html_write_wb_latex, html_write_wb_latex2e): ditto
      
      	* roff.c (html_write_wb_roff_ps, html_write_wb_roff_dvi,
      	html_write_wb_roff_pdf, html_write_wb_roff): ditto
      
      	* roff.c (html_write_wb_roff_ps, html_write_wb_roff_dvi,
      	html_write_wb_roff_pdf, html_write_wb_roff): ditto
      
      	* html.h (html_read, html_write_wb_html40, html_write_wb_html32):
      	ditto.
      	(html_read): Return int.
      
      	* html.c (html_read, html_write_wb_html40, html_write_wb_html32):
      	ditto
      	(html_read): Return 0 on success, -1 on failure. Use
      	gnumeric_error_read to report errors.
      
      In plugins/lotus-123:
      
      	* lotus.c (lotus_read): Add CommandContext. Return 0 on success,
      	-1 on failure. Use gnumeric_error_read to report errors. Close
      	file unconditionally.
      	(read_workbook): Return 0 on success, -1 on failure. Remove unused
      	panic_message variable.
      
      	* lotus.h (lotus_read): Add CommandContext. Return int.
      
      	* boot.c (lotus_load): Ditto
      
      In plugins/oleo:
      
      	* oleo.c (oleo_read): Add CommandContext. Return 0 on success,
      	-1 on failure. Use gnumeric_error_read to report errors.
      
      	* oleo.h (oleo_read): Add CommandContext. Return int.
      
      	* boot.c (oleo_load): Ditto.
      
      In plugins/plan-perfect:
      
      	* pln.c (pln_parse_sheet, pln_read_workbook): Add
      	CommandContext. Return 0 on success, -1 on failure. Use
      	gnumeric_error_read to report errors.
      
      In plugins/sc:
      
      	* sc.c (sc_read_workbook, sc_parse_sheet): Add
      	CommandContext. Return 0 on success, -1 on failure.  Use
      	gnumeric_error_read to report errors.
      
      In plugins/sylk:
      
      	* sylk.c (sylk_read_workbook, sylk_parse_sheet): Add
      	CommandContext. Return 0 on success, -1 on failure. Use
      	gnumeric_error_read to report errors.
      
      In plugins/text:
      
      	* text-io.c (text_read_workbook, text_write_workbook,
      	readTextWorkbook): Add CommandContext.
      	(text_read_workbook, readTextWorkbook): Return 0 on success, -1 on
      	failure.
      	(readTextWorkbook): Use gnumeric_error_read to report errors.
      
      In plugins/xbase:
      
      	* xbase.h (xbase_open): Add CommandContext.
      
      	* xbase.c (xbase_open): Add CommandContext. Remove progress
      	message to stdout. Use gnumeric_error_read to report errors.
      
      	* boot.c (xbase_load): Add CommandContext. Return 0 on success, -1
      	on failure.
      333a8167
  32. 30 Dec, 1999 1 commit
    • Jody Goldberg's avatar
      Have the file loaders return error messages. · 661da0e0
      Jody Goldberg authored
      1999-12-30  Jody Goldberg <jgoldberg@home.com>
      
      	* src/file.c (workbook_load_from) : The 'open' functions return error
      	  strings now.  Success == NULL, standard error == "", custom error
      	  which needs to be freed is everything else.
      	(workbook_try_read) : An optional argument in which to store error
      	  messages returned by the loaders.
      	(file_error_message) : Support the custom error messages.
      	(workbook_read) : Ditto.
      
      	* src/xml-io.c (xml_workbook_read) : Return simple error strings.
      661da0e0
  33. 17 Dec, 1999 1 commit
    • Jody Goldberg's avatar
      Fix a few bugs. Flag a few bugs. Start on the exception handling · 5784bf05
      Jody Goldberg authored
      * Fix a few bugs.
      * Flag a few bugs.
      * Start on the exception handling mechanism.
      * Move many typedefs into gnumeric.h to start the process
        of decoupling the headers.
      
      1999-12-17  Jody Goldberg <jgoldberg@home.com>
      
      	* src/cell.c (cell_cleanout) : Publicize.
      
      	* src/sheet.c (clear_cell_content) : Delete.
      	(sheet_clear_region_content) : Use sheet_clear_region but leave the
      	  styles in place.
      
      1999-12-15  Jody Goldberg <jgoldberg@home.com>
      
      	* src/gnumeric.h : Move many of the typedefs here.
      
      	* src/dialogs/dialog-cell-sort.c (dialog_cell_sort) : Tweak some
      	  const issues and minor logic problems at the boundaries.
      
      1999-12-14  Jody Goldberg <jgoldberg@home.com>
      
      	* src/workbook-view.c (command_context_gui) : New function.
      
      	* src/main.c (gnumeric_main) : Add a 'quit' flag for use in testing.
      	  It causes the app to exit immediately after loading all the selected
      	  books.
      
      	* src/file.c (workbook_import) : Bug 3977.
      
      	* src/corba-sheet.c (command_context_corba) : New function
      	  temporarily located here.
      	(Sheet_selection_copy) : Pass a CommandContext.
      	(Sheet_selection_cut) : Ditto
      	(Sheet_selection_paste) : Ditto
      	(Sheet_clear_region) : Ditto
      	(Sheet_clear_region_content) : Ditto
      	(Sheet_insert_col) : Ditto
      	(Sheet_delete_col) : Ditto
      	(Sheet_insert_row) : Ditto
      	(Sheet_delete_row) : Ditto
      	(Sheet_shift_rows) : Ditto
      	(Sheet_shift_cols) : Ditto
      
      	* src/item-cursor.c (item_cursor_do_action) : Ditto.
      
      	* src/item-grid.c (context_cut_cmd) : Ditto.
      	(context_cut_cmd) : Ditto.
      	(context_copy_cmd) : Ditto.
      	(context_paste_cmd) : Ditto.
      	(context_paste_special_cmd) : Ditto.
      	(context_clear_cmd) : Ditto.
      
      	* src/clipboard.[ch] (do_clipboard_paste_cell_region) : Take a
      	  CommandContext.
      	(sheet_paste_selection) : Ditto.
      	(clipboard_paste_region) : Ditto.
      
      	* src/selection.c (segments_intersect) : Return additional state 5
      	  to designate equality.
      	(selection_apply) : Use the equality state to simplify state selection.
      	(selection_is_simple) : Use a command context.
      	(sheet_selection_copy) : Ditto.
      	(sheet_selection_cut) : Ditto.
      	(sheet_selection_paste) : Ditto.
      	(sheet_selection_clear) : Ditto.
      	(sheet_selection_clear_content) : Ditto.
      	(sheet_selection_clear_comments) : Ditto.
      	(sheet_selection_clear_formats) : Ditto.
      
      	* src/workbook.c (copy_cmd) : Ditto.
      	(cut_cmd) : Ditto.
      	(paste_cmd) : Ditto.
      	(paste_special_cmd) : Ditto.
      	(insert_cols_cmd) : Ditto.
      	(insert_rows_cmd) : Ditto.
      	(clear_all_cmd) : Ditto.
      	(clear_formats_cmd) : Ditto.
      	(clear_comments_cmd) : Ditto.
      	(clear_content_cmd) : Ditto.
      
      	* src/dialogs/dialog-delete-cells.c (dialog_delete_cells_impl) :
      	  Ditto.
      	(dialog_delete_cells) : Ditto.
      
      	* src/dialogs/dialog-insert-cells.c (dialog_insert_cells_impl) :
      	  Ditto.
      	(dialog_insert_cells) : Ditto.
      5784bf05
  34. 15 Dec, 1999 1 commit
  35. 11 Aug, 1999 1 commit
    • Miguel de Icaza's avatar
      Handle locale switching here. (xml_workbook_read): Handle locale switching · b4129181
      Miguel de Icaza authored
      1999-08-09  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/xml-io.c (xml_workbook_write): Handle locale switching here.
      	(xml_workbook_read): Handle locale switching here.
      
      	* src/file.c: Removed all references to saving and re-setting the
      	locale.  This should be handled in the xml-io code.
      
      1999-08-10  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/workbook.c (workbook_do_destroy): remove g_free from the
      	workbook.  We are now a GtkObject.
      
      1999-08-09  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/xml-io.c (xml_workbook_write): Move the locale
      	setting/resetting here, instead of putting it all over the place.
      
      1999-08-09    <miguel@gnu.org>
      
      	* src/xml-io.c (xml_workbook_read): Adjusted to use the new file
      	open convention.
      
      	* src/file.h: File open methods now take a workbook as an argument
      	instead of creating it themselves.  Required for the
      	GNOME::Persist bonobo interfaces.
      
      	* src/file.c (workbook_read): Fix the workbook creation order to
      	keep the locale correct if the file did not exist.
      b4129181
  36. 05 Jul, 1999 1 commit
    • Miguel de Icaza's avatar
      Only print the headers and sides · 63c3dfcc
      Miguel de Icaza authored
      
      1999-07-05  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/print.c: Only print the headers and sides
      
      	* plugins/text/text-io.c (text_cleanup_plugin): Kill probing here.
      	(text_init): kill probing here as well.
      	(text_parse_file): kill probing support here as well.
      	(text_parse_file): Do not use first line as sheet name.
      
      	* src/file.c (workbook_import): Added import dialog box.
      	(workbook_read): Now does only probe for existing probe routines.
      	(file_format_register_open): probe function being NULL now means
      	that this is not an auto-probe filter, but an import filter (ie,
      	the user has to manually select the file).
      
      1999-07-04  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/file.c (file_format_register_open): Allow the probe_fn to be NULL.
      
      	* src/workbook.c (import_file_cmd): Added import menu item.
      
      1999-07-05  Miguel de Icaza  <miguel@gnu.org>
      
      	* csv-io.c (csv_read_workbook): Load here now.
      	(init_plugin): Do not provide a probing routine.
      63c3dfcc
  37. 22 May, 1999 1 commit
  38. 30 Apr, 1999 1 commit
  39. 28 Dec, 1998 1 commit
    • Miguel de Icaza's avatar
      Now we have support for registering/unregistering file opening and saving · ca92de93
      Miguel de Icaza authored
      
      
      Now we have support for registering/unregistering file opening
      and saving formats.
      
      Miguel.
      
      1998-12-28  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* plugins/excel/boot.c: New file, this holds the probing and load
      	wrapper code for Gnumeric to use as well as the initial format
      	registering code.
      
      	* src/xml-io.c (xml_probe): New routine, used to probe if a file
      	is a Gnumeric-xml file.
      
      	* src/file.c (file_format_register_open,
      	file_format_unregister_open, file_format_register_save,
      	file_format_unregister_save): New routines used to register and
      	unregister file formats in Gnumeric.
      
      	* src/main.c (main): Boot xml and excel formats, since they now
      	need to register themselves with the file.c code
      ca92de93