Commit dc9c0aee authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg
Browse files

Any form of General will need a width. Default to full precision.


2000-11-02  Jody Goldberg <jgoldberg@home.com>

	* src/rendered-value.c (rendered_value_new_ext) : Any form of General
	  will need a width.  Default to full precision.

	* src/cell.c (cell_set_value) : Do not both to assign optional formats
	  of General
parent c796e778
2000-11-02 Jody Goldberg <jgoldberg@home.com>
* src/rendered-value.c (rendered_value_new_ext) : Any form of General
will need a width. Default to full precision.
* src/cell.c (cell_set_value) : Do not both to assign optional formats
of General
2000-11-02 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (cb_file_new) : We need to create a
......
2000-11-02 Jody Goldberg <jgoldberg@home.com>
* src/rendered-value.c (rendered_value_new_ext) : Any form of General
will need a width. Default to full precision.
* src/cell.c (cell_set_value) : Do not both to assign optional formats
of General
2000-11-02 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (cb_file_new) : We need to create a
......
2000-11-02 Jody Goldberg <jgoldberg@home.com>
* src/rendered-value.c (rendered_value_new_ext) : Any form of General
will need a width. Default to full precision.
* src/cell.c (cell_set_value) : Do not both to assign optional formats
of General
2000-11-02 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (cb_file_new) : We need to create a
......
2000-11-02 Jody Goldberg <jgoldberg@home.com>
* src/rendered-value.c (rendered_value_new_ext) : Any form of General
will need a width. Default to full precision.
* src/cell.c (cell_set_value) : Do not both to assign optional formats
of General
2000-11-02 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (cb_file_new) : We need to create a
......
2000-11-02 Jody Goldberg <jgoldberg@home.com>
* src/rendered-value.c (rendered_value_new_ext) : Any form of General
will need a width. Default to full precision.
* src/cell.c (cell_set_value) : Do not both to assign optional formats
of General
2000-11-02 Jody Goldberg <jgoldberg@home.com>
* src/workbook-control-gui.c (cb_file_new) : We need to create a
......
......@@ -430,7 +430,8 @@ cell_set_value (Cell *cell, Value *v, StyleFormat *opt_fmt)
cell_dirty (cell);
cell_cleanout (cell);
cell->format = opt_fmt;
cell->format = (opt_fmt == NULL || style_format_is_general (opt_fmt))
? NULL : opt_fmt;
cell->value = v;
cell_render_value (cell);
......
......@@ -1884,7 +1884,7 @@ style_format_unref (StyleFormat *sf)
}
gboolean
style_format_is_general(StyleFormat const *sf)
style_format_is_general (StyleFormat const *sf)
{
return 0 == strcmp (sf->format, "General");
}
......
......@@ -70,7 +70,7 @@ rendered_value_new_ext (Cell *cell, MStyle *mstyle)
RenderedValue *res;
Sheet *sheet;
StyleColor *color;
float col_width = 0.;
float col_width = -1.;
char *str;
g_return_val_if_fail (cell != NULL, NULL);
......@@ -94,7 +94,8 @@ rendered_value_new_ext (Cell *cell, MStyle *mstyle)
/* For format general approximate the cell width in characters */
if (style_format_is_general(format)) {
if (cell->format == NULL) {
if (cell->format == NULL ||
style_format_is_general (cell->format)) {
StyleFont *style_font =
sheet_view_get_style_font (sheet, mstyle);
GdkFont *gdk_font =
......
Markdown is supported
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