1. 21 May, 2001 1 commit
    • 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
  2. 07 May, 2001 1 commit
    • Chyla Zbigniew's avatar
      Improved plugin system performance & scalability: - reading plugin · 4e17aadc
      Chyla Zbigniew authored
      
      Improved plugin system performance & scalability:
      - reading plugin information from file only if necessary
        (usually when activating a plugin)
      - some minor optimizations (using hashes instead of lists, etc.)
      
      * src/Makefile.am
      (GNUMERIC_BASE_SOURCES): Sorted some items.
      
      * src/gutils.h (g_list_to_vector_custom): New macro.
      
      * src/plugin.c:
      Made some functions static.
      s/plugin_loader_get_by_id/plugin_loader_get_type_by_id/
      (struct _PluginInfo): Added has_full_info field.
      (get_file_state_as_string, plugin_file_state_as_string,
      plugin_file_state_from_string, plugin_file_state_free,
      plugin_cache_init, plugin_cache_shutdown):
      New functions, support for caching information about plugin ids
      stored in XML files (together with modification dates).
      (plugin_info_read_full_info_if_needed_error_info,
      plugin_info_read_full_info_if_needed): New functions loading missing
      plugin information from file if necessary.
      (plugin_info_read):
      Use existing PluginInfo struct rather than creating a new one,
      take XML file name (not parsed XML tree) as an argument.
      (plugin_info_new_from_xml):
      New function, creates new PluginInfo struct from XML file (using
      plugin_info_read).
      (plugin_info_new_with_id_and_dir_name_only):
      New function, creates new PluginInfo struct with only plugin id and
      directory name given (sets has_full_info to FALSE).
      (plugin_info_get_name, plugin_info_get_description,
      plugin_info_get_extra_info_list, plugin_info_is_active,
      plugin_info_peek_name, plugin_info_peek_description,
      plugin_info_peek_loader_type_str,
      plugin_info_provides_loader_by_type_str,
      plugin_info_is_loaded, plugin_info_peek_services_data,
      plugin_info_get_loader,
      plugin_inc_dependants, plugin_dec_dependants,
      plugin_dependencies_inc_dependants,
      plugin_dependencies_dec_dependants,
      plugin_get_loader_if_needed, activate_plugin, deactivate_plugin,
      plugin_can_deactivate, plugin_info_force_mark_inactive,
      plugin_load_service, plugin_unload_service,
      plugin_load_dependencies):
      Read full plugin information if needed.
      (plugin_info_free):
      Don't try to free most data if has_full_info == FALSE.
      (plugin_info_list_read_for_dir):
      Return one PluginInfo instead of a list, create incomplete
      PluginInfo (using plugin_info_new_with_id_and_dir_name_only) if
      found a directory in plugin_file_state_dir_hash.
      (plugin_info_list_read_for_subdirs_of_dir):
      Don't check if current file is a directory (it'll be detected
      anyway).
      (plugin_db_get_known_plugin_id_list,
      plugin_db_extend_known_plugin_id_list, plugin_db_is_known_plugin,
      plugin_db_get_saved_active_plugin_id_list,
      plugin_db_is_saved_active_plugin):
      Removed.
      (plugin_db_get_available_plugin_info_list): Just return
      available_plugin_info_list, never fail.
      (plugin_db_mark_plugin_for_deactivation,
      plugin_db_is_plugin_marked_for_deactivation, plugins_shutdown):
      Use hash table (plugins_marked_for_deactivation_hash) instead of
      a list.
      (plugin_db_init): Initialize available_plugin_info_list and
      saved_active_plugin_id_list here, use a hash table when detecting
      new plugins.
      (plugins_init): Call plugin_cache_init.
      (plugins_init): Call plugin_cache_shutdown.
      
      * src/plugin.h
      (plugin_info_read, plugin_info_print, plugin_info_list_read_for_dir,
      plugin_info_list_read_for_subdirs_of_dir,
      plugin_info_list_read_for_subdirs_of_dir_list,
      plugin_info_list_read_for_all_dirs,
      plugin_db_extend_known_plugin_id_list, plugin_db_is_known_plugin,
      plugin_db_extend_saved_active_plugin_id_list,
      plugin_db_is_saved_active_plugin,
      plugin_db_activate_saved_active_plugins):
      Removed (most of them are now static functions).
      
      * src/plugin-service.c
      (plugin_service_file_saver_initialize): Fixed serious typo.
      
      * src/dialogs/dialog-plugin-manager.c
      (cb_pm_button_activate_plugin_clicked,
      cb_pm_button_activate_all_clicked,
      cb_pm_button_deactivate_all_clicked,
      update_plugin_manager_view): Adjusted to
      plugin_db_get_available_plugin_info_list signature change.
      
      * plugins/applix/plugin.xml, plugins/dif/plugin.xml,
      plugins/excel/plugin.xml, plugins/gb/plugin.xml,
      plugins/gda/plugin.xml, plugins/gnome-glossary/plugin.xml,
      plugins/guile/plugin.xml, plugins/html/plugin.xml,
      plugins/lotus-123/plugin.xml, plugins/numtheory/plugin.xml,
      plugins/oleo/plugin.xml, plugins/perl/plugin.xml,
      plugins/plan-perfect/plugin.xml, plugins/py-func/plugin.xml,
      plugins/python/plugin.xml, plugins/python-loader/plugin.xml,
      plugins/sc/plugin.xml, plugins/sylk/plugin.xml,
      plugins/xbase/plugin.xml, plugins/xml_sax/plugin.xml:
      Removed <gnumeric_plugin_group> tags. Now every directory may contain
      only one plugin.
      4e17aadc
  3. 04 May, 2001 1 commit
    • Jody Goldberg's avatar
      s/clipboard_release/cellregion_free/ s/range_copy/range_dup/ · 32bde6ee
      Jody Goldberg authored
      
      2001-05-04  Jody Goldberg <jgoldberg@home.com>
      
      	s/clipboard_release/cellregion_free/
      	s/range_copy/range_dup/
      	s/cell_region_render_ascii/cellregion_to_string/
      	s/clipboard_release/cellregion_free/
      
      	* src/commands.c (cmd_autofill) : Use sheet_range_contains_region.
      	(cmd_autofill_redo) : no need to test here.
      	(cmd_paste_cut) : test destination for validity and ensure that it
      	  does not slice up any merged regions or arrays.  Make the descriptor
      	  an argument so that other commands can use this one.
      	(cmd_ins_del_colrow_redo) : use colrow_max.
      	(cmd_area_set_text_redo) : use sheet_ranges_split_region.
      	(cmd_colrow_outline_change) : suppress warning.
      
      	* src/gui-clipboard.c (x_selection_to_cell_region) : simplify by using
      	  some of the convenience routines.
      
      	* src/gutils.c (gnumeric_sys_data_dir) : warning suppression.
      	(gnumeric_sys_lib_dir) : ditto.
      
      	* src/item-bar.c (item_bar_draw) : add missing warning.
      
      	* src/item-cursor.c (item_cursor_drag_event) : Don't assume the
      	  release came from the button that started the grab (think about
      	  multiple simultaneous button downs.
      	(item_cursor_selection_event) : ditto.
      	(item_cursor_do_drop) : changes to selection_first_range.
      
      	* src/parse-util.c (col_name_internal) : new routine split from
      	  col_name with better buffer handling.
      	(col_name) : used here.
      	(cols_name) : and in this new function.
      
      	* src/print.c (sheet_print_selection) : changes to
      	  selection_first_range.
      
      	* src/print-info.c (print_info_new) : default even_if_only_styles to
      	  false.  This is probably what most people want.
      
      	* src/ranges.c (range_translate) : don't invert.
      	(range_height) : new util.  could probably be #define.
      	(range_width) : new util.  could probably be #define.
      	(range_is_infinite) : use range_is_full.
      	(range_is_full) : new util.
      
      	* src/search.c (calculate_replacement) : warning suppression.
      
      	* src/selection.c (sheet_selection_cut) : Use
      	  sheet_range_splits_region and selection_first_range.
      	(sheet_selection_copy) : Use selection_first_range and remove TODO
      	  about supporting not paste by content for partial arrays.
      	(selection_first_range) : Add optional error reporting if there are
      	  multiple selection ranges.
      
      	* src/format.c (format_get_currency) : diddle the logic to get
      	  undefined to work the way people expect for locale C.
      
      	* src/sheet-merge.c (sheet_merge_relocate) : remove some dead code.
      	(sheet_merge_add) : changes to sheet_range_splits_array.
      
      	* src/sheet-object-widget.c (sheet_widget_checkbox_construct) :
      	  changes to selection_first_range.
      
      	* src/sheet.c (sheet_delete_{cols,rows}) : changes to
      	  sheet_range_splits_array.
      	(sheet_insert_{cols,rows}) : use sheet_range_splits_array.
      	(avoid_dividing_array_vertical) : delete.
      	(avoid_dividing_array_horizontal) : delete.
      	(sheet_is_pristine) : constness.
      	(sheet_mark_clean) : delete.
      	(sheet_clear_region) : changes to sheet_range_splits_array.
      	(sheet_ranges_split_region) : renamed from selection_check_for_array.
      	(sheet_range_splits_region) : new routine to check arrays and merged
      	  regions.
      	(sheet_range_splits_array) : improve and add hooks to be used for
      	  overlapping checks.
      	(cb_check_array_vertical) : report the array being split.
      	(cb_check_array_horizontal) : report the array being split.
      
      	* src/stf-parse.c (stf_parse_region) : use cellregion_new.
      	(stf_parse_is_valid_data) : simplify.
      
      	* src/value-sheet.c (value_area_get_width) : warning suppression.
      	(value_area_get_height) : warning suppression.
      	(value_area_fetch_x_y : signedness.
      	(value_area_get_x_y) : signedness.
      
      	* src/value.c (value_array_resize) : signedness.
      	(value_array_set) : signedness.
      
      	* src/workbook-control-gui.c (wbcg_error_splits_array) : signature
      	  change.
      	(cb_insert_rows) : use selection_first_range
      	(cb_insert_cols) : ditto.
      	(sort_cmd) : ditto.
      	(cb_workbook_debug_info) : clean out some deadwood.
      
      	* src/workbook-edit.c (auto_complete_matches) : warning suppression.
      
      	* src/workbook.c (workbook_sheet_detach) : warning suppression.
      	(g_ptr_array_insert) : warning suppression, moved to gutils.
      
      	* src/xml-io.c (xml_write_attributes) : warning suppression.
      	(xml_read_selection_clipboard) : use cellregion_new and tidyup.
      
      	* src/clipboard.c (paste_link) : Only make the link sheet specific if
      	  we need to.
      	(clipboard_paste_region) : constness, support being able to paste
      	  content only as link or value.
      	(clipboard_prepend_cell) : check for arrays.
      	(clipboard_copy_range) : use cellregion_new
      	(cellregion_new) : new function
      	(cellregion_free) : renamed from clipboard_release.
      	(cellregion_to_string) : moved here from render-ascii.
      
      	src/cmd-edit.c (cmd_paste) : more protection. Merge in
      	  application_paste.
      	(cmd_paste_to_selection) : handle changes to selection_is_simple and
      	  use selection_first_range
      	(cmd_shift_rows) : changes to cmd_paste_cut.
      	(cmd_shift_cols) : ditto.
      
      	* src/command-context-priv.h : change signature of splits array.
      	* src/command-context.h : ditto.
      	* src/command-context.c (gnumeric_error_splits_array) : ditto.
      
      	* src/application.c (application_clipboard_clear) :
      	(application_set_selected_sheet) : remove #warning, it is not portable.
      
      	* src/commands.c
      	* src/Makefile.am : remove render-ascii.[ch]  Move their content into
      	  clipboard.
      
      2001-05-01  Jody Goldberg <jgoldberg@home.com>
      
      	* src/clipboard.c (clipboard_prepend_cell) : remove ugly
      	  implementation.
      
      	* src/workbook-edit.c (auto_complete_matches) : remove warning.
      
      	* src/xml-io.c (xml_write_attributes) : remove warning.
      32bde6ee
  4. 21 Mar, 2001 1 commit
  5. 20 Mar, 2001 1 commit
    • Chyla Zbigniew's avatar
      Added support for plugin dependencies + some fixes. · 99ad3568
      Chyla Zbigniew authored
      
      Added support for plugin dependencies + some fixes.
      
      * src/gutils.h (g_list_to_vector, g_vector_free_custom):
      New macros. (used macros instead of functions to avoid casting and
      pointer size problems - ANSI C doesn't guarantee that
      sizeof (void *) == sizeof (something_else *).
      
      * src/plugin-loader.c
      (gnumeric_plugin_loader_load): Load required plugin dependencies
      before the plugin itself, increment n_deps for every loaded
      dependency (by calling plugin_dependencies_inc_dependants).
      (gnumeric_plugin_loader_unload): New function.
      (gnumeric_plugin_loader_load_service): Increment number of loaded
      services if loaded succesfully.
      (gnumeric_plugin_loader_unload_service): Decrement number of loaded
      services if unloaded succesfully, unload plugin if it reaches zero.
      
      * src/plugin-loader.h
      (struct _GnumericPluginLoader): Added n_loaded_services.
      (gnumeric_plugin_loader_unload): New function.
      
      * src/plugin-service.c:
      (plugin_service_file_opener_open_func,
      plugin_service_file_saver_save_func):
      Used gnumeric_io_error_occurred (and gnumeric_io_clear_error) when
      checking for error.
      
      * src/plugin.c:
      (plugins_active_by_default): Array containing ids of "standard"
      plugins. These will be active by default.
      (struct _PluginDependency): New struct.
      (struct _PluginInfo): Added dependencies_v, d_deps. Replaced
      service_list with services_v (vector in place of list).
      (plugin_info_get_config_prefix, plugin_dependency_get_plugin_info,
      plugin_info_read_dependency_list, plugin_dependency_free,
      plugin_inc_dependants, plugin_dec_dependants,
      plugin_dependencies_inc_dependants,
      plugin_dependencies_dec_dependants,
      plugin_load_dependencies):
      New functions.
      (plugin_info_provides_loader_by_type_str, plugin_info_free):
      Adjusted to service_list -> services_v change.
      (plugin_info_read): Read (optional) dependencies, adjusted to
      service_list -> services_v change.
      (activate_plugin):
      Activate required dependencies before the plugin itself.
      Increment n_deps for every activated dependency (by calling
      plugin_dependencies_inc_dependants).
      Adjusted to service_list -> services_v change.
      (deactivate_plugin):
      Decrement n_deps for every activated dependency (by calling
      plugin_dependencies_dec_dependants).
      Adjusted to service_list -> services_v change.
      (plugin_can_deactivate):
      Return FALSE if any of n_deps > 0.
      Adjusted to service_list -> services_v change.
      (plugin_list_sort_by_dependency): Removed.
      (plugin_db_activate_plugin_list): Removed sorting.
      (plugin_db_init): Always activate new plugin if it's defined in
      plugins_active_by_default array.
      
      * src/plugin.h:
      (PluginDependencyType): New enum.
      (plugin_load_dependencies,
      plugin_inc_dependants, plugin_dec_dependants,
      plugin_dependencies_inc_dependants,
      plugin_dependencies_dec_dependants,
      plugin_info_get_config_prefix): New functions.
      99ad3568
  6. 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
  7. 08 Feb, 2001 1 commit
    • Morten Welinder's avatar
      Improve quoting using gnumeric_strescape. · 1beae0a3
      Morten Welinder authored
      2001-02-07  Morten Welinder  <terra@diku.dk>
      
      	* src/commands.c (cmd_search_replace_do_cell): Improve quoting
       	using gnumeric_strescape.
      
      	* src/gutils.c (gnumeric_strescape): Imported from src/expr.c.
        	Constified and changed to add the quotes.
      
      	* src/expr.c (strescape): Moved to gutils.
      	(do_expr_tree_to_string): Use gnumeric_strescape.
      1beae0a3
  8. 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
  9. 20 Dec, 2000 1 commit
    • Chyla Zbigniew's avatar
      Removed "-DGNUMERIC_AUTOFORMATDIR" from INCLUDES. Now we use a function · aafe2895
      Chyla Zbigniew authored
      
      * src/Makefile.am: Removed "-DGNUMERIC_AUTOFORMATDIR" from INCLUDES.
      Now we use a function inside Gnumeric for this.
      
      * src/dialogs/dialog-autoformat.c:
      Marked strings for translation (sample data).
      (struct AutoFormatInfo): Now we have field current_category_group
      (of type FormatTemplateCategoryGroup *) instead of current_category
      and category_groups instead of categories.
      (cb_get_cell_content): Function g_strtod always uses "C" locale,
      used strtod instead.
      (templates_load): Mostly new implementation, uses
      category_group_get_templates_list().
      (cb_remove_current_activated): Now it is implemented.
      (cb_canvas_button_release): Showing real category name
      (template->category->name). Setting sensitivity of
      info->remove_current menu item.
      (cb_category_popwin_hide): Used
      category_group_list_find_category_by_name when setting
      info->current_category_group and category_list_get_names_list
      when calling gtk_combo_set_popdown_strings. Selecting "General"
      category by default if it exists. Displaying current category
      description in the category combo tooltip.
      
      * src/file-autoft.c, src/file-autoft.h: New functions:
      gnumeric_sys_autoformat_dir, gnumeric_usr_autoformat_dir,
      gnumeric_extra_autoformat_dirs,
      category_free, category_get_templates_list, category_list_free,
      category_group_free, category_group_get_templates_list,
      category_group_list_get, category_group_list_find_category_by_name,
      category_group_list_get_names_list, category_group_list_free.
      Removed functions: template_list_load, template_list_free,
      util_list_free, category_list_load, category_list_free.
      
      * src/format-template.c, src/format-template.h:
      New function: format_template_compare_name.
      New structs: FormatTemplateCategory and
      FormatTemplateCategoryGroup.
      (struct FormatTemplate): field category is now of type
      FormatTemplateCategory.
      
      * src/gutils.c, src/gutils.h: New functions: g_create_list,
      g_lang_score_in_lang_list, g_lang_score_is_better (implemented
      as a macro).
      
      * src/xml-io-autoft.c:
      (xml_write_format_template_members): Don't write category
      information.
      (xml_read_format_template_members): Used
      xml_search_child_lang_list instead of xml_search_child to find
      "Information" node. Ignore category information.
      (gnumeric_xml_read_format_template_category): New function.
      
      * src/xml-io-autoft.h: Added
      gnumeric_xml_read_format_template_category function declaration.
      
      * src/xml-io.c, src/xml-io.h: New functions:
      xml_search_child_lang_list, xml_search_child_no_lang,
      xml_search_child_lang_list_with_score (static function).
      
      * templates/autoformat/3D.category,
      templates/autoformat/Financial.category,
      templates/autoformat/Classical.category,
      templates/autoformat/General.category,
      templates/autoformat/Colourful.category,
      templates/autoformat/List.category:
      New files, XML descriptions of default categories.
      
      * templates/autoformat/Makefile.am:
      Templates grouped into categories, now every category is installed
      in separate directory. Installing *.category files as ".category" in
      appropriate directories.
      aafe2895
  10. 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
  11. 15 Aug, 2000 1 commit
    • Morten Welinder's avatar
      About time we got something like this. · 5545f74b
      Morten Welinder authored
      
      2000-08-15  Morten Welinder  <terra@diku.dk>
      
      	* src/gutils.c (gnumeric_get_le_int16, gnumeric_get_le_uint16,
       	gnumeric_get_le_int32, gnumeric_get_le_uint32,
       	gnumeric_get_le_double, gnumeric_set_le_double): new functions,
       	mostly for plugin support.
      5545f74b
  12. 01 May, 2000 1 commit
    • Morten Welinder's avatar
      fix prototype. (C isn't C++.) · 9227ee8c
      Morten Welinder authored
      2000-05-01  Morten Welinder  <terra@diku.dk>
      
      	* src/gutils.c (gnumeric_usr_plugin_dir, gnumeric_sys_plugin_dir,
       	gnumeric_sys_glade_dir): fix prototype.  (C isn't C++.)
      
      	* src/complete.c (complete_destroy): Static.
      
      	* src/regression.c: Inlcude <string.h> for memset.
      9227ee8c
  13. 27 Apr, 2000 1 commit
    • Jody Goldberg's avatar
      Improve versioning. Fix a few bugs. · 2c8b64d0
      Jody Goldberg authored
      Improve versioning.
      Fix a few bugs.
      
      2000-04-26  Jody Goldberg <jgoldberg@home.com>
      
      	* src/command-context.c (gnumeric_error_sys_err) : New function.
      	* src/command-context-gui.c (ccg_error_sys_err) : Support it.
      
      	* src/gnumeric-util.c (gnumeric_glade_xml_new) : Use gnumeric_error_sys_err.
      
      	* src/gutils.c (gnumeric_sys_{data,lib,glade,plugin)_dir) : New functions.
      	(gnumeric_usr_dir, gnumeric_usr_plugin_dir) : New functions.
      
      	* src/plugin.c (load_all_plugins) : Use
      	  gnumeric_usr_plugin_dir, and  gnumeric_sys_plugin_dir.
      
      	* src/item-edit.c (point_is_inside_range) : Handle non-singleton
      	  expr start characters.
      
      2000-04-25  Jody Goldberg <jgoldberg@home.com>
      
      	* *.c : glade_new_xml -> gnumeric_glade_new_xml
      	  Localize GNUMERIC_GLADEDIR so that plugins can use it too.
      
      	* src/gnumeric-util.c (gnumeric_glade_xml_new) : New function.
      
      	* */Makefile.am : Set 'DATADIR' rather than GLADEDIR.  And version
      	  the glade file the same way the plugins are set.  This should
      	  probably expand to include architecture akin to gcc.
      
      	* src/widgets/widget-editable-label.c (el_button_press_event) :
      	  Clicking in another window accepts the changes.  Once we have
      	  reliquished our grab push the button event back on the queue
      	  so that it can be forwarded on to the appropriate recipient (9007).
      
      	* src/parse-util.c (parse_text_value_or_expr) : Watch for 1 character
      	  strings which could start an expression.
      2c8b64d0
  14. 20 Apr, 2000 1 commit
    • Jody Goldberg's avatar
      Reorg cell contents and assignment. · bedb925b
      Jody Goldberg authored
      Fixs lots of usability details.
      
      2000-04-20  Jody Goldberg <jgoldberg@home.com>
      
      	* src/dialogs/dialog-cell-format.c : Use the edit_pos as the example
      	  not the top left corner.
      
      	* src/functions/fn-stat.c (gnumeric_ftest) : Use eval_pos_cellref
      	  to help localize the strangeness.
      	(gnumeric_ttest) : Ditto.
      
      	* src/xml-io.c (xml_write_cell_and_position) : If this is an array
      	  expression and we are the top left then add attributes to indicate
      	  size of array.  Ignore the rest of the array.
      	(xml_not_used_old_array_spec) : New routinr to handle the old array format.
      	(xml_cell_set_array_expr) : store an array.
      	(xml_read_cell) : Handle the old and the new array formats.
      
      	* src/workbook.c (workbook_close_if_user_permits) : Accept input
      	  first.
      	(wb_edit_key_pressed) : Handle array formulas here.
      	(workbook_detach_sheet) : Do not recalc all if we are exiting.
      	(workbook_start_editing_at_cursor) : When we start editing an
      	  array formula display just the formula not all the extra {}()[][] crap.
      
      	* src/sheet.c (SheetPrivate) : Add a recompute_spans flag.
      	(sheet_calc_spans) : New routine.
      	(sheet_cell_calc_span) : New routine.
      	(sheet_range_calc_spans) : Renamed and extended from
      	  sheet_cells_update.
      	(sheet_update) : Use sheet_calc_spans when necessary.
      	  Update the location region when the edit_pos changes.
      	(cb_recalc_spans_in_col) : Renamed from cb_collect_cells_in_col.
      	  Recalcs spans directly, no need to collect first.
      	(cb_set_cell_content) : New routine to set expr, or expr_and_value.
      	(sheet_range_set_text) : Use cb_set_cell_content, and remember
      	  chosen format with the cell rather than overriding the assigned
      	  format.
      	(sheet_cell_set_text) : Renamed from sheet_set_text.  Be more specific
      	  about how spans, rendering and the rest are handled.
      	(sheet_cell_set_expr) : New routine.
      	(sheet_cell_set_value) : Ditto.
      	(sheet_load_cell_val) : When displaying an array formula add {%s}()[][].
      	(sheet_redraw_cell_region) : Honour spans when redrawing.
      	(sheet_redraw_partial_row) : New routine.
      	(sheet_redraw_cell) : Ditto.
      	(sheet_is_cell_array) : Use cell_is_array.
      	(sheet_range_splits_array) : Renamed from sheet_check_for_partial_array.
      	(sheet_cell_add_to_hash) :  Do not touch spans at this point.
      	(sheet_cell_insert) : Rename from sheet_cell_add made recalc span
      	  optional.
      	(sheet_cell_new) : New routine that does not touch spans.
      	(sheet_cell_remove) : Made redraw optional.
      	(cb_clear_cell_comments) : Remove the cell if there is no comment.
      	(sheet_clear_region) : Remove the cell if there are no comments or
      	  contents.  Flag an update of the status region.
      
      	* src/sheet-view.c (cb_colrow_resize) : New function.
      	(sheet_view_col_size_changed) : Resize all rows, irrespective of
      	(sheet_view_row_size_changed) : existing cells.
      	(sheet_view_redraw_cell_region) : This no longer honours spans.
      
      	* src/sheet-style.c (sheet_style_attach) : Removed call to redraw.
      	sheet_cells_update : rename to sheet_range_calc_spans and move to
      	  sheet.c.
      
      	* src/sheet-autofill.c (autofill_cell) : Use sheet_cell_set_value
      	  rather than set_text.
      
      	* src/selection.c (sheet_selection_changed_hook) : Delete.
      	(sheet_selection_extend_to) : Update the status region to display the
      	  new size.
      	(sheet_selection_cut) : Use sheet_range_splits_array.
      	(selection_check_for_array) : New routine.
      
      	* src/parser.y : Remove icky array formula parsing that conflicted
      	  with array entries.
      
      	* src/number-match.c (format_match) : Return a Value * rather than a
      	  double.
      
      	* src/mstyle.c (mstyle_set_font_size) : Do not allow font sizes < 1.
      
      	* src/main.c (gnumeric_main) : Do NOT create an empty workbook
      	  then delete it if things are successfully loaded.  This causes
      	  a global recalc.  Instead add a flag to disable exit when the
      	  number of workbooks go to zero.  Then only enable the flag AFTER
      	  we have attempted to load the initial workbooks.
      
      	* src/item-grid.c (item_grid_event) : Update the status_region when
      	  button-1 is release.  It should display the edit_pos.
      
      	* src/gutils.c : Move cell_name, col_name, col_from_name,
      	  parse_cell_name, parse_cell_name_or_range and parse_cell_name_list,
      	  to parse-util.c.
      
      	* src/gnumeric.h  : Add RenderedValue.
      
      	* src/gnumeric-util.c (gnumeric_char_start_expr_p) : Move
      	  to parse-util.c
      
      	* src/file.c (workbook_read) : Remove freese thaw usage.
      	  Move call to update AFTER mark clean.
      
      	* src/expr.c (eval_pos_init) : Take a cellpos.
      	(parse_pos_evalpos) : New routine.
      	(eval_pos_cellref) : There is some questionable code scattered in the
      	  functions.  This routing localizes the odd bits for correction.
      
      	* src/eval.c (cell_eval_content) : Use sheet_redraw_cell,
      	  and rendered_value_calc_size.
      	(cell_get_dependencies) : Improve constness.
      
      	* src/corba-sheet.c : Remove the freeze thaw operations.
      	(Sheet_cell_set_formula) : Deleted.
      	(Sheet_range_set_formula) : Delete.
      
      	* src/commands.c : Adjust so that registration of command auto
      	  calls redo.  Add misc checks for splitting arrays.
      
      	* src/clipboard.h : Move the CellCopy types here from cell.h
      
      	* src/clipboard.c (paste_cell) : Use cell_has_expr.
      	  Don't insert the new cell till after its contents are assigned.
      
      	* src/cellspan.c (cell_register_span) : Improve constness.
      	(cell_unregister_span) : Ditto.
      	(row_cell_get_displayed_at) : Delete.
      	(cell_calc_span) : Moved here from cell.c
      
      	* src/dialogs/dialog-stf.glade : Adjust the header background colour
      	  to match the purdy new icon.  Add the icon.
      
      	* src/cell-draw.c : Use the rendered_value routines.
      	  Improve constness.
      
      	* src/analysis-tools.c (set_cell) : Use sheet_cell_fetch.
      
      	*.*
      	    cell_set_* -> sheet_cell_set_
      	    cell_set_*_simple -> cell_set_
      	    Cell::{row,col} -> Cell::{row,col}_info
      	    cell_get_text -> cell_get_entered_text
      	    cell_get_content -> cell_get_entered_text
      	    cell_name -> cell_coord_name
      	    cell_get_formatted_val -> cell_get_rendered_text
      	    cell_get_content -> cell_get_entered_text
      
      	* src/cell.c :
      	(cell_dirty) : Renamed from cell_modified.  Use
      	  sheet_set_dirty.
      	(cell_formula_changed) : Make the queuing of the recalc optional.
      	(cell_cleanout) : Handle union of expression and entered_text,
      	  and remove the rendered value.
      	(cell_copy) : Ditto.
      	(cell_destroy) : handle cell_modified -> cell_dirty.
      	(cell_set_text) : Use parse_text_value_or_expr and store the prefered
      	  format.
      	(cell_set_text_and_value) : New routine.
      	(cell_assign_value) : New routine.
      	(cell_set_value) : Support formats.
      	(cell_set_expr_and_value) : New routine.
      	(cell_set_expr_internal) : Split from cell_set_expr.
      	(cell_set_expr) : Divide to allow for not queuing a recalc.
      	(cell_set_array_formula) : Use cell_set_expr_internal.
      	(cell_is_array) : New utility.
      	(cell_is_partial_array) : New utility.
      	(cell_has_expr) : New utility.
      	(cell_render_value) : Use rendered_value_*.
      	Move all comment routines into cell-comment.[ch].
      
      	* idl/Gnumeric.idl : Remove cell_set_formula, and range_set_formula.
      	  These were identical to set_text.  Made Workbook embeddable.
      bedb925b
  15. 26 Mar, 2000 1 commit
  16. 21 Mar, 2000 1 commit
    • Miguel de Icaza's avatar
      Allow for parsing to be non-strict. · 7bb1eb3f
      Miguel de Icaza authored
      
      
      2000-03-21  Miguel de Icaza  <miguel@helixcode.com>
      
      	* src/utils.c (parse_cell_name_or_range): Allow for parsing to be
      	non-strict.
      
      	* src/ranges.c (range_parse): Allow for parsing to be non-strict.
      
      	* src/utils.c (parse_cell_name): Allow for parsing to be non-strict.
      
      	* Makefile.am (SUBDIRS): Fix list of directories.
      
      	* src/item-cursor.c (item_cursor_set_arg): Added optional color
      	handling to item-cursor.
      
      2000-03-20  Miguel de Icaza  <miguel@helixcode.com>
      
      	* src/main.c (gnumeric_main): Removed broken style test.
      
      	* src/ranges.c (range_parse): Update the range_parse API
      
      	* src/print-info.c (load_range): Update API.
      
      	* src/utils.c (parse_cell_name): Handle references that contain an
      	absolute reference.
      7bb1eb3f
  17. 27 Feb, 2000 1 commit
  18. 17 Jan, 2000 1 commit
    • Morten Welinder's avatar
      New file. New file. · 5f38af0a
      Morten Welinder authored
      2000-01-16  Morten Welinder  <terra@diku.dk>
      
      	* src/datetime.c: New file.
      	* src/datetime.h: New file.
      
      	* src/format.c (split_time): Use datetime functions.
      
      	* src/commands.c (cmd_set_date_time_redo): Do proper rounding.
      
      	* src/functions/fn-date.c: Move date handling to datetime.c
      
      	* src/utils.c: Move date stuff to datetime.c.  Renamed
       	systematically; all callers changed.
      
      	* src/Makefile.am (GNUMERIC_BASE_SOURCES): Add datetime.c and
       	datetime.h.
      5f38af0a
  19. 21 Nov, 1999 1 commit
    • Jeff Garzik's avatar
      New file import filter for SC and xspread spreadsheets. update prototype · 646d7df1
      Jeff Garzik authored
      1999-11-21  Jeff Garzik  <jgarzik@mandrakesoft.com>
      
              * configure.in, plugins/Makefile.am:
              New file import filter for SC and xspread spreadsheets.
              * src/utils.h (parse_cell_name): update prototype
              * src/utils.c (parse_cell_name): return gboolean, to reflect true,
              and documented, nature of return value.
              (parse_cell_name_list): move loop exit condition into 'for' statement
      646d7df1
  20. 08 Oct, 1999 1 commit
    • Jody Goldberg's avatar
      - Move some math functions from utils to mathfuncs. · 42b5114f
      Jody Goldberg authored
      - Beautify the scrollbar tooltips a bit and move some of their utility
        routines into gnumeric-utility.
      - Add width/height tooltips on col/row resize.
      - Fix bug that would loose the end of resize event when the cursor had
        not moved.
      42b5114f
  21. 20 Jul, 1999 1 commit
  22. 11 Jul, 1999 1 commit
    • Jody Goldberg's avatar
      - Disable insert/delete row/column that would split an array-formula · a3506bf7
      Jody Goldberg authored
      - Enable cut/copy/paste for array formulas.
      - Fix multi-line cell drawing & whitespace issues.
      - Change the default column width & grid colour to more closely match XL
      - Add the edit popup menu in the row/col headers
      - Short circuit the insert/delete dialogs to directly insert/delete when
        an entire row/column is selected.
      a3506bf7
  23. 26 Jun, 1999 1 commit
    • Miguel de Icaza's avatar
      The big GNUMERIC_PRINT merge into HEAD. · a5e65a30
      Miguel de Icaza authored
      
      
      The big GNUMERIC_PRINT merge into HEAD.
      
      Still some features are missing.  Check the TODO to see what is
      missing.
      
      1999-06-26  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/pixmaps.h: Removed unused pixmaps.
      
      	* src/corba-sheet.c (Sheet_corba_class_init): Fill in some missing
      	values fomr the GNOME::Gnumeric::Sheet epv interface.
      
      	* src/expr.c (eval_funcall): Removed unused variable.
      
      	* src/workbook.c (workbook_sheets): prepend and reverse instead of
      	appending all the time.  It is more efficient.
      
      	* src/style.c (x11_font_compute_hints): Renamed as well.  Might be
      	useful in the future.
      
      	* src/gnumeric-util.c (x11_font_get_italic_name,
      	x11_font_get_bold_name, x11_font_change_component): Renamed these
      	functions to reflect their actual usage.
      
      	* src/expr.c (expr_tree_new_constant): Change style to use early
      	return to keep indentation of the rest of the code at tab-1.  This
      	is a trick to keep indentation nice with 8-tab spaces.  Liberal
      	use of early returns, early continues, early breaks.
      
      	* src/cell.h (CELL_TEXT_GET): Kill unused macro.
      
      1999-06-25  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/xml-io.c (xml_read_cell): Merge the style we just read with
      	the existing information from the cell (which are the defaults).
      	This is only for compatibility with the old format
      
      1999-06-24  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/xml-io.c (style_font_new_from_x11): Implemented
      
      	* src/style.c (style_font_new): Improved matching of the font.
      
      	* src/xml-io.c 	(xml_write_style): Save Bold and Italic
      	properties.  Save Units as double.
      	(xml_read_style): Add conversion hook from old format.
      	(xml_read_style): Load properly italic and bold properties.
      
      	(xml_read_cell): Add new style reading code.  It is
      	compatible with the old Style reading code.
      	(xml_read_rows_info, xml_read_cols_info, xml_read_styles): Moved
      	Cols, Rows and Styles loading code here, for code clarity.
      
      	* src/style.c (style_font_new_simple): Include the scale in the
      	key lookup variable.
      
      	* src/xml-io.c: The FontDefs and the HREFs to the fonts were never
      	being used.  The new code for styles simplifies this.  Kill all
      	the references to the FontDefs urls and the font indeces.
      
      	* src/xml-io.c
      
      1999-06-23  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/xml-io.c: Major updates.
      	(xml_read_colrow_info): Use floating point for loading the
      	units, margin_a and margin_b.
      	(xml_write_colrow_info): Save units, margin_a and margin_b using
      	floating point.
      	(xml_set_value_double): Activate this function.
      	(xml_write_cell): Do not save the style here.  Lookup the style
      	id, and write a record with the style id link.
      	(xml_sheet_write): Add call to xml_cell_styles_init and
      	xml_cell_styles_shutdown to init and shutdown the cell styles in a
      	per-sheet basis.
      
      	Renamed functions to suit the gnumeric coding
      	sytle.  Fixed indentation.
      
      	File format now saves a different version.  We store all cell
      	styles first, and then we reference them.
      
      	(parse_xml_context_t): renamed from
      	parseXmlContext.  Add style_table hash table for storing all the
      	styles used by the cells on a workbook.  Used to dump Styles first
      	and then have the cells reference it.
      
      	* src/style.c (style_hash, style_compare): New routines to
      	put Styles on hash tables.
      
      	* src/workbook.c (workbook_sheets): Use g_list_prepend instead of
      	g_list_append and reverse the result.
      
      1999-06-14  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/cell.h: Killed ColType and RowType definitions.  They do not
      	save any noticeable amount of memory; we are not using them but
      	on the most useless places and finally they are the current limit
      	to our spreadsheet size.
      
      	* src/gnumeric-sheet.h: Use int instead of ColType, RowType
      	* src/item-cursor.h: Use int instead of ColType, RowType
      	* src/item-grid.h: Use int instead of ColType, RowType
      
      	* src/print-cell.c (CELL_DIM): Use _pt variants of the margins here.
      	(print_cell_text): and here.
      	(print_cell): and here.
      	(print_cell_range): and here.
      	(print_cell_grid): and here.
      
      1999-06-13  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/sheet.c (sheet_compute_col_row_new_size): Update margin_a
      	and margin_b from the points.
      	(col_row_info_init): New function to initialize a sample
      	ColRowInfo.  Inits the _pt fields.
      	(col_row_unit_distance): Use the new fields in computation.
      	(sheet_col_get_unit_distance): Use new fields in computation.
      
      	* src/dialog-printer-setup.c (do_setup_margin): Set scroll region.
      	(preview_page_create): Implement routine that draws the page for
      	the margin setup.
      
      	* src/sheet.h (ColRowInfo): Units are now doubles; margin_a_pt and
      	margin_b_pt are doubles that represent the a and b margins in
      	points.
      
      	* src/sheet.c (sheet_compute_col_row_new_size): Use the
      
      1999-06-11  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/cell-draw.c (cell_draw): Move the foreground setting routine
      	here and handle single-line and multiline coloring properly.
      
      	* src/print-info.c (unit_name_to_unit): New routine, returns the
      	UniName from the string name.
      
      	* src/dialog-printer-setup.c (dialog_printer_setup): Use
      	print_info_save and kill the do_save_settings routine for the
      	cleaner print_info routine.
      
      	* src/print-info.c (print_info_new): Now loads the default
      	settings from the saved configuration.
      	(print_info_save): Saves the print information to the gnome_config.
      
      1999-06-08  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/utils.c (str_trim_spaces): Moved str_trim_spaces ere.
      
      	* src/dialog-printer-setup.c (do_setup_main_dialog): Connect print
      	buttons.
      
      	* src/print-cell.c (print_cell_grid): Simplify routine.
      
      	* src/sheet.c (sheet_row_get_unit_distance,
      	sheet_col_get_unit_distance): Include  margins in computation.
      	This is broken, as the margins are now pixels, and they should be
      	made points.
      
      	* src/dialog-printer-setup.c (do_fetch_page_info): Fetch other values.
      	(do_save_settings): Saves the configuration.
      
      	* src/print-cell.c (print_border): Implement border drawing.
      	(print_cell_grid): Make this work as it should.
      
      	* src/print.c (compute_groups): Handle the case where the contents
      	fit entirely in one page.
      
      1999-06-07  Miguel de Icaza  <miguel@gnu.org>
      
      	* src/print.c: New file.  Implements high-level printing.
      
      	* src/dialog-printer-setup.c: New file.  Implements the "Print
      	Setup" dialog box.
      
      1999-04-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/cell-draw.c: New file.  All of the cell screen drawing code
      	has been moved here now.
      
      	* src/print-cell.c: Enhanced code.
      
      	* src/workbook.c: hardcoded page size for testing purposes.
      
      1999-03-10  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	I do not like the current approach.  I do think that StyleFonts
      	should be static with regard to Zoom.
      
      	And we would keep a cache of X fonts that are used for a
      	particular size.
      
      	* src/style.c (style_font_new_from): New routine that creates a
      	new font.
      
      	* src/sheet.c (sheet_set_zoom_factor): Scale fonts used in the
      	Sheet.
      
      1999-02-15  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/dialog-printer-setup.c: New file.  Implements the workbook
      	page configuration dialog box.
      
      	* src/print-info.c, src/print-info.h: Manages the per-worbook
      	print options.
      
      1999-02-07  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/style.c (font_equal): Adapt function to the new StyleFont.
      	(style_font_new, style_font_new_simple): Adapt for the upcoming
      	gnome-print support.
      	(font_init): Adapt.
      
      	* src/xml-io.c: Use Gnome Print font scheme.
      	* src/workbook.c: ditto.
      	* src/cell.c: ditto.
      	* src/item-bar.c, src/item-edit.c: ditto
      
      	* src/dialog-cell-format.c: Disable font selector for now.
      a5e65a30
  24. 25 May, 1999 1 commit
  25. 17 May, 1999 1 commit
    • Miguel de Icaza's avatar
      Return false if the cell name is outside the boundaries of the · 536fa980
      Miguel de Icaza authored
      1999-05-17  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/utils.c (parse_cell_name): Return false if the cell name is
      	outside the boundaries of the spreadsheet.
      
      	* src/corba-sheet.c (Sheet_range_set_text): Implement.
      	(Sheet_range_set_formula): Implement.
      	(Sheet_range_set_format): Implement.
      
      	* src/ranges.c (range_parse, range_list_parse, range_list_destroy,
      	range_list_foreach_full, range_list_foreach_all,
      	range_list_foreach, range_set_style): New functions.  Used by the
      	corba-sheet code.
      
      	* src/corba-sheet.c (Sheet_range_get_values): Implement
      	vector-based result return.
      
      	* src/xml-io.c (xmlSetGnomeCanvasPoints): use g_malloc instead of alloc.
      
      	* src/dialog-solver.c (constr_add_click): Use g_malloc instead of
      	alloc.  Use g_new instead of malloc.
      
      	* src/utils.c (parse_cell_name_list): Add parameter checking.  Use Migueestyle.
      536fa980
  26. 30 Apr, 1999 1 commit
  27. 24 Apr, 1999 1 commit
  28. 08 Apr, 1999 1 commit
    • Jukka-Pekka Iivonen's avatar
      Wrote dialogs for these tools. The tools are not implemented yet. · 0e81c949
      Jukka-Pekka Iivonen authored
      
      
      1999-04-08  Jukka-Pekka Iivonen  <iivonen@iki.fi>
      
      	* src/dialog-solver.c, src/dialog-goal-seek.c, src/solver.h:
      	Wrote dialogs for these tools. The tools are not implemented yet.
      
      	* src/solver-lp.c:
      	New file for linear programming methods created.
      
      	* src/sheet.h:
      	Added parameters for the Solver tool.
      
      	* src/fn-stat.c (gnumeric_correl):
      	Bug fixed.  If the covariance is zero the correlation coefficient
      	should also be zero. Thanks for Vladimir for pointing this one out.
      0e81c949
  29. 30 Mar, 1999 1 commit
  30. 15 Dec, 1998 1 commit
  31. 13 Dec, 1998 1 commit
    • Sebastian Wilhelmi's avatar
      Changed to use the glib GDate type instead of the lib_date functions. · 74e388f9
      Sebastian Wilhelmi authored
      1998-12-13  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* src/fn-date.c (gnumeric_year_month_day, gnumeric_now,
      	gnumeric_today,gnumeric_date):
      	* src/workbook.c (insert_current_date_cmd):
      	* src/number-match.c (compute_value): Changed to use the glib
      	GDate type instead of the lib_date functions. Fixed off by-one
      	error for some date functions (e.g. =today ()) was one day to
      	early).
      
      	* src/utils.c, src/utils.h (g_date_serilal, g_date_serial_new):
      	New functions for handling the gnumeric serial of a date.
      74e388f9
  32. 28 Nov, 1998 1 commit
    • Miguel de Icaza's avatar
      OH MY GOD! This has been on my laptop for AGES! and it never went into CVS. What a dork I am · 11be5291
      Miguel de Icaza authored
      So, here it is:
      
      1998-11-13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/sheet-autofill.c (autofill_cell): Simplify by using
      	cell_set_formula_tree
      
      	* src/expr.c (expr_parse_string): Take a sheet argument
      	(expr_decode_tree): Same
      
      	* sheet.c (cellref_name): Now takes a sheet argument and decodes the
      	cellref depending on the sheet.
      
      	* cell.c (CellRef): Now they include the sheet location.
      11be5291
  33. 13 Nov, 1998 1 commit
    • Miguel de Icaza's avatar
      Use case-insenstive routines when creating the hash table. · 3cbc7cdc
      Miguel de Icaza authored
      1998-11-12  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/parser.y:
      
      	* src/workbook.c (workbook_new): Use case-insenstive routines when
      	creating the hash table.
      	(workbook_sheet_get_free_name): Find an unused name for a sheet.
      	(workbook_sheet_lookup): Looks up a sheet by name in a Workbook.
      	(insert_sheet_cmd): New command to insert a sheet into a workbook.
      
      	* src/utils.c (gnumeric_strcase_hash, gnumeric_strcase_equal):
      	Routines used for strings hash tables that are not case
      	sensitive.
      
      1998-11-12  Morten Wellinder <terra@diku.dk>
      
      	* test-parser.c: Fix to compile with the new API
      
      	* parser.y: Make the code more maintainable.
      3cbc7cdc
  34. 30 Sep, 1998 1 commit
  35. 26 Aug, 1998 1 commit
    • Arturo Espinosa's avatar
      Today: · 061a1e74
      Arturo Espinosa authored
      
      
      Today:
      
      	- Column delete and Row delete work.  Bindings all over the
      	  place are working (context menus, menus, etc).
      
      	- Made scrollbars usable and include a tooltip-like thing
      	  like Excel does.
      
      	  They still are kind of inacurrate, and I just figured
      	  out a terrible design mistake that will be fixed tomorrow
      	  (it is kind of big).
      
      	- Various bug fixes to little things I had overlooked in
      	  cell insert/shift routines.
      
      Miguel.
      061a1e74
  36. 14 Aug, 1998 1 commit
  37. 13 Aug, 1998 1 commit
  38. 25 Jul, 1998 1 commit
    • Arturo Espinosa's avatar
      Weee! Regular strings are now treated as values (so they can be used in · a30e70c3
      Arturo Espinosa authored
      
      
      Weee!  Regular strings are now treated as values (so they
      can be used in cell expressions).  This means you can actually
      start typing expressions and they will actually make sense
      (note that no recalc is yet supported).
      
      The code to do interactive selections is there, but for some
      reason the cursor is not paying much attention to me.
      
      This feature lets you select a cell for an expression if you
      type in a formula in the spreadsheet (just type '=' and use
      the arrow keys to see my buggy code).
      a30e70c3
  39. 22 Jul, 1998 1 commit
    • Miguel de Icaza's avatar
      Numbers are parsed correctly. Bits of Oleo number parsing plugged in. · ef28d5f2
      Miguel de Icaza authored
      1998-07-21  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/parser.y (yylex): Numbers are parsed correctly.  Bits of
      	Oleo number parsing plugged in.
      
      	* src/util.c, src/util.h: New files with assorted number utilities.
      
      	* src/numbers.h: New file: takes care of using gmp or regular
      	double/int.
      
      	* src/expr.c (eval_release_node): Implement.
      	(eval_release_value): New function.
      
      	* src/sheet.c (sheet_col_selection_changed,
      	sheet_row_selection_changed): Implement.
      	(sheet_selection_clear, sheet_selection_clear_only): Splitted
      	functionality into two routines.
      	(sheet_selection_clear_only): Remove any marks from the bars.
      	(sheet_row_set_selection, sheet_col_set_selection): Implement.
      
      	* src/item-bar.c (is_pointer_on_division): Return the column
      	changed.
      
      	* src/item-grid.c (item_grid_draw_cell): Fix the computation for
      	right indentation.
      ef28d5f2