Commit 5f9479f7 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg
Browse files

add support for arrays and center booleans.


2001-02-20  Jody Goldberg <jgoldberg@home.com>

	* src/cell.c (cell_default_halign) : add support for arrays
	  and center booleans.
parent 290a21f3
......@@ -124,7 +124,7 @@ Dialogs
Function Breakage
-----------------
- Index : does not support 0,0 or reference syntax.
- Index : does not support 0,0 or reference syntax.
- ftest : Needs auditing. All calls to eval_pos_init_cellref are
questionable.
- address : This code is a duplicate. Have the function use the standard
......
2001-02-20 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_default_halign) : add support for arrays
and center booleans.
2001-02-20 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_write_style) : store indent.
......
2001-02-20 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_default_halign) : add support for arrays
and center booleans.
2001-02-20 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_write_style) : store indent.
......
2001-02-20 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_default_halign) : add support for arrays
and center booleans.
2001-02-20 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_write_style) : store indent.
......
2001-02-20 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_default_halign) : add support for arrays
and center booleans.
2001-02-20 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_write_style) : store indent.
......
2001-02-20 Jody Goldberg <jgoldberg@home.com>
* src/cell.c (cell_default_halign) : add support for arrays
and center booleans.
2001-02-20 Jody Goldberg <jgoldberg@home.com>
* src/xml-io.c (xml_write_style) : store indent.
......
......@@ -247,8 +247,6 @@ cell_relocate (Cell *cell, ExprRewriteInfo *rwinfo)
/* Relink the expression. */
dependent_changed (CELL_TO_DEP (cell), &cell->pos, TRUE);
}
#warning move objects
}
/****************************************************************************/
......@@ -615,12 +613,32 @@ cell_default_halign (Cell const *c, MStyle const *mstyle)
StyleHAlignFlags align = mstyle_get_align_h (mstyle);
if (align == HALIGN_GENERAL) {
Value *v;
g_return_val_if_fail (c != NULL, HALIGN_RIGHT);
if (c->base.sheet && c->base.sheet->display_formulas &&
cell_has_expr (c))
return HALIGN_LEFT;
return cell_is_number (c) ? HALIGN_RIGHT : HALIGN_LEFT;
for (v = c->value; v != NULL ; )
switch (v->type) {
case VALUE_BOOLEAN :
return HALIGN_CENTER;
case VALUE_INTEGER :
case VALUE_FLOAT :
return HALIGN_RIGHT;
case VALUE_ARRAY :
if (v->v_array.x > 0 && v->v_array.y > 0) {
v = v->v_array.vals [0][0];
break;
}
default :
return HALIGN_LEFT;
}
}
return align;
......
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