gnumeric r16477 - in branches/gnumeric-1-8: . src src/dialogs
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16477 - in branches/gnumeric-1-8: . src src/dialogs
- Date: Thu, 27 Mar 2008 22:38:18 +0000 (GMT)
Author: mortenw
Date: Thu Mar 27 22:38:17 2008
New Revision: 16477
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16477&view=rev
Log:
2008-03-27 Morten Welinder <terra gnome org>
* src/expr.c (gnm_expr_top_is_array_corner): New function. (I
have plans for gnm_expr_top_get_array_corner.)
Modified:
branches/gnumeric-1-8/ChangeLog
branches/gnumeric-1-8/src/cell.c
branches/gnumeric-1-8/src/clipboard.c
branches/gnumeric-1-8/src/dialogs/dialog-preferences.c
branches/gnumeric-1-8/src/expr.c
branches/gnumeric-1-8/src/expr.h
branches/gnumeric-1-8/src/xml-sax-write.c
Modified: branches/gnumeric-1-8/src/cell.c
==============================================================================
--- branches/gnumeric-1-8/src/cell.c (original)
+++ branches/gnumeric-1-8/src/cell.c Thu Mar 27 22:38:17 2008
@@ -427,7 +427,7 @@
gnm_cell_is_array (GnmCell const *cell)
{
return cell != NULL && gnm_cell_has_expr (cell) &&
- (gnm_expr_top_get_array_corner (cell->base.texpr) ||
+ (gnm_expr_top_is_array_corner (cell->base.texpr) ||
gnm_expr_top_is_array_elem (cell->base.texpr));
}
Modified: branches/gnumeric-1-8/src/clipboard.c
==============================================================================
--- branches/gnumeric-1-8/src/clipboard.c (original)
+++ branches/gnumeric-1-8/src/clipboard.c Thu Mar 27 22:38:17 2008
@@ -220,7 +220,7 @@
gnm_expr_top_unref (relo);
relo = trelo;
}
- } else if (!relo && gnm_expr_top_get_array_corner (src->texpr)) {
+ } else if (!relo && gnm_expr_top_is_array_corner (src->texpr)) {
/* We must not share array expressions. */
relo = gnm_expr_top_new (gnm_expr_copy (src->texpr->expr));
}
Modified: branches/gnumeric-1-8/src/dialogs/dialog-preferences.c
==============================================================================
--- branches/gnumeric-1-8/src/dialogs/dialog-preferences.c (original)
+++ branches/gnumeric-1-8/src/dialogs/dialog-preferences.c Thu Mar 27 22:38:17 2008
@@ -765,7 +765,7 @@
{N_("Header/Footer"), GTK_STOCK_ITALIC, "0", &pref_font_hf_initializer, NULL},
{N_("Sorting"), GTK_STOCK_SORT_ASCENDING, "3", &pref_sort_page_initializer, NULL},
{N_("Screen"), GTK_STOCK_PREFERENCES, "5", &pref_screen_page_initializer, NULL},
- {NULL, NULL, NULL, NULL, NULL, NULL},
+ {NULL, NULL, NULL, NULL, NULL },
};
static void
Modified: branches/gnumeric-1-8/src/expr.c
==============================================================================
--- branches/gnumeric-1-8/src/expr.c (original)
+++ branches/gnumeric-1-8/src/expr.c Thu Mar 27 22:38:17 2008
@@ -2810,7 +2810,7 @@
res = gnm_expr_top_relocate (texpr, &rinfo, FALSE);
if (!res) {
- if (gnm_expr_top_get_array_corner (texpr))
+ if (gnm_expr_top_is_array_corner (texpr))
res = gnm_expr_top_new (gnm_expr_copy (texpr->expr));
else
gnm_expr_top_ref ((res = texpr));
@@ -2928,6 +2928,13 @@
}
gboolean
+gnm_expr_top_is_array_corner (GnmExprTop const *texpr)
+{
+ g_return_val_if_fail (IS_GNM_EXPR_TOP (texpr), FALSE);
+ return GNM_EXPR_GET_OPER (texpr->expr) == GNM_EXPR_OP_ARRAY_CORNER;
+}
+
+gboolean
gnm_expr_top_is_array_elem (GnmExprTop const *texpr)
{
g_return_val_if_fail (IS_GNM_EXPR_TOP (texpr), FALSE);
Modified: branches/gnumeric-1-8/src/expr.h
==============================================================================
--- branches/gnumeric-1-8/src/expr.h (original)
+++ branches/gnumeric-1-8/src/expr.h Thu Mar 27 22:38:17 2008
@@ -118,6 +118,7 @@
gboolean gnm_expr_top_is_err (GnmExprTop const *texpr, GnmStdError e);
gboolean gnm_expr_top_is_rangeref (GnmExprTop const *texpr);
gboolean gnm_expr_top_is_array_elem (GnmExprTop const *texpr);
+gboolean gnm_expr_top_is_array_corner (GnmExprTop const *texpr);
GnmExprArrayCorner const *gnm_expr_top_get_array_corner (GnmExprTop const *texpr);
GnmValue *gnm_expr_top_get_range (GnmExprTop const *texpr);
GSList *gnm_expr_top_get_ranges (GnmExprTop const *texpr);
Modified: branches/gnumeric-1-8/src/xml-sax-write.c
==============================================================================
--- branches/gnumeric-1-8/src/xml-sax-write.c (original)
+++ branches/gnumeric-1-8/src/xml-sax-write.c Thu Mar 27 22:38:17 2008
@@ -754,7 +754,7 @@
/* As of version 0.53 we save the size of the array as attributes */
/* As of version 0.57 the attributes are in the Cell not the Content */
- if (texpr && gnm_expr_top_get_array_corner (texpr)) {
+ if (texpr && gnm_expr_top_is_array_corner (texpr)) {
gsf_xml_out_add_int (state->output, "Rows", texpr->expr->array_corner.rows);
gsf_xml_out_add_int (state->output, "Cols", texpr->expr->array_corner.cols);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]