Commit a6ac8c46 authored by JodyGoldberg's avatar JodyGoldberg Committed by Jody Goldberg
Browse files

Use the last element as a catch all. eg [>10][Blue]0;0 will fmt 1 in black

2005-10-14  Jody Goldberg <jody@gnome.org>

	* src/gnm-format.c (format_value_gstring) : Use the last element as a
	  catch all. eg [>10][Blue]0;0 will fmt 1 in black even though it's
	  implicit condition is <0
parent 58228881
......@@ -56,6 +56,10 @@ Architecture Changes
- ssconvert for non-gnome (DONE)
- Merge wb_control_init_state and wb_control_set_view
- Check format accelerators
: Looks like ctrl-~ is General not number
: Can not replicate ctrl-! as accounting with 2k or xp, check 2003
1) things to move into libgoffice
1.1) plugin-manager dialog
1.2) doc meta data
......
2005-10-14 Jody Goldberg <jody@gnome.org>
* src/gnm-format.c (format_value_gstring) : Use the last element as a
catch all. eg [>10][Blue]0;0 will fmt 1 in black even though it's
implicit condition is <0
* src/sheet-view.c (sv_freeze_panes) : if frozen == unfrozen unfreeze
things.
......
2005-10-14 Jody Goldberg <jody@gnome.org>
* src/gnm-format.c (format_value_gstring) : Use the last element as a
catch all. eg [>10][Blue]0;0 will fmt 1 in black even though it's
implicit condition is <0
* src/sheet-view.c (sv_freeze_panes) : if frozen == unfrozen unfreeze
things.
......
......@@ -92,25 +92,17 @@ format_value_gstring (GString *result, GOFormat const *format,
if (format == NULL)
format = VALUE_FMT (value);
/* Use top left corner of an array result.
* This wont work for ranges because we dont't have a location
*/
/* Use top left corner of an array result. This will not work for
* ranges because we dont't have a location */
if (value->type == VALUE_ARRAY)
value = value_area_fetch_x_y (value, 0, 0, NULL);
if (format) {
for (list = format->entries; list; list = list->next)
if (gnm_style_format_condition (list->data, value))
if (gnm_style_format_condition (entry = list->data, value))
break;
if (list == NULL &&
(value->type == VALUE_INTEGER || value->type == VALUE_FLOAT))
list = format->entries;
/* If nothing matches treat it as General */
if (list != NULL) {
entry = list->data;
if (entry != NULL) {
/* Empty formats should be ignored */
if (entry->format[0] == '\0')
return;
......@@ -199,4 +191,3 @@ format_value (GOFormat const *format, GnmValue const *value, GOColor *go_color,
format_value_gstring (result, format, value, go_color, col_width, date_conv);
return g_string_free (result, FALSE);
}
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