Commit fa9f5634 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Everything can now return an empty during evaluation.


2004-10-16  Jody Goldberg <jody@gnome.org>

	* src/func.c (function_call_with_list) : Everything can now return an
	  empty during evaluation.

2004-10-16  Jody Goldberg <jody@gnome.org>

	* src/sheet-object-cell-comment.c (cell_comment_new_view) : add
	  bounds-changed handler.
	(cell_comment_event) : This now takes a GnmPane, not an scg.

	* src/sheet-object-cell-comment.c : Add a text property.
parent 50f862bf
2004-10-16 Jody Goldberg <jody@gnome.org>
* src/func.c (function_call_with_list) : Everything can now return an
empty during evaluation.
2004-10-16 Jody Goldberg <jody@gnome.org>
* src/sheet-object-cell-comment.c (cell_comment_new_view) : add
bounds-changed handler.
(cell_comment_event) : This now takes a GnmPane, not an scg.
* src/sheet-object-cell-comment.c : Add a text property.
2004-10-14 Morten Welinder <terra@gnome.org>
* src/gutils.c (gnm_usr_dir): Use g_build_filename. Note, that
......
......@@ -4,6 +4,7 @@ Jody:
* Enable selecting and moving multiple drawing objects
* Swap X & Y axis content when importing xls bar plots. [#154734]
* Basic handling for XL 'Forms' Objects
* Fix handling of empty arguments in nested expressions
Morten:
* Implement Edit->Select->Input. [#154735]
......
2004-10-16 Jody Goldberg <jody@gnome.org>
* src/func.c (function_call_with_list) : Everything can now return an
empty during evaluation.
2004-10-16 Jody Goldberg <jody@gnome.org>
* src/sheet-object-cell-comment.c (cell_comment_new_view) : add
bounds-changed handler.
(cell_comment_event) : This now takes a GnmPane, not an scg.
* src/sheet-object-cell-comment.c : Add a text property.
2004-10-14 Morten Welinder <terra@gnome.org>
* src/gutils.c (gnm_usr_dir): Use g_build_filename. Note, that
......
No preview for this file type
......@@ -827,8 +827,8 @@ function_call_with_list (FunctionEvalInfo *ei, GnmExprList *l,
/* force scalars whenever we are certain */
tmp = args[i] = gnm_expr_eval (expr, ei->pos,
((iter_count >= 0 || arg_type == '?')
? GNM_EXPR_EVAL_PERMIT_NON_SCALAR
: GNM_EXPR_EVAL_PERMIT_EMPTY));
? (GNM_EXPR_EVAL_PERMIT_EMPTY | GNM_EXPR_EVAL_PERMIT_NON_SCALAR)
: (GNM_EXPR_EVAL_PERMIT_EMPTY)));
if (arg_type == '?') /* '?' arguments are unrestriced */
continue;
......
......@@ -47,6 +47,7 @@ struct _GnmComment {
typedef SheetObjectClass GnmCommentClass;
enum {
CC_PROP_0,
CC_PROP_TEXT,
CC_PROP_MARKUP
};
......@@ -160,6 +161,10 @@ cell_comment_set_property (GObject *obj, guint param_id,
GList *ptr;
switch (param_id) {
case CC_PROP_TEXT:
g_free (cc->text);
cc->text = g_strdup (g_value_get_string (value));
break;
case CC_PROP_MARKUP :
if (cc->markup != NULL)
pango_attr_list_unref (cc->markup);
......@@ -183,6 +188,9 @@ cell_comment_get_property (GObject *obj, guint param_id,
{
GnmComment *cc = CELL_COMMENT (obj);
switch (param_id) {
case CC_PROP_TEXT :
g_value_set_string (value, cc->text);
break;
case CC_PROP_MARKUP :
g_value_set_boxed (value, cc->markup);
break;
......@@ -193,11 +201,12 @@ cell_comment_get_property (GObject *obj, guint param_id,
}
static int
cell_comment_event (FooCanvasItem *view, GdkEvent *event, SheetControlGUI *scg)
cell_comment_event (FooCanvasItem *view, GdkEvent *event, GnmPane *pane)
{
GnmComment *cc;
SheetObject *so;
GnmRange const *r;
SheetControlGUI *scg;
switch (event->type) {
default:
......@@ -212,6 +221,7 @@ cell_comment_event (FooCanvasItem *view, GdkEvent *event, SheetControlGUI *scg)
break;
}
scg = pane->gcanvas->simple.scg;
so = sheet_object_view_get_so (SHEET_OBJECT_VIEW (view));
cc = CELL_COMMENT (so);
......@@ -242,6 +252,15 @@ cell_comment_event (FooCanvasItem *view, GdkEvent *event, SheetControlGUI *scg)
return TRUE;
}
static void
cb_bounds_changed (SheetObject *so, FooCanvasItem *sov)
{
double coords[4];
SheetControlGUI *scg = GNM_SIMPLE_CANVAS (sov->canvas)->scg;
scg_object_anchor_to_coords (scg, sheet_object_get_anchor (so), coords);
sheet_object_view_set_bounds (SHEET_OBJECT_VIEW (sov),
coords, so->flags & SHEET_OBJECT_IS_VISIBLE);
}
static SheetObjectView *
cell_comment_new_view (SheetObject *so, SheetObjectViewContainer *container)
{
......@@ -254,6 +273,8 @@ cell_comment_new_view (SheetObject *so, SheetObjectViewContainer *container)
g_signal_connect (view,
"event",
G_CALLBACK (cell_comment_event), container);
g_signal_connect_object (so, "bounds-changed",
G_CALLBACK (cb_bounds_changed), view, 0);
return SHEET_OBJECT_VIEW (view);
}
......@@ -326,6 +347,9 @@ cell_comment_class_init (GObjectClass *gobject_class)
gobject_class->finalize = cell_comment_finalize;
gobject_class->set_property = cell_comment_set_property;
gobject_class->get_property = cell_comment_get_property;
g_object_class_install_property (gobject_class, CC_PROP_TEXT,
g_param_spec_string ("text", NULL, NULL, NULL,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
g_object_class_install_property (gobject_class, CC_PROP_MARKUP,
g_param_spec_boxed ("markup", NULL, NULL,
PANGO_TYPE_ATTR_LIST,
......
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