Commit a5e65a30 authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa
Browse files

The big GNUMERIC_PRINT merge into HEAD.

The big GNUMERIC_PRINT merge into HEAD.

Still some features are missing.  Check the TODO to see what is

1999-06-26  Miguel de Icaza  <>

	* 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  <>

	* 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  <>

	* 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  <>

	* 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  <>

	* 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  <>

	* 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

	* src/sheet.c (sheet_compute_col_row_new_size): Use the

1999-06-11  Miguel de Icaza  <>

	* 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  <>

	* src/utils.c (str_trim_spaces): Moved str_trim_spaces ere.

	* src/dialog-printer-setup.c (do_setup_main_dialog): Connect print

	* 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  <>

	* 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  <>

	* 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  <>

	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

1999-02-15  Miguel de Icaza  <>

	* 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  <>

	* 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.
parent c1c745c7
Change between versions 0.27 and 0.28
Print support (imported from the GNUMERIC_PRINT branch).
Pattern selector works again.
Changes between version 0.26 and 0.27
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -130,6 +130,14 @@ AM_PATH_BONOBO(0.1.0, [
dnl ******************************
dnl GnomePrint checking
dnl ******************************
GNOME_PRINT_LIBS=`gnome-config --libs print`
GNOME_PRINT_CFLAGS=`gnome-config --libs cflags`
dnl ******************************************
dnl LibGlade tests:
dnl These duplicate the things
......@@ -152,6 +160,7 @@ AC_SUBST(XML_CFLAGS)
iconsdir = $(datadir)/pixmaps/gnumeric
icons_DATA = \
orient-horizontal.png \
EXTRA_DIST = $(icons_DATA)
This diff is collapsed.
......@@ -349,7 +349,6 @@ ms_biff_bof_data_destroy (BIFF_BOF_DATA * data)
static void
biff_boundsheet_data_new (MS_EXCEL_WORKBOOK *wb, BIFF_QUERY * q, eBiff_version ver)
if (ver != eBiffV5 && /*
......@@ -425,6 +424,7 @@ biff_boundsheet_data_destroy (gpointer key, BIFF_BOUNDSHEET_DATA *d, gpointer us
return 1 ;
#if 0
......@@ -448,6 +448,7 @@ biff_nasty_font_check_function (char *name1, char *name2, int ptsize)
return name2 ;
static StyleFont*
biff_font_data_get_style_font (BIFF_FONT_DATA *fd)
......@@ -463,9 +464,11 @@ biff_font_data_get_style_font (BIFF_FONT_DATA *fd)
printf ("Curious no font name on %d\n", fd->index);
return style_font_new (gnumeric_default_font->font_name, ptsize);
style_font_ref (gnumeric_default_font);
return gnumeric_default_font;
#if 0
* FIXME: instead of just copying the windows font into the cell, we
* should implement a font name mapping mechanism.
......@@ -498,16 +501,16 @@ biff_font_data_get_style_font (BIFF_FONT_DATA *fd)
fname2 = g_strdup (fname1) ;
fname1 = biff_nasty_font_check_function (fname2, fname1, ptsize) ;
/* What about underlining? */
ans = style_font_new (fname1, ptsize) ;
g_error ("Review the font loading code here, I have changed it, so\n"
"you should update those X hacks to not use X11 font names, but\n"
"gnome-print font-names.");
g_warning ("Review this font size, I used a pretty much rough guess");
ans = style_font_new (fname1, fd->height / 2, 1.0, fd->boldness >= 0x2bc, fd->italic);
g_free (fname1) ;
if (fd->italic)
ans->hint_is_italic = 1 ;
if (fd->boldness >= 0x2bc)
ans->hint_is_bold = 1 ;
return ans ;
......@@ -1009,7 +1012,6 @@ static StyleColor *
ms_excel_set_cell_font (MS_EXCEL_SHEET * sheet, Cell * cell, BIFF_XF_DATA * xf)
BIFF_FONT_DATA *fd = g_hash_table_lookup (sheet->wb->font_data, &xf->font_idx);
StyleColor *col;
if (!fd) {
printf ("Unknown font idx %d\n", xf->font_idx);
......@@ -1576,85 +1576,125 @@ void eng_functions_init()
FunctionCategory *cat = function_get_category (_("Engineering"));
#if 0
function_add_args (cat, "besseli", "ff", "xnum,ynum", &help_besseli,
function_add_args (
cat, "besseli", "ff", "xnum,ynum",
&help_besseli, gnumeric_besseli);
function_add_args (
cat, "besselk", "ff", "xnum,ynum",
&help_besselk, gnumeric_besselk);
function_add_args (cat, "besselj", "ff", "xnum,ynum", &help_besselj,
#if 0
function_add_args (cat, "besselk", "ff", "xnum,ynum", &help_besselk,
function_add_args (cat, "bessely", "ff", "xnum,ynum", &help_bessely,
function_add_args (cat, "bin2dec", "?", "number", &help_bin2dec,
function_add_args (cat, "bin2hex", "?|f", "xnum,ynum", &help_bin2hex,
function_add_args (cat, "bin2oct", "?|f", "xnum,ynum", &help_bin2oct,
function_add_args (cat, "complex", "ff|s", "real,im[,suffix]", &help_complex,
function_add_args (cat, "convert", "fss", "number,from_unit,to_unit", &help_convert,
function_add_args (cat, "dec2bin", "?|f", "xnum,ynum", &help_dec2bin,
function_add_args (cat, "dec2oct", "?|f", "xnum,ynum", &help_dec2oct,
function_add_args (cat, "dec2hex", "?|f", "xnum,ynum", &help_dec2hex,
function_add_args (cat, "delta", "f|f", "xnum,ynum", &help_delta,
function_add_args (cat, "erf", "f|f", "lower,upper", &help_erf,
gnumeric_erf );
function_add_args (cat, "erfc", "f", "number", &help_erfc,
function_add_args (cat, "gestep", "f|f", "xnum,ynum", &help_gestep,
function_add_args (cat, "hex2bin", "?|f", "xnum,ynum", &help_hex2bin,
function_add_args (cat, "hex2dec", "?", "number", &help_hex2dec,
function_add_args (cat, "hex2oct", "?|f", "xnum,ynum", &help_hex2oct,
function_add_args (cat, "imabs", "?", "inumber", &help_imabs,
function_add_args (cat, "imaginary", "?", "inumber", &help_imaginary,
function_add_args (cat, "imargument", "?", "inumber", &help_imargument,
function_add_args (cat, "imconjugate", "?", "inumber", &help_imconjugate,
function_add_args (cat, "imcos", "?", "inumber", &help_imcos,
function_add_args (cat, "imdiv", "??", "inumber,inumber", &help_imdiv,
function_add_args (cat, "imexp", "?", "inumber", &help_imexp,
function_add_args (cat, "imln", "?", "inumber", &help_imln,
function_add_args (cat, "imlog10", "?", "inumber", &help_imlog10,
function_add_args (cat, "imlog2", "?", "inumber", &help_imlog2,
function_add_args (cat, "impower", "??", "inumber,inumber", &help_impower,
function_add_nodes (cat, "improduct", "??", "inumber,inumber", &help_improduct,
function_add_args (cat, "imreal", "?", "inumber", &help_imreal,
function_add_args (cat, "imsin", "?", "inumber", &help_imsin,
function_add_args (cat, "imsqrt", "?", "inumber", &help_imsqrt,
function_add_args (cat, "imsub", "??", "inumber,inumber", &help_imsub,
function_add_nodes (cat, "imsum", "??", "inumber,inumber", &help_imsum,
function_add_args (cat, "oct2bin", "?|f", "xnum,ynum", &help_oct2bin,
function_add_args (cat, "oct2dec", "?", "number", &help_oct2dec,
function_add_args (cat, "oct2hex", "?|f", "xnum,ynum", &help_oct2hex,
function_add_args (
cat, "besselj", "ff", "xnum,ynum",
&help_besselj, gnumeric_besselj);
function_add_args (
cat, "bessely", "ff", "xnum,ynum",
&help_bessely, gnumeric_bessely);
function_add_args (
cat, "bin2dec", "?", "number",
&help_bin2dec, gnumeric_bin2dec);
function_add_args (
cat, "bin2hex", "?|f", "xnum,ynum",
&help_bin2hex, gnumeric_bin2hex);
function_add_args (
cat, "bin2oct", "?|f", "xnum,ynum",
&help_bin2oct, gnumeric_bin2oct);
function_add_args (
cat, "complex", "ff|s", "real,im[,suffix]",
&help_complex, gnumeric_complex);
function_add_args (
cat, "convert", "fss", "number,from_unit,to_unit",
&help_convert, gnumeric_convert);
function_add_args (
cat, "dec2bin", "?|f", "xnum,ynum",
&help_dec2bin, gnumeric_dec2bin);
function_add_args (
cat, "dec2oct", "?|f", "xnum,ynum",
&help_dec2oct, gnumeric_dec2oct);
function_add_args (
cat, "dec2hex", "?|f", "xnum,ynum",
&help_dec2hex, gnumeric_dec2hex);
function_add_args (
cat, "delta", "f|f", "xnum,ynum",
&help_delta, gnumeric_delta);
function_add_args (
cat, "erf", "f|f", "lower,upper",
&help_erf, gnumeric_erf );
function_add_args (
cat, "erfc", "f", "number",
&help_erfc, gnumeric_erfc);
function_add_args (
cat, "gestep", "f|f", "xnum,ynum",
&help_gestep, gnumeric_gestep);
function_add_args (
cat, "hex2bin", "?|f", "xnum,ynum",
&help_hex2bin, gnumeric_hex2bin);
function_add_args (
cat, "hex2dec", "?", "number",
&help_hex2dec, gnumeric_hex2dec);
function_add_args (
cat, "hex2oct", "?|f", "xnum,ynum",
&help_hex2oct, gnumeric_hex2oct);
function_add_args (
cat, "imabs", "?", "inumber",
&help_imabs, gnumeric_imabs);
function_add_args (
cat, "imaginary", "?", "inumber",
&help_imaginary, gnumeric_imaginary);
function_add_args (
cat, "imargument", "?", "inumber",
&help_imargument, gnumeric_imargument);
function_add_args (
cat, "imconjugate", "?", "inumber",
&help_imconjugate, gnumeric_imconjugate);
function_add_args (
cat, "imcos", "?", "inumber",
&help_imcos, gnumeric_imcos);
function_add_args (
cat, "imtan", "?", "inumber",
&help_imtan, gnumeric_imtan);
function_add_args (
cat, "imdiv", "??", "inumber,inumber",
&help_imdiv, gnumeric_imdiv);
function_add_args (
cat, "imexp", "?", "inumber",
&help_imexp, gnumeric_imexp);
function_add_args (
cat, "imln", "?", "inumber",
&help_imln, gnumeric_imln);
function_add_args (
cat, "imlog10", "?", "inumber",
&help_imlog10, gnumeric_imlog10);
function_add_args (
cat, "imlog2", "?", "inumber",
&help_imlog2, gnumeric_imlog2);
function_add_args (
cat, "impower", "??", "inumber,inumber",
&help_impower, gnumeric_impower);
function_add_nodes (
cat, "improduct", "??", "inumber,inumber",
&help_improduct, gnumeric_improduct);
function_add_args (
cat, "imreal", "?", "inumber",
&help_imreal, gnumeric_imreal);
function_add_args (
cat, "imsin", "?", "inumber",
&help_imsin, gnumeric_imsin);
function_add_args (
cat, "imsqrt", "?", "inumber",
&help_imsqrt, gnumeric_imsqrt);
function_add_args (
cat, "imsub", "??", "inumber,inumber",
&help_imsub, gnumeric_imsub);
function_add_nodes (
cat, "imsum", "??", "inumber,inumber",
&help_imsum, gnumeric_imsum);
function_add_args (
cat, "oct2bin", "?|f", "xnum,ynum",
&help_oct2bin, gnumeric_oct2bin);
function_add_args (
cat, "oct2dec", "?", "number",
&help_oct2dec, gnumeric_oct2dec);
function_add_args (
cat, "oct2hex", "?|f", "xnum,ynum",
&help_oct2hex, gnumeric_oct2hex);
......@@ -28,7 +28,6 @@ enum Value_Class {
static enum Value_Class
get_value_class (FunctionEvalInfo *ei, ExprTree *expr)
char *error_string;
Value *value;
enum Value_Class res;
......@@ -36,6 +36,7 @@ static char *help_address = {
"If @row_num or @col_num is less than one, ADDRESS returns #NUM! "
"error. "
......@@ -70,7 +71,7 @@ gnumeric_address (FunctionEvalInfo *ei, Value **args)
text[0] = '\0';
} else {
gchar *p = args[4]->v.str->str;
int n=0, space=0;
int space = 0;
text = g_new(gchar, strlen(p) + 3);
while (*p)
......@@ -1602,8 +1602,7 @@ static Value *
gnumeric_critbinom (FunctionEvalInfo *ei, Value **argv)
int trials;
float_t p, alpha, sum;
int x;
float_t p, alpha;
trials = value_get_as_int (argv [0]);
p = value_get_as_float (argv[1]);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment