1. 11 Feb, 2002 1 commit
    • Jon K Hellan's avatar
      Support per sheet grid color. Needed for correct XL import. · 91dc6f19
      Jon K Hellan authored
      2002-02-11  Jon K Hellan  <hellan@acm.org>
      
      	Support per sheet grid color. Needed for correct XL import.
      
      	* src/style-color.[ch] (color_equal): Rename to style_color_equal
      	and export.
      
      	* src/style-border.[ch] (style_border_none_set_color): New
      	function. Update the grid color (color of style border none) to
      	the given color.
      
      	* src/sheet-style.[ch] (sheet_style_update_grid_color): New
      	function. Update the grid color to fit the given sheet.
      
      	* src/item-grid.c (item_grid_draw): Call
      	sheet_style_update_grid_color before rendering.
      
      	* src/print-cell.c (print_cell_range): Ditto
      
      	* src/preview-grid.c (preview_grid_draw): Call
      	style_border_none_update_color before rendering.
      91dc6f19
  2. 05 Feb, 2002 1 commit
    • Jon K Hellan's avatar
      New function. Factored out of style_color_new. Creates color · c200db78
      Jon K Hellan authored
      2002-02-05  Jon K Hellan  <hellan@acm.org>
      
      	* src/style-color.c (style_color_new_uninterned): New
      	function. Factored out of style_color_new. Creates color
      	unconditionally, without using the hash table.
      	(style_color_new): Factor out style_color_new_uninterned.
      	(style_color_new_i8): New function. Create a style color from 8
      	bit rgb values by cloning to 16 bits.
      	(style_color_auto_font): New function. Returns an uninterned black
      	to represent Excel auto font color.
      	(style_color_auto_back): New function. Returns an uninterned white
      	to represent Excel auto background color.
      	(style_color_auto_pattern): New function. Returns an uninterned black
      	to represent Excel auto pattern color.
      	(color_equal): Include is_auto flag in comparison.
      	(color_hash): Include is_auto flag in hash function.
      
      	* src/style-color.h (style_color_new_i8, style_color_auto_font,
      	style_color_auto_back, style_color_auto_pattern): Declare
      
      	* src/sheet-style.c (struct _SheetStyleData): Add
      	auto_pattern_color.
      	(sheet_style_init): Initialize auto_pattern_color.
      	(sheet_style_shutdown): Unref auto_pattern_color.
      	(sheet_style_set_auto_pattern_color): New function. Set the auto
      	pattern color for this sheet.
      	(sheet_style_get_auto_pattern_color): New function. Get the auto
      	pattern color for this sheet.
      
      	* src/sheet-style.h (sheet_style_set_auto_pattern_color,
      	sheet_style_get_auto_pattern_color): Declare.
      
      	* src/dialogs/dialog-cell-format.c (border_get_mstyle): Use
              style_color_new_i8.
      
      	* src/plugins/excel/ms-excel-read.c (black_or_white_contrast): Burn.
      	(ms_excel_palette_get): Simplify to get autocolors right. We used
      	to be too clever.
      	(ms_sheet_map_color): Use style_color_new_i8 to convert from
      	rgb888.
      	(ms_excel_read_window2): Update pattern color according to
      	icvHdr/rgbHdr grid color if fDefaultHdr flag says so.
      
      	* src/plugins/applix/applix-read.c (applix_read_colormap): Use
              style_color_new_i8.
      c200db78
  3. 23 Jan, 2002 1 commit
  4. 27 Sep, 2001 1 commit
    • Jody Goldberg's avatar
      Add a property bag type interface to the escher parser. · 909174cd
      Jody Goldberg authored
      2001-09-26  Jody Goldberg <jgoldberg@home.com>
      
      	* ms-escher.c (ms_escher_parse) : call ms_escher_header_release.
      	(ms_escher_read_container) : ditto.
      	(ms_escher_header_release) : new to handle attrs.
      	(ms_escher_header_add_attr) : ditto.
      	(ms_escher_read_ClientData) : pass the attributes to the object
      	  and move the blip handing to the container.
      
      	* ms-obj.c (ms_object_attr_new_flag) : new.
      	(ms_object_attr_new_int) : new.
      	(ms_object_attr_new_ptr) : new.
      	(ms_object_attr_destroy) : new.
      	(ms_object_attr_bag_new) : ditto.
      	(ms_object_attr_bag_destroy) : ditto.
      	(ms_object_attr_bag_insert) : ditto.
      	(ms_object_attr_bag_lookup) : ditto.
      
      	* ms-excel-read.c (ms_excel_read_workbook) : interface change to
      	  ms_read_OBJ.
      	(ms_excel_read_sheet) : ditto.
      	(ms_sheet_create_obj) : move the blip handing from escher to here.
      
      2001-09-27  Jody Goldberg <jgoldberg@home.com>
      
      	* src/sheet-object-graphic.c (sheet_object_graphic_fill_color_set) :
      	  Use StyleColors and make public.
      	(sheet_object_graphic_destroy) : unref the fill colour.
      	(sheet_object_graphic_new_view) : translate from stylecolor to gdk.
      	(sheet_object_graphic_read_xml) : use style colors.
      	(sheet_object_graphic_write_xml) : use style colors.
      	(sheet_object_graphic_clone) : reference the fill colour.
      	(sheet_object_graphic_print) : use style colour.
      	(cb_dialog_graphic_clicked) : ditto.
      	(cb_dialog_filled_clicked) : ditto.
      	(sheet_object_graphic_user_config) : ditto.
      	(sheet_object_filled_user_config) : ditto.
      
      	* src/style-color.c (style_color_ref) : NULL is ok.
      	(style_color_unref) : ditto.
      
      	* src/xml-io.c (xml_node_get_color) : rename and tidy up.
      	(xml_node_get_gdkcolor) : delete.
      	(xml_node_set_gdkcolor) : delete.
      	(xml_read_style_border) : changes to get_color.
      	(xml_read_style) : ditto.
      909174cd
  5. 14 Sep, 2001 1 commit
    • Jody Goldberg's avatar
      if we are displaying the parse fmt because the assigned fmt is General · 1dbce43d
      Jody Goldberg authored
      2001-09-14  Jody Goldberg <jgoldberg@home.com>
      
      	* dialog-cell-format.c (fmt_dialog_init_format_page) : if we are
      	  displaying the parse fmt because the assigned fmt is General
      	  then select the parse fmt in the dialog.
      
      2001-09-14  Jody Goldberg <jgoldberg@home.com>
      
      	* ms-chart.c (excel_chart_series_write_xml) : Use the gal routines for
      	  symetry with the guppi implementation.
      
      2001-09-14  Jody Goldberg <jgoldberg@home.com>
      
      	* src/style-color.c (style_color_new_name) : new utility.
      
      	* src/gnumeric-graph.c : cleanup the debug info.
      	(gnm_graph_get_spec) : make public and add some protection.
      
      	* src/number-match.c : remove format_parse_t and merge it with
      	  StyleFormat.
      	(format_match_release) : new routine split from format_match_finish.
      	(format_match_finish) : just unref the StyleFont.
      	(format_match_create) : tweaking the calling convention and rename
      	  format_match_define.
      	(format_match_init) : manage the format_match_list here.
      	(format_match) : Match against the currently assigned format first
      
      	* src/format.c : clean the includes.
      	Make _StyleFormat public for sharing with number-match.c
      	(format_compile) : call format_match_create.
      	(format_destroy) : call format_match_release.
      	(format_color_init) : use style_color_new_name.
      	(style_format_new_XL) : init the new regexp elements to NULL.
      
      	* src/bonobo-io.c (gnumeric_bonobo_io_init) : name this better.
      
      	* src/sheet-control-gui.c (scg_object_update_bbox) : add some
      	  protection.
      1dbce43d
  6. 05 Feb, 2001 1 commit
    • Jody Goldberg's avatar
      built from the original (style_border_vmargins) : draw routines. · 27c431f4
      Jody Goldberg authored
      
      2001-02-05  Jody Goldberg <jgoldberg@home.com>
      
      	* src/style-border.c (style_border_hmargins) : built from the original
      	(style_border_vmargins) : draw routines.
      	(style_borders_row_draw) : a wrapper to draw a set of borders.
      
      2001-02-04  Jody Goldberg <jgoldberg@home.com>
      
      	* src/sheet-style.c (style_row) : Handle the display of gridlines
      	  here.
      
      	* src/item-grid.c (item_grid_draw_merged_range) : prepare to do
      	  borders & grids in a batch as part of the standard render process.
      	(item_grid_draw) : Ditto.
      
      2001-02-04  Jody Goldberg <jgoldberg@home.com>
      
      	* src/preview-grid.c (preview_grid_realize) : no need for
      	  visual_is_paletted.
      	* src/item-grid.c (item_grid_realize) : ditto.
      27c431f4
  7. 31 Dec, 2000 1 commit
  8. 17 Sep, 2000 1 commit
    • Jody Goldberg's avatar
      Use the newly minted Gnome Application Library (GAL) · 031ceea8
      Jody Goldberg authored
      2000-09-17  Jody Goldberg <jgoldberg@home.com>
      
      	* src/workbook-format-toolbar.c : Use the new Gnome App Libs (GAL)
      	  routines.
      	* src/workbook-view.c : Ditto.
      	* src/workbook.c : Ditto.
      
      	* src/main.c (gnumeric_main) : call e_color_init and e_color_shutdown.
      
      	* src/gnumeric-util.c (gnumeric_create_tooltip) :
      	  Rename from color -> e_color.
      	* src/style.c (style_color_new) : Ditto.
      
      	* src/gnumeric-sheet.c (gnumeric_sheet_realize) :
      	  Rename from cursor -> e_cursor.
      	* src/item-cursor.c (item_cursor_set_cursor) : Ditto.
      	* src/cell-comment.c (cell_comment_clicked) : Ditto.
      	* src/item-grid.c (item_grid_event) : Ditto.
      	* src/sheet-object.c : Ditto.
      
      	* src/color.c : Split the utilities into the gal library.
      
      	* src/Makefile.am : Remove cursors.[ch]
      
      	* configure.in : Handle the new Gnome App Lib (GAL)
      031ceea8
  9. 13 Feb, 2000 1 commit
    • Jody Goldberg's avatar
      Major rationalization of pts vs pixels and the use of margins. · b6d04cff
      Jody Goldberg authored
      Some redraw speedups and the addition of XL2000 style alpha bended selections.
      
      2000-02-13  Jody Goldberg <jgoldberg@home.com>
      
      	* ./src/sheet-view.c (sheet_view_redraw_cell_region) : redraw the
      	  bounding grid lines too.
      
      	* src/item-cursor.c (item_cursor_get_pixel_coords) : Clip the cursor
      	  region to the visible range.  The layout still needs cleaning to
      	  match the 'correct' way of implementing canvas-items, but this
      	  heuristic saves us lots of iterations through the accumulator for
      	  the size of the entire sheet.
      
      2000-02-12  Jody Goldberg <jgoldberg@home.com>
      
      	* src/gnumeric-sheet.c : Use visible flag and adjust to naming and
      	  margin changes.
      
      	* src/item-bar.c (colrow_tip_setlabel) : Use the format provided by
      	  XL2000.  Things are correct for rows, colwidth are quoted in pts
      	  rather than char widths.
      	(get_col_from_pos) : Use visible flag.
      	(item_bar_start_resize) : Function renaming.
      	(is_pointer_on_division) : Ditto.
      	(item_bar_draw) : Changes to margins.
      
      	* src/item-edit.c : Function renaming.
      	* src/item-cursor.c : Ditto.  decrease spacing for auto handle.
      
      	* src/item-grid.c (item_grid_draw) : Remove inversion process for the
      	  selection.  Instead have the cells draw their background
      	  differently.  Use the visible flag.
      	(item_grid_paint_empty_cell) : Ditto.
      	(item_grid_paint_cell) : Ditto.
      
      	* src/mstyle.c (mstyle_new_default) : The default vert alignment is BOTTOM.
      
      	* src/pattern.c (gnumeric_background_set_gc) : Draw the background of
      	  a selected cell differently.
      
      	* src/print-cell.c (DIM) : margins are already included.
      	(print_cell_text) : Adjust argument order to more closely match
      	  cell_draw.  Add support for vertical alignment of 1 line cells.
      	  Invert control of single vs multiple lines.
      	(print_cell) : Adjust to changes in the arguments.
      	(print_cell_range) : Use the visible flag.
      	  Draw line at the boundary rather than pretending there were
      	  additional rows/cols.
      
      	* src/print.c (compute_groups) : size_pts INCLUDES margins.  Use 'visible' flag.
      	(print_page) : Adjust to function renaming.
      	(print_range_used_units) : Ditto.
      
      	* src/selection.c : Include sheet-view directly for now.
      	(cb_set_row_height) : Adjust to function renaming.
      
      	* src/sheet-view.c (sheet_view_redraw_cell_region) : Adjust to function
      	  renaming.
      	(sheet_view_redraw_headers) : Ditto.
      	(sheet_view_set_zoom_factor) : Ditto.
      	(sheet_view_col_size_changed) : Ditto.
      	(sheet_view_row_size_changed) : Ditto.
      	(sheet_view_comment_get_points) : Ditto.
      
      	* src/sheet.[ch] : Rationalize function names, and add glossary.
      	Make the use of margins and sizes (in points and pixels) consistant.
      
      	(sheet_col_get_external_width : Delete.
      	(sheet_row_get_external_height : Delete.
      	(sheet_col_get_distance : Rename sheet_col_get_distance_pixels.
      	(sheet_row_get_distance : Rename sheet_row_get_distance_pixels.
      	(sheet_row_get_unit_distance : Rename sheet_row_get_distance_pts.
      	(sheet_col_get_unit_distance : Rename sheet_col_get_distance_pts.
      	(sheet_col_set_width : Rename sheet_col_set_size_pixels.
      	(sheet_col_set_width_units : Rename sheet_col_set_size_pts.
      	(sheet_row_set_height : Rename sheet_row_set_size_pixels.
      	(sheet_row_set_height_units) : Rename sheet_row_set_size_pts.
      	(sheet_get_default_external_col_width) : Rename sheet_col_get_default_size_pts.
      	(sheet_get_default_external_row_height): Rename sheet_row_get_default_size_pts.
      	(sheet_col_set_internal_width) : sheet_col_set_internal_size_pts.
      	(sheet_row_set_internal_height): sheet_row_set_internal_size_pts.
      	(sheet_{row,col}_set_default_size_pts) : New functions.
      
      	(sheet_init_default_styles) : Tune to match XL defaults.
      
      	* src/sort.c : Use g_strcasecmp, and include <stdlib.h>
      
      	* src/style.c (style_color_new) : Init the selection colour as a 50%
      	  alpha blend with lavender.
      
      	* src/style.h : Change default font to be Helvetica 9 because it will
      	  scale better when the standard 96 dpi resolution is assumed.
      	  Add a selected_color to StyleColor.
      
      	* src/value-sheet.c : Include <gnome.h> to get the
      	  internationalization support.
      
      	* src/workbook-cmd-format.c (workbook_cmd_format_column_auto_fit) :
      	  sheet_col_set_width -> sheet_col_set_size_pixels.
      	(workbook_cmd_format_column_width) :
      	  sheet_col_set_width_units -> sheet_col_set_size_pts.
      	(workbook_cmd_format_row_auto_fit) :
                sheet_row_set_height -> sheet_row_set_size_pixels
      	(workbook_cmd_format_row_height) :
      	  sheet_row_set_height_units -> sheet_row_set_size_pts.
      
      	* src/xml-io.c (xml_read_rows_info) : Rename
      	  sheet_row_set_height_units -> sheet_row_set_size_pts.
      	(xml_read_cols_info) : Rename
      	  sheet_col_set_height_units -> sheet_col_set_size_pts.
      	(xml_read_colrow_info) : Remove hack with negative pixels.
      	  Use 'visible' flag instead.
      	(xml_write_colrow_info) : Ditto.
      b6d04cff
  10. 24 Apr, 1999 1 commit
  11. 30 Sep, 1998 2 commits
    • Arturo Espinosa's avatar
    • Miguel de Icaza's avatar
      New routine to paint a little red triangle if the cell hsa notes. · 890ae3fd
      Miguel de Icaza authored
      
      1998-09-29  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/cell.c (cell_draw_comment): New routine to paint a little
      	red triangle if the cell hsa notes.
      
      	* src/cell.c (cell_destroy): Destroy the comment.
      	(str_trim_spaces): New routine.  Trims the spaces on a string.
      	(cell_draw): Trim the leading and trailing spaces on every string
      	of a multi-line text.
      
      	* src/color.c (color_init): Allocate a red for tagging the
      	spreadhseet notes.
      
      	* src/dialog-cell-format.c (format_list_fill): Apply the
      	traslation when adding the format.
      
      	* doc/tranlating.sgml: New document that describes how to
      	internationalize and localize Gnumeric properly.
      
      	* src/workbook.c (recalc_cmd): Provide a way to force a recomputation.
      	(insert_current_time_cmd): New function.  insert the current time.
      	(insert_current_date_cmd): New function.  insert the current date.
      	(insert_at_cursor): New utility function.
      
      	* src/gnumeric-sheet.c (gnumeric_sheet_key_mode_sheet): Handle control-home
      890ae3fd
  12. 12 Sep, 1998 1 commit