[gnumeric] Func: simplify placeholder creation, part 1.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Func: simplify placeholder creation, part 1.
- Date: Fri, 11 Jan 2013 01:02:06 +0000 (UTC)
commit 91a677f5993703bd9572363cc0e9b48060e3bac2
Author: Morten Welinder <terra gnome org>
Date: Thu Jan 10 20:01:46 2013 -0500
Func: simplify placeholder creation, part 1.
ChangeLog | 4 +
plugins/openoffice/openoffice-read.c | 40 ++++----
src/func.c | 6 +-
src/func.h | 4 +-
src/tools/analysis-anova.c | 40 ++++----
src/tools/analysis-exp-smoothing.c | 62 ++++++------
src/tools/analysis-frequency.c | 14 ++--
src/tools/analysis-histogram.c | 18 ++--
src/tools/analysis-kaplan-meier.c | 14 ++--
src/tools/analysis-normality.c | 6 +-
src/tools/analysis-one-mean-test.c | 14 ++--
src/tools/analysis-principal-components.c | 30 ++----
src/tools/analysis-sign-test.c | 28 +++---
src/tools/analysis-tools.c | 159 ++++++++++++++--------------
src/tools/analysis-wilcoxon-mann-whitney.c | 23 ++--
src/tools/random-generator-cor.c | 12 +--
src/wbc-gtk.c | 3 +-
src/workbook-cmd-format.c | 4 +-
18 files changed, 231 insertions(+), 250 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 68dab8a..0b1eb72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2013-01-10 Morten Welinder <terra gnome org>
+ * src/func.c (gnm_func_lookup_or_add_placeholder): Drop copy_name
+ argument and assume TRUE. Drop scope name and assume NULL (which
+ is what all callers should have used). All callers changed.
+
* src/gnm-plugin.c (plugin_service_function_group_activate):
Upgrade existing placeholder functions as needed.
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index d99fa72..ec7da39 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -10880,7 +10880,7 @@ odf_func_address_handler (GnmConventions const *convs, Workbook *scope, GnmExprL
if (argc == 4 && convs->sheet_name_sep == '!') {
/* Openoffice was missing the A1 parameter */
GnmExprList *new_args;
- GnmFunc *f = gnm_func_lookup_or_add_placeholder ("ADDRESS", scope, FALSE);
+ GnmFunc *f = gnm_func_lookup_or_add_placeholder ("ADDRESS");
new_args = g_slist_insert ((GSList *) args,
(gpointer) gnm_expr_new_constant (value_new_int (1)),
@@ -10893,7 +10893,7 @@ odf_func_address_handler (GnmConventions const *convs, Workbook *scope, GnmExprL
static GnmExpr const *
odf_func_phi_handler (G_GNUC_UNUSED GnmConventions const *convs, Workbook *scope, GnmExprList *args)
{
- GnmFunc *f = gnm_func_lookup_or_add_placeholder ("NORMDIST", scope, FALSE);
+ GnmFunc *f = gnm_func_lookup_or_add_placeholder ("NORMDIST");
args = g_slist_append (args,
(gpointer) gnm_expr_new_constant (value_new_int (0)));
@@ -10902,7 +10902,7 @@ odf_func_phi_handler (G_GNUC_UNUSED GnmConventions const *convs, Workbook *scope
args = g_slist_append (args,
(gpointer) gnm_expr_new_funcall
- (gnm_func_lookup_or_add_placeholder ("FALSE", scope, FALSE), NULL));
+ (gnm_func_lookup_or_add_placeholder ("FALSE"), NULL));
return gnm_expr_new_funcall (f, args);
}
@@ -10911,8 +10911,8 @@ static GnmExpr const *
odf_func_gauss_handler (G_GNUC_UNUSED GnmConventions const *convs, Workbook *scope, GnmExprList *args)
{
guint argc = gnm_expr_list_length (args);
- GnmFunc *f = gnm_func_lookup_or_add_placeholder ("ERF", scope, FALSE);
- GnmFunc *fs = gnm_func_lookup_or_add_placeholder ("SQRT", scope, FALSE);
+ GnmFunc *f = gnm_func_lookup_or_add_placeholder ("ERF");
+ GnmFunc *fs = gnm_func_lookup_or_add_placeholder ("SQRT");
GnmExpr const * expr;
if (argc != 1)
@@ -10947,15 +10947,15 @@ odf_func_floor_handler (G_GNUC_UNUSED GnmConventions const *convs, Workbook *sco
if (argc == 0 || argc > 3)
return NULL;
- fd_ceiling = gnm_func_lookup_or_add_placeholder ("CEILING", scope, FALSE);
- fd_floor = gnm_func_lookup_or_add_placeholder ("FLOOR", scope, FALSE);
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", scope, FALSE);
+ fd_ceiling = gnm_func_lookup_or_add_placeholder ("CEILING");
+ fd_floor = gnm_func_lookup_or_add_placeholder ("FLOOR");
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
expr_x = g_slist_nth_data ((GSList *) args, 0);
if (argc > 1)
expr_sig = gnm_expr_copy (g_slist_nth_data ((GSList *) args, 1));
else {
- GnmFunc *fd_sign = gnm_func_lookup_or_add_placeholder ("SIGN", scope, FALSE);
+ GnmFunc *fd_sign = gnm_func_lookup_or_add_placeholder ("SIGN");
expr_sig = gnm_expr_new_funcall1 (fd_sign, gnm_expr_copy (expr_x));
}
@@ -11023,7 +11023,7 @@ odf_func_ceiling_handler (G_GNUC_UNUSED GnmConventions const *convs, Workbook *s
guint argc = gnm_expr_list_length (args);
switch (argc) {
case 1: {
- GnmFunc *f = gnm_func_lookup_or_add_placeholder ("CEIL", scope, FALSE);
+ GnmFunc *f = gnm_func_lookup_or_add_placeholder ("CEIL");
return gnm_expr_new_funcall (f, args);
}
case 2: case 3: {
@@ -11034,9 +11034,9 @@ odf_func_ceiling_handler (G_GNUC_UNUSED GnmConventions const *convs, Workbook *s
GnmExpr const *expr_x = g_slist_nth_data ((GSList *) args, 0);
GnmExpr const *expr_sig = g_slist_nth_data ((GSList *) args, 1);
- GnmFunc *fd_ceiling = gnm_func_lookup_or_add_placeholder ("CEILING", scope, FALSE);
- GnmFunc *fd_floor = gnm_func_lookup_or_add_placeholder ("FLOOR", scope, FALSE);
- GnmFunc *fd_if = gnm_func_lookup_or_add_placeholder ("IF", scope, FALSE);
+ GnmFunc *fd_ceiling = gnm_func_lookup_or_add_placeholder ("CEILING");
+ GnmFunc *fd_floor = gnm_func_lookup_or_add_placeholder ("FLOOR");
+ GnmFunc *fd_if = gnm_func_lookup_or_add_placeholder ("IF");
expr_mode_zero = gnm_expr_new_funcall3
(fd_if,
@@ -11101,7 +11101,7 @@ odf_func_chisqdist_handler (G_GNUC_UNUSED GnmConventions const *convs, Workbook
{
switch (gnm_expr_list_length (args)) {
case 2: {
- GnmFunc *f = gnm_func_lookup_or_add_placeholder ("R.PCHISQ", scope, FALSE);
+ GnmFunc *f = gnm_func_lookup_or_add_placeholder ("R.PCHISQ");
return gnm_expr_new_funcall (f, args);
}
case 3: {
@@ -11115,9 +11115,9 @@ odf_func_chisqdist_handler (G_GNUC_UNUSED GnmConventions const *convs, Workbook
GnmExpr const *expr_dchisq;
GnmExpr const *res, *simp;
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", scope, FALSE);
- fd_pchisq = gnm_func_lookup_or_add_placeholder ("R.PCHISQ", scope, FALSE);
- fd_dchisq = gnm_func_lookup_or_add_placeholder ("R.DCHISQ", scope, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
+ fd_pchisq = gnm_func_lookup_or_add_placeholder ("R.PCHISQ");
+ fd_dchisq = gnm_func_lookup_or_add_placeholder ("R.DCHISQ");
expr_pchisq = gnm_expr_new_funcall2
(fd_pchisq,
gnm_expr_copy (arg0),
@@ -11635,14 +11635,14 @@ oo_func_map_in (GnmConventions const *convs, Workbook *scope,
}
if (0 == g_ascii_strncasecmp (name, GnumericPrefix, sizeof (GnumericPrefix)-1)) {
- f = gnm_func_lookup_or_add_placeholder (name+sizeof (GnumericPrefix)-1, scope, TRUE);
+ f = gnm_func_lookup_or_add_placeholder (name+sizeof (GnumericPrefix)-1);
} else if (0 != g_ascii_strncasecmp (name, OOoAnalysisPrefix, sizeof (OOoAnalysisPrefix)-1)) {
if (NULL != namemap &&
NULL != (new_name = g_hash_table_lookup (namemap, name)))
name = new_name;
- f = gnm_func_lookup_or_add_placeholder (name, scope, TRUE);
+ f = gnm_func_lookup_or_add_placeholder (name);
} else
- f = gnm_func_lookup_or_add_placeholder (name+sizeof (OOoAnalysisPrefix)-1, scope, TRUE);
+ f = gnm_func_lookup_or_add_placeholder (name+sizeof (OOoAnalysisPrefix)-1);
return gnm_expr_new_funcall (f, args);
}
diff --git a/src/func.c b/src/func.c
index b158a51..5b4a274 100644
--- a/src/func.c
+++ b/src/func.c
@@ -1367,11 +1367,11 @@ gnm_func_add_placeholder_localized (char const *gname, char const *lname)
/* Utility routine to be used for import and analysis tools */
GnmFunc *
-gnm_func_lookup_or_add_placeholder (char const *name, Workbook *scope, gboolean copy_name)
+gnm_func_lookup_or_add_placeholder (char const *name)
{
- GnmFunc * f = gnm_func_lookup (name, scope);
+ GnmFunc * f = gnm_func_lookup (name, NULL);
if (f == NULL)
- f = gnm_func_add_placeholder (scope, name, "", copy_name);
+ f = gnm_func_add_placeholder (NULL, name, "", TRUE);
return f;
}
diff --git a/src/func.h b/src/func.h
index 1d7a826..af26910 100644
--- a/src/func.h
+++ b/src/func.h
@@ -243,9 +243,7 @@ GnmFunc *gnm_func_add_placeholder (Workbook *optional_scope,
char const *type,
gboolean copy_name);
GnmFunc *gnm_func_add_placeholder_localized (char const *gname, char const *lname);
-GnmFunc *gnm_func_lookup_or_add_placeholder
- (char const *name, Workbook *scope,
- gboolean copy_name);
+GnmFunc *gnm_func_lookup_or_add_placeholder (char const *name);
void gnm_func_upgrade_placeholder
(GnmFunc *fd,
GnmFuncGroup *fn_group,
diff --git a/src/tools/analysis-anova.c b/src/tools/analysis-anova.c
index 6d288de..30dc2a8 100644
--- a/src/tools/analysis-anova.c
+++ b/src/tools/analysis-anova.c
@@ -96,25 +96,25 @@ analysis_tool_anova_two_factor_no_rep_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_fdist;
GnmFunc *fd_finv;
- fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_index = gnm_func_lookup_or_add_placeholder ("INDEX");
gnm_func_ref (fd_index);
- fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET");
gnm_func_ref (fd_offset);
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
- fd_sumsq = gnm_func_lookup_or_add_placeholder ("SUMSQ", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sumsq = gnm_func_lookup_or_add_placeholder ("SUMSQ");
gnm_func_ref (fd_sumsq);
- fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_average);
- fd_var = gnm_func_lookup_or_add_placeholder ("VAR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_var = gnm_func_lookup_or_add_placeholder ("VAR");
gnm_func_ref (fd_var);
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
- fd_fdist = gnm_func_lookup_or_add_placeholder ("FDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_fdist = gnm_func_lookup_or_add_placeholder ("FDIST");
gnm_func_ref (fd_fdist);
- fd_finv = gnm_func_lookup_or_add_placeholder ("FINV", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_finv = gnm_func_lookup_or_add_placeholder ("FINV");
gnm_func_ref (fd_finv);
dao_set_merge (dao, 0, 0, 4, 0);
@@ -434,25 +434,25 @@ analysis_tool_anova_two_factor_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_fdist;
GnmFunc *fd_finv;
- fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_index = gnm_func_lookup_or_add_placeholder ("INDEX");
gnm_func_ref (fd_index);
- fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET");
gnm_func_ref (fd_offset);
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
- fd_sumsq = gnm_func_lookup_or_add_placeholder ("SUMSQ", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sumsq = gnm_func_lookup_or_add_placeholder ("SUMSQ");
gnm_func_ref (fd_sumsq);
- fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_average);
- fd_var = gnm_func_lookup_or_add_placeholder ("VAR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_var = gnm_func_lookup_or_add_placeholder ("VAR");
gnm_func_ref (fd_var);
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
- fd_fdist = gnm_func_lookup_or_add_placeholder ("FDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_fdist = gnm_func_lookup_or_add_placeholder ("FDIST");
gnm_func_ref (fd_fdist);
- fd_finv = gnm_func_lookup_or_add_placeholder ("FINV", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_finv = gnm_func_lookup_or_add_placeholder ("FINV");
gnm_func_ref (fd_finv);
dao_set_merge (dao, 0, 0, 4, 0);
diff --git a/src/tools/analysis-exp-smoothing.c b/src/tools/analysis-exp-smoothing.c
index b9d15f2..e6fed8b 100644
--- a/src/tools/analysis-exp-smoothing.c
+++ b/src/tools/analysis-exp-smoothing.c
@@ -95,15 +95,15 @@ analysis_tool_exponential_smoothing_engine_ses_h_run (data_analysis_output_t *da
GnmExpr const *expr_alpha = NULL;
if (info->std_error_flag) {
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
- fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2");
gnm_func_ref (fd_sumxmy2);
}
- fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_index = gnm_func_lookup_or_add_placeholder ("INDEX");
gnm_func_ref (fd_index);
- fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET");
gnm_func_ref (fd_offset);
if (info->show_graph)
@@ -270,16 +270,16 @@ analysis_tool_exponential_smoothing_engine_ses_r_run (data_analysis_output_t *da
GnmExpr const *expr_alpha = NULL;
if (info->std_error_flag) {
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
- fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2");
gnm_func_ref (fd_sumxmy2);
}
- fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_average);
- fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_index = gnm_func_lookup_or_add_placeholder ("INDEX");
gnm_func_ref (fd_index);
- fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET");
gnm_func_ref (fd_offset);
if (info->show_graph)
@@ -452,17 +452,17 @@ analysis_tool_exponential_smoothing_engine_des_run (data_analysis_output_t *dao,
GnmExpr const *expr_gamma = NULL;
if (info->std_error_flag) {
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
- fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2");
gnm_func_ref (fd_sumxmy2);
}
- fd_linest = gnm_func_lookup_or_add_placeholder ("LINEST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_linest = gnm_func_lookup_or_add_placeholder ("LINEST");
gnm_func_ref (fd_linest);
- fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_index = gnm_func_lookup_or_add_placeholder ("INDEX");
gnm_func_ref (fd_index);
- fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET");
gnm_func_ref (fd_offset);
if (info->show_graph)
@@ -687,23 +687,23 @@ analysis_tool_exponential_smoothing_engine_ates_run (data_analysis_output_t *dao
GnmExpr const *expr_delta = NULL;
if (info->std_error_flag) {
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
- fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2");
gnm_func_ref (fd_sumxmy2);
}
- fd_linest = gnm_func_lookup_or_add_placeholder ("LINEST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_linest = gnm_func_lookup_or_add_placeholder ("LINEST");
gnm_func_ref (fd_linest);
- fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_index = gnm_func_lookup_or_add_placeholder ("INDEX");
gnm_func_ref (fd_index);
- fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_average);
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
- fd_mod = gnm_func_lookup_or_add_placeholder ("mod", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mod = gnm_func_lookup_or_add_placeholder ("mod");
gnm_func_ref (fd_mod);
- fd_row = gnm_func_lookup_or_add_placeholder ("row", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_row = gnm_func_lookup_or_add_placeholder ("row");
gnm_func_ref (fd_row);
if (info->show_graph)
@@ -1005,25 +1005,25 @@ analysis_tool_exponential_smoothing_engine_mtes_run (data_analysis_output_t *dao
GnmExpr const *expr_delta = NULL;
if (info->std_error_flag) {
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
- fd_sumsq = gnm_func_lookup_or_add_placeholder ("SUMSQ", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sumsq = gnm_func_lookup_or_add_placeholder ("SUMSQ");
gnm_func_ref (fd_sumsq);
}
- fd_linest = gnm_func_lookup_or_add_placeholder ("LINEST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_linest = gnm_func_lookup_or_add_placeholder ("LINEST");
gnm_func_ref (fd_linest);
- fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_index = gnm_func_lookup_or_add_placeholder ("INDEX");
gnm_func_ref (fd_index);
- fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET");
gnm_func_ref (fd_offset);
- fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_average);
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
- fd_mod = gnm_func_lookup_or_add_placeholder ("mod", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mod = gnm_func_lookup_or_add_placeholder ("mod");
gnm_func_ref (fd_mod);
- fd_row = gnm_func_lookup_or_add_placeholder ("row", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_row = gnm_func_lookup_or_add_placeholder ("row");
gnm_func_ref (fd_row);
if (info->show_graph)
diff --git a/src/tools/analysis-frequency.c b/src/tools/analysis-frequency.c
index 2edee00..7f04c55 100644
--- a/src/tools/analysis-frequency.c
+++ b/src/tools/analysis-frequency.c
@@ -52,23 +52,23 @@ analysis_tool_frequency_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_columns = NULL;
GnmFunc *fd_exact = NULL;
- fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
- fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_index = gnm_func_lookup_or_add_placeholder ("INDEX");
gnm_func_ref (fd_index);
- fd_isblank = gnm_func_lookup_or_add_placeholder ("ISBLANK", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_isblank = gnm_func_lookup_or_add_placeholder ("ISBLANK");
gnm_func_ref (fd_isblank);
if (info->exact) {
- fd_exact = gnm_func_lookup_or_add_placeholder ("EXACT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_exact = gnm_func_lookup_or_add_placeholder ("EXACT");
gnm_func_ref (fd_exact);
}
if (info->percentage) {
- fd_rows = gnm_func_lookup_or_add_placeholder ("ROWS", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_rows = gnm_func_lookup_or_add_placeholder ("ROWS");
gnm_func_ref (fd_rows);
- fd_columns = gnm_func_lookup_or_add_placeholder ("COLUMNS", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_columns = gnm_func_lookup_or_add_placeholder ("COLUMNS");
gnm_func_ref (fd_columns);
}
/* General Info */
diff --git a/src/tools/analysis-histogram.c b/src/tools/analysis-histogram.c
index e7ed338..2e6ef32 100644
--- a/src/tools/analysis-histogram.c
+++ b/src/tools/analysis-histogram.c
@@ -49,13 +49,11 @@ make_hist_expr (analysis_tools_data_histogram_t *info,
GnmExpr const *expr_data;
GnmExpr const *expr_if_to, *expr_if_from;
GnmExprOp from, to;
- GnmFunc *fd_if = gnm_func_lookup_or_add_placeholder ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
- GnmFunc *fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ GnmFunc *fd_if = gnm_func_lookup_or_add_placeholder ("IF");
+ GnmFunc *fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
GnmFunc *fd_count = info->percentage ?
- gnm_func_lookup_or_add_placeholder (info->only_numbers ? "COUNT" : "COUNTA",
- dao->sheet ? dao->sheet->workbook : NULL, FALSE) : NULL;
- GnmFunc *fd_isnumber = gnm_func_lookup_or_add_placeholder (info->only_numbers ? "ISNUMBER" : "ISBLANK",
- dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ gnm_func_lookup_or_add_placeholder (info->only_numbers ? "COUNT" : "COUNTA") : NULL;
+ GnmFunc *fd_isnumber = gnm_func_lookup_or_add_placeholder (info->only_numbers ? "ISNUMBER" : "ISBLANK");
gint to_col = (info->cumulative) ? 0 : 1;
if (info->bin_type & bintype_no_inf_upper) {
@@ -145,11 +143,11 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
char const *format;
- fd_small = gnm_func_lookup_or_add_placeholder ("SMALL", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_small = gnm_func_lookup_or_add_placeholder ("SMALL");
gnm_func_ref (fd_small);
if (info->base.labels) {
- fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_index = gnm_func_lookup_or_add_placeholder ("INDEX");
gnm_func_ref (fd_index);
}
@@ -214,7 +212,7 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
else {
GnmFunc *fd_min;
- fd_min = gnm_func_lookup_or_add_placeholder ("MIN", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_min = gnm_func_lookup_or_add_placeholder ("MIN");
gnm_func_ref (fd_min);
dao_set_cell_expr (dao, to_col, i_start,
gnm_expr_new_funcall1
@@ -228,7 +226,7 @@ analysis_tool_histogram_engine_run (data_analysis_output_t *dao,
else {
GnmFunc *fd_max;
- fd_max = gnm_func_lookup_or_add_placeholder ("MAX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_max = gnm_func_lookup_or_add_placeholder ("MAX");
gnm_func_ref (fd_max);
dao_set_cell_expr (dao, to_col, i_start + i_limit - 1,
gnm_expr_new_funcall1
diff --git a/src/tools/analysis-kaplan-meier.c b/src/tools/analysis-kaplan-meier.c
index f2cb982..299c446 100644
--- a/src/tools/analysis-kaplan-meier.c
+++ b/src/tools/analysis-kaplan-meier.c
@@ -77,21 +77,21 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
GSList *gl = info->group_list;
- fd_small = gnm_func_lookup_or_add_placeholder ("SMALL", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_small = gnm_func_lookup_or_add_placeholder ("SMALL");
gnm_func_ref (fd_small);
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
- fd_iserror = gnm_func_lookup_or_add_placeholder ("ISERROR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_iserror = gnm_func_lookup_or_add_placeholder ("ISERROR");
gnm_func_ref (fd_iserror);
- fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
if (info->std_err) {
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
}
if (info->median) {
- fd_min = gnm_func_lookup_or_add_placeholder ("MIN", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_min = gnm_func_lookup_or_add_placeholder ("MIN");
gnm_func_ref (fd_min);
}
@@ -524,7 +524,7 @@ analysis_tool_kaplan_meier_engine_run (data_analysis_output_t *dao,
GnmExpr const *expr_n_total = gnm_expr_new_constant (value_new_int (0));
GnmExpr const *expr_death_total = gnm_expr_new_constant (value_new_int (0));
- fd_chidist = gnm_func_lookup_or_add_placeholder ("CHIDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_chidist = gnm_func_lookup_or_add_placeholder ("CHIDIST");
gnm_func_ref (fd_chidist);
dao_set_italic (dao, 1, logrank_test_y_offset, 1, logrank_test_y_offset+3);
diff --git a/src/tools/analysis-normality.c b/src/tools/analysis-normality.c
index 77ecb55..f18c20e 100644
--- a/src/tools/analysis-normality.c
+++ b/src/tools/analysis-normality.c
@@ -89,11 +89,9 @@ analysis_tool_normality_engine_run (data_analysis_output_t *dao,
g_assert_not_reached();
}
- fd = gnm_func_lookup_or_add_placeholder
- (fdname, dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd = gnm_func_lookup_or_add_placeholder (fdname);
gnm_func_ref (fd);
- fd_if = gnm_func_lookup_or_add_placeholder
- ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
dao_set_italic (dao, 0, 0, 0, 5);
diff --git a/src/tools/analysis-one-mean-test.c b/src/tools/analysis-one-mean-test.c
index 245db27..49b91be 100644
--- a/src/tools/analysis-one-mean-test.c
+++ b/src/tools/analysis-one-mean-test.c
@@ -50,19 +50,19 @@ analysis_tool_one_mean_test_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_iferror;
GnmFunc *fd_count;
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_mean);
- fd_var = gnm_func_lookup_or_add_placeholder ("VAR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_var = gnm_func_lookup_or_add_placeholder ("VAR");
gnm_func_ref (fd_var);
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
- fd_abs = gnm_func_lookup_or_add_placeholder ("ABS", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_abs = gnm_func_lookup_or_add_placeholder ("ABS");
gnm_func_ref (fd_abs);
- fd_tdist = gnm_func_lookup_or_add_placeholder ("TDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_tdist = gnm_func_lookup_or_add_placeholder ("TDIST");
gnm_func_ref (fd_tdist);
- fd_iferror = gnm_func_lookup_or_add_placeholder ("IFERROR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_iferror = gnm_func_lookup_or_add_placeholder ("IFERROR");
gnm_func_ref (fd_iferror);
dao_set_italic (dao, 0, 0, 0, 9);
diff --git a/src/tools/analysis-principal-components.c b/src/tools/analysis-principal-components.c
index 0235cc3..abfb9f4 100644
--- a/src/tools/analysis-principal-components.c
+++ b/src/tools/analysis-principal-components.c
@@ -69,35 +69,25 @@ analysis_tool_principal_components_engine_run (data_analysis_output_t *dao,
return 0;
}
- fd_mean = gnm_func_lookup_or_add_placeholder
- ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_mean);
- fd_var = gnm_func_lookup_or_add_placeholder
- ("VAR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_var = gnm_func_lookup_or_add_placeholder ("VAR");
gnm_func_ref (fd_var);
- fd_eigen = gnm_func_lookup_or_add_placeholder
- ("EIGEN", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_eigen = gnm_func_lookup_or_add_placeholder ("EIGEN");
gnm_func_ref (fd_eigen);
- fd_mmult = gnm_func_lookup_or_add_placeholder
- ("MMULT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mmult = gnm_func_lookup_or_add_placeholder ("MMULT");
gnm_func_ref (fd_mmult);
- fd_munit = gnm_func_lookup_or_add_placeholder
- ("MUNIT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_munit = gnm_func_lookup_or_add_placeholder ("MUNIT");
gnm_func_ref (fd_munit);
- fd_sqrt = gnm_func_lookup_or_add_placeholder
- ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
- fd_count = gnm_func_lookup_or_add_placeholder
- ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_sum = gnm_func_lookup_or_add_placeholder
- ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
- fd_and = gnm_func_lookup_or_add_placeholder
- ("AND", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_and = gnm_func_lookup_or_add_placeholder ("AND");
gnm_func_ref (fd_and);
- fd_if = gnm_func_lookup_or_add_placeholder
- ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
dao_set_bold (dao, 0, 0, 0, 0);
diff --git a/src/tools/analysis-sign-test.c b/src/tools/analysis-sign-test.c
index f34c918..e51aa67 100644
--- a/src/tools/analysis-sign-test.c
+++ b/src/tools/analysis-sign-test.c
@@ -55,19 +55,19 @@ analysis_tool_sign_test_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_isnumber;
GnmFunc *fd_iferror;
- fd_median = gnm_func_lookup_or_add_placeholder ("MEDIAN", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_median = gnm_func_lookup_or_add_placeholder ("MEDIAN");
gnm_func_ref (fd_median);
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
- fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
- fd_min = gnm_func_lookup_or_add_placeholder ("MIN", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_min = gnm_func_lookup_or_add_placeholder ("MIN");
gnm_func_ref (fd_min);
- fd_binomdist = gnm_func_lookup_or_add_placeholder ("BINOMDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_binomdist = gnm_func_lookup_or_add_placeholder ("BINOMDIST");
gnm_func_ref (fd_binomdist);
- fd_isnumber = gnm_func_lookup_or_add_placeholder ("ISNUMBER", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_isnumber = gnm_func_lookup_or_add_placeholder ("ISNUMBER");
gnm_func_ref (fd_isnumber);
- fd_iferror = gnm_func_lookup_or_add_placeholder ("IFERROR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_iferror = gnm_func_lookup_or_add_placeholder ("IFERROR");
gnm_func_ref (fd_iferror);
dao_set_italic (dao, 0, 0, 0, 9);
@@ -197,19 +197,19 @@ analysis_tool_sign_test_two_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_isnumber;
GnmFunc *fd_iferror;
- fd_median = gnm_func_lookup_or_add_placeholder ("MEDIAN", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_median = gnm_func_lookup_or_add_placeholder ("MEDIAN");
gnm_func_ref (fd_median);
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
- fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
- fd_min = gnm_func_lookup_or_add_placeholder ("MIN", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_min = gnm_func_lookup_or_add_placeholder ("MIN");
gnm_func_ref (fd_min);
- fd_binomdist = gnm_func_lookup_or_add_placeholder ("BINOMDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_binomdist = gnm_func_lookup_or_add_placeholder ("BINOMDIST");
gnm_func_ref (fd_binomdist);
- fd_isnumber = gnm_func_lookup_or_add_placeholder ("ISNUMBER", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_isnumber = gnm_func_lookup_or_add_placeholder ("ISNUMBER");
gnm_func_ref (fd_isnumber);
- fd_iferror = gnm_func_lookup_or_add_placeholder ("IFERROR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_iferror = gnm_func_lookup_or_add_placeholder ("IFERROR");
gnm_func_ref (fd_iferror);
dao_set_italic (dao, 0, 0, 0, 9);
diff --git a/src/tools/analysis-tools.c b/src/tools/analysis-tools.c
index b506c55..5c469ee 100644
--- a/src/tools/analysis-tools.c
+++ b/src/tools/analysis-tools.c
@@ -226,9 +226,9 @@ analysis_tools_write_a_label (GnmValue *val, data_analysis_output_t *dao,
GnmFunc *fd_concatenate;
GnmFunc *fd_cell;
- fd_concatenate = gnm_func_lookup_or_add_placeholder ("CONCATENATE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_concatenate = gnm_func_lookup_or_add_placeholder ("CONCATENATE");
gnm_func_ref (fd_concatenate);
- fd_cell = gnm_func_lookup_or_add_placeholder ("CELL", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_cell = gnm_func_lookup_or_add_placeholder ("CELL");
gnm_func_ref (fd_cell);
dao_set_cell_expr (dao, x, y, gnm_expr_new_funcall3
@@ -577,8 +577,7 @@ analysis_tool_get_function (char const *name,
{
GnmFunc *fd;
- fd = gnm_func_lookup_or_add_placeholder
- (name, dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd = gnm_func_lookup_or_add_placeholder (name);
gnm_func_ref (fd);
return fd;
}
@@ -608,7 +607,7 @@ analysis_tool_table (data_analysis_output_t *dao,
dao_set_italic (dao, 0, 0, 0, 0);
dao_set_cell_printf (dao, 0, 0, "%s", title);
- fd = gnm_func_lookup_or_add_placeholder (functionname, dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd = gnm_func_lookup_or_add_placeholder (functionname);
gnm_func_ref (fd);
for (col = 1, inputdata = info->input; inputdata != NULL;
@@ -800,29 +799,29 @@ summary_statistics (data_analysis_output_t *dao,
GnmFunc *fd_count;
GnmFunc *fd_sqrt;
- fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_mean);
- fd_median = gnm_func_lookup_or_add_placeholder (info->use_ssmedian ? "SSMEDIAN" : "MEDIAN", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_median = gnm_func_lookup_or_add_placeholder (info->use_ssmedian ? "SSMEDIAN" : "MEDIAN");
gnm_func_ref (fd_median);
- fd_mode = gnm_func_lookup_or_add_placeholder ("MODE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mode = gnm_func_lookup_or_add_placeholder ("MODE");
gnm_func_ref (fd_mode);
- fd_stdev = gnm_func_lookup_or_add_placeholder ("STDEV", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_stdev = gnm_func_lookup_or_add_placeholder ("STDEV");
gnm_func_ref (fd_stdev);
- fd_var = gnm_func_lookup_or_add_placeholder ("VAR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_var = gnm_func_lookup_or_add_placeholder ("VAR");
gnm_func_ref (fd_var);
- fd_kurt = gnm_func_lookup_or_add_placeholder ("KURT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_kurt = gnm_func_lookup_or_add_placeholder ("KURT");
gnm_func_ref (fd_kurt);
- fd_skew = gnm_func_lookup_or_add_placeholder ("SKEW", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_skew = gnm_func_lookup_or_add_placeholder ("SKEW");
gnm_func_ref (fd_skew);
- fd_min = gnm_func_lookup_or_add_placeholder ("MIN", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_min = gnm_func_lookup_or_add_placeholder ("MIN");
gnm_func_ref (fd_min);
- fd_max = gnm_func_lookup_or_add_placeholder ("MAX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_max = gnm_func_lookup_or_add_placeholder ("MAX");
gnm_func_ref (fd_max);
- fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
dao_set_cell (dao, 0, 0, NULL);
@@ -979,15 +978,15 @@ confidence_level (data_analysis_output_t *dao,
dao_set_cell (dao, 0, 0, NULL);
- fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_mean);
- fd_var = gnm_func_lookup_or_add_placeholder ("VAR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_var = gnm_func_lookup_or_add_placeholder ("VAR");
gnm_func_ref (fd_var);
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_tinv = gnm_func_lookup_or_add_placeholder ("TINV", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_tinv = gnm_func_lookup_or_add_placeholder ("TINV");
gnm_func_ref (fd_tinv);
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
@@ -1054,7 +1053,7 @@ kth_smallest_largest (data_analysis_output_t *dao,
{
guint col;
GSList *data = info->base.input;
- GnmFunc *fd = gnm_func_lookup_or_add_placeholder (func, dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ GnmFunc *fd = gnm_func_lookup_or_add_placeholder (func);
gnm_func_ref (fd);
dao_set_italic (dao, 0, 1, 0, 1);
@@ -1177,11 +1176,11 @@ analysis_tool_sampling_engine_run (data_analysis_output_t *dao,
gint source;
if (info->base.labels || info->periodic) {
- fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_index = gnm_func_lookup_or_add_placeholder ("INDEX");
gnm_func_ref (fd_index);
}
if (!info->periodic) {
- fd_randdiscrete = gnm_func_lookup_or_add_placeholder ("RANDDISCRETE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_randdiscrete = gnm_func_lookup_or_add_placeholder ("RANDDISCRETE");
gnm_func_ref (fd_randdiscrete);
}
@@ -1408,17 +1407,17 @@ analysis_tool_ztest_engine_run (data_analysis_output_t *dao,
"/P (Z<=z) two-tail"
"/z Critical two-tail"));
- fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_mean);
- fd_normsdist = gnm_func_lookup_or_add_placeholder ("NORMSDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_normsdist = gnm_func_lookup_or_add_placeholder ("NORMSDIST");
gnm_func_ref (fd_normsdist);
- fd_abs = gnm_func_lookup_or_add_placeholder ("ABS", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_abs = gnm_func_lookup_or_add_placeholder ("ABS");
gnm_func_ref (fd_abs);
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_normsinv = gnm_func_lookup_or_add_placeholder ("NORMSINV", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_normsinv = gnm_func_lookup_or_add_placeholder ("NORMSINV");
gnm_func_ref (fd_normsinv);
val_1 = value_dup (info->base.range_1);
@@ -1662,27 +1661,27 @@ analysis_tool_ttest_paired_engine_run (data_analysis_output_t *dao,
"/P (T<=t) two-tail"
"/t Critical two-tail"));
- fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_mean);
- fd_var = gnm_func_lookup_or_add_placeholder ("VAR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_var = gnm_func_lookup_or_add_placeholder ("VAR");
gnm_func_ref (fd_var);
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_correl = gnm_func_lookup_or_add_placeholder ("CORREL", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_correl = gnm_func_lookup_or_add_placeholder ("CORREL");
gnm_func_ref (fd_correl);
- fd_tinv = gnm_func_lookup_or_add_placeholder ("TINV", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_tinv = gnm_func_lookup_or_add_placeholder ("TINV");
gnm_func_ref (fd_tinv);
- fd_tdist = gnm_func_lookup_or_add_placeholder ("TDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_tdist = gnm_func_lookup_or_add_placeholder ("TDIST");
gnm_func_ref (fd_tdist);
- fd_abs = gnm_func_lookup_or_add_placeholder ("ABS", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_abs = gnm_func_lookup_or_add_placeholder ("ABS");
gnm_func_ref (fd_abs);
- fd_isodd = gnm_func_lookup_or_add_placeholder ("ISODD", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_isodd = gnm_func_lookup_or_add_placeholder ("ISODD");
gnm_func_ref (fd_isodd);
- fd_isnumber = gnm_func_lookup_or_add_placeholder ("ISNUMBER", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_isnumber = gnm_func_lookup_or_add_placeholder ("ISNUMBER");
gnm_func_ref (fd_isnumber);
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
- fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
val_1 = value_dup (info->base.range_1);
@@ -1944,17 +1943,17 @@ analysis_tool_ttest_eqvar_engine_run (data_analysis_output_t *dao,
val_1 = value_dup (info->base.range_1);
val_2 = value_dup (info->base.range_2);
- fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_mean);
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_var = gnm_func_lookup_or_add_placeholder ("VAR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_var = gnm_func_lookup_or_add_placeholder ("VAR");
gnm_func_ref (fd_var);
- fd_tdist = gnm_func_lookup_or_add_placeholder ("TDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_tdist = gnm_func_lookup_or_add_placeholder ("TDIST");
gnm_func_ref (fd_tdist);
- fd_abs = gnm_func_lookup_or_add_placeholder ("ABS", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_abs = gnm_func_lookup_or_add_placeholder ("ABS");
gnm_func_ref (fd_abs);
- fd_tinv = gnm_func_lookup_or_add_placeholder ("TINV", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_tinv = gnm_func_lookup_or_add_placeholder ("TINV");
gnm_func_ref (fd_tinv);
/* Labels */
@@ -2240,17 +2239,17 @@ analysis_tool_ttest_neqvar_engine_run (data_analysis_output_t *dao,
val_1 = value_dup (info->base.range_1);
val_2 = value_dup (info->base.range_2);
- fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_mean);
- fd_var = gnm_func_lookup_or_add_placeholder ("VAR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_var = gnm_func_lookup_or_add_placeholder ("VAR");
gnm_func_ref (fd_var);
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_tdist = gnm_func_lookup_or_add_placeholder ("TDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_tdist = gnm_func_lookup_or_add_placeholder ("TDIST");
gnm_func_ref (fd_tdist);
- fd_abs = gnm_func_lookup_or_add_placeholder ("ABS", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_abs = gnm_func_lookup_or_add_placeholder ("ABS");
gnm_func_ref (fd_abs);
- fd_tinv = gnm_func_lookup_or_add_placeholder ("TINV", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_tinv = gnm_func_lookup_or_add_placeholder ("TINV");
gnm_func_ref (fd_tinv);
/* Labels */
@@ -2514,7 +2513,7 @@ analysis_tool_ftest_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_finv;
- fd_finv = gnm_func_lookup_or_add_placeholder ("FINV", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_finv = gnm_func_lookup_or_add_placeholder ("FINV");
gnm_func_ref (fd_finv);
dao_set_italic (dao, 0, 0, 0, 11);
@@ -2538,7 +2537,7 @@ analysis_tool_ftest_engine_run (data_analysis_output_t *dao,
/* Mean */
{
- GnmFunc *fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ GnmFunc *fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_mean);
dao_set_cell_expr
@@ -2558,7 +2557,7 @@ analysis_tool_ftest_engine_run (data_analysis_output_t *dao,
/* Variance */
{
- GnmFunc *fd_var = gnm_func_lookup_or_add_placeholder ("VAR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ GnmFunc *fd_var = gnm_func_lookup_or_add_placeholder ("VAR");
gnm_func_ref (fd_var);
dao_set_cell_expr
@@ -2577,7 +2576,7 @@ analysis_tool_ftest_engine_run (data_analysis_output_t *dao,
/* Count */
{
- GnmFunc *fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ GnmFunc *fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
dao_set_cell_expr
@@ -2621,7 +2620,7 @@ analysis_tool_ftest_engine_run (data_analysis_output_t *dao,
/* P right-tail */
{
- GnmFunc *fd_fdist = gnm_func_lookup_or_add_placeholder ("FDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ GnmFunc *fd_fdist = gnm_func_lookup_or_add_placeholder ("FDIST");
const GnmExpr *arg3;
gnm_func_ref (fd_fdist);
@@ -2696,7 +2695,7 @@ analysis_tool_ftest_engine_run (data_analysis_output_t *dao,
/* P two-tail */
{
- GnmFunc *fd_min = gnm_func_lookup_or_add_placeholder ("MIN", dao->sheet ? dao->sheet->workbook : NULL, FALSE);;
+ GnmFunc *fd_min = gnm_func_lookup_or_add_placeholder ("MIN");;
gnm_func_ref (fd_min);
@@ -3711,22 +3710,22 @@ analysis_tool_moving_average_engine_run (data_analysis_output_t *dao,
if (info->base.labels || info->ma_type == moving_average_type_wma
|| info->ma_type== moving_average_type_spencer_ma) {
- fd_index = gnm_func_lookup_or_add_placeholder ("INDEX", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_index = gnm_func_lookup_or_add_placeholder ("INDEX");
gnm_func_ref (fd_index);
}
if (info->std_error_flag) {
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
- fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sumxmy2 = gnm_func_lookup_or_add_placeholder ("SUMXMY2");
gnm_func_ref (fd_sumxmy2);
}
if (moving_average_type_wma == info->ma_type || moving_average_type_spencer_ma == info->ma_type) {
- fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
}
- fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_average = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_average);
- fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_offset = gnm_func_lookup_or_add_placeholder ("OFFSET");
gnm_func_ref (fd_offset);
if (info->show_graph) {
@@ -4056,15 +4055,15 @@ analysis_tool_ranking_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_match;
GnmFunc *fd_percentrank;
- fd_large = gnm_func_lookup_or_add_placeholder ("LARGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_large = gnm_func_lookup_or_add_placeholder ("LARGE");
gnm_func_ref (fd_large);
- fd_row = gnm_func_lookup_or_add_placeholder ("ROW", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_row = gnm_func_lookup_or_add_placeholder ("ROW");
gnm_func_ref (fd_row);
- fd_rank = gnm_func_lookup_or_add_placeholder ("RANK", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_rank = gnm_func_lookup_or_add_placeholder ("RANK");
gnm_func_ref (fd_rank);
- fd_match = gnm_func_lookup_or_add_placeholder ("MATCH", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_match = gnm_func_lookup_or_add_placeholder ("MATCH");
gnm_func_ref (fd_match);
- fd_percentrank = gnm_func_lookup_or_add_placeholder ("PERCENTRANK", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_percentrank = gnm_func_lookup_or_add_placeholder ("PERCENTRANK");
gnm_func_ref (fd_percentrank);
dao_set_merge (dao, 0, 0, 1, 0);
@@ -4114,7 +4113,7 @@ analysis_tool_ranking_engine_run (data_analysis_output_t *dao,
GnmExpr const *expr_rows_p_one;
GnmExpr const *expr_rows;
GnmFunc *fd_count;
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
expr_rows = gnm_expr_new_funcall1
@@ -4231,15 +4230,15 @@ analysis_tool_anova_single_engine_run (data_analysis_output_t *dao, gpointer spe
"/Average"
"/Variance"));
- fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mean = gnm_func_lookup_or_add_placeholder ("AVERAGE");
gnm_func_ref (fd_mean);
- fd_var = gnm_func_lookup_or_add_placeholder ("VAR", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_var = gnm_func_lookup_or_add_placeholder ("VAR");
gnm_func_ref (fd_var);
- fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_devsq = gnm_func_lookup_or_add_placeholder ("DEVSQ", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_devsq = gnm_func_lookup_or_add_placeholder ("DEVSQ");
gnm_func_ref (fd_devsq);
dao->offset_row += 4;
@@ -4449,7 +4448,7 @@ analysis_tool_anova_single_engine_run (data_analysis_output_t *dao, gpointer spe
arg3 = gnm_expr_copy (expr_wdof);
}
- fd_fdist = gnm_func_lookup_or_add_placeholder ("FDIST", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_fdist = gnm_func_lookup_or_add_placeholder ("FDIST");
gnm_func_ref (fd_fdist);
dao_set_cell_expr
@@ -4471,7 +4470,7 @@ analysis_tool_anova_single_engine_run (data_analysis_output_t *dao, gpointer spe
} else
arg3 = expr_wdof;
- fd_finv = gnm_func_lookup_or_add_placeholder ("FINV", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_finv = gnm_func_lookup_or_add_placeholder ("FINV");
gnm_func_ref (fd_finv);
dao_set_cell_expr
@@ -4552,7 +4551,7 @@ analysis_tool_fourier_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_fourier;
- fd_fourier = gnm_func_lookup_or_add_placeholder ("FOURIER", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_fourier = gnm_func_lookup_or_add_placeholder ("FOURIER");
gnm_func_ref (fd_fourier);
dao_set_merge (dao, 0, 0, 1, 0);
diff --git a/src/tools/analysis-wilcoxon-mann-whitney.c b/src/tools/analysis-wilcoxon-mann-whitney.c
index d976cf9..7455568 100644
--- a/src/tools/analysis-wilcoxon-mann-whitney.c
+++ b/src/tools/analysis-wilcoxon-mann-whitney.c
@@ -74,8 +74,7 @@ GnmExpr const *analysis_tool_combine_area (GnmValue *val_1, GnmValue *val_2, Wor
}
}
- fd_array = gnm_func_lookup_or_add_placeholder
- ("ARRAY", wb, FALSE);
+ fd_array = gnm_func_lookup_or_add_placeholder ("ARRAY");
gnm_func_ref (fd_array);
expr = gnm_expr_new_funcall2 (fd_array,
@@ -112,25 +111,25 @@ analysis_tool_wilcoxon_mann_whitney_engine_run (data_analysis_output_t *dao,
GnmValue *val_2 = value_dup (info->range_2);
Workbook *wb = dao->sheet ? dao->sheet->workbook : NULL;
- fd_count = gnm_func_lookup_or_add_placeholder ("COUNT", wb, FALSE);
+ fd_count = gnm_func_lookup_or_add_placeholder ("COUNT");
gnm_func_ref (fd_count);
- fd_sum = gnm_func_lookup_or_add_placeholder ("SUM", wb, FALSE);
+ fd_sum = gnm_func_lookup_or_add_placeholder ("SUM");
gnm_func_ref (fd_sum);
- fd_rows = gnm_func_lookup_or_add_placeholder ("ROWS", wb, FALSE);
+ fd_rows = gnm_func_lookup_or_add_placeholder ("ROWS");
gnm_func_ref (fd_rows);
- fd_rank_avg = gnm_func_lookup_or_add_placeholder ("RANK.AVG", wb, FALSE);
+ fd_rank_avg = gnm_func_lookup_or_add_placeholder ("RANK.AVG");
gnm_func_ref (fd_rank_avg);
- fd_rank = gnm_func_lookup_or_add_placeholder ("RANK", wb, FALSE);
+ fd_rank = gnm_func_lookup_or_add_placeholder ("RANK");
gnm_func_ref (fd_rank);
- fd_min = gnm_func_lookup_or_add_placeholder ("MIN", wb, FALSE);
+ fd_min = gnm_func_lookup_or_add_placeholder ("MIN");
gnm_func_ref (fd_min);
- fd_normdist = gnm_func_lookup_or_add_placeholder ("NORMDIST", wb, FALSE);
+ fd_normdist = gnm_func_lookup_or_add_placeholder ("NORMDIST");
gnm_func_ref (fd_normdist);
- fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT", wb, FALSE);
+ fd_sqrt = gnm_func_lookup_or_add_placeholder ("SQRT");
gnm_func_ref (fd_sqrt);
- fd_if = gnm_func_lookup_or_add_placeholder ("IF", wb, FALSE);
+ fd_if = gnm_func_lookup_or_add_placeholder ("IF");
gnm_func_ref (fd_if);
- fd_isblank = gnm_func_lookup_or_add_placeholder ("ISBLANK", wb, FALSE);
+ fd_isblank = gnm_func_lookup_or_add_placeholder ("ISBLANK");
gnm_func_ref (fd_isblank);
dao_set_italic (dao, 0, 0, 0, 8);
diff --git a/src/tools/random-generator-cor.c b/src/tools/random-generator-cor.c
index 5aca93a..a550b9a 100644
--- a/src/tools/random-generator-cor.c
+++ b/src/tools/random-generator-cor.c
@@ -53,8 +53,7 @@ tool_random_cor_engine_run (data_analysis_output_t *dao,
GnmFunc *fd_cholesky;
GnmExpr const *expr_cholesky;
- fd_cholesky = gnm_func_lookup_or_add_placeholder
- ("CHOLESKY", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_cholesky = gnm_func_lookup_or_add_placeholder ("CHOLESKY");
gnm_func_ref (fd_cholesky);
expr_cholesky = gnm_expr_new_funcall1
(fd_cholesky, expr_matrix);
@@ -75,8 +74,7 @@ tool_random_cor_engine_run (data_analysis_output_t *dao,
dao_set_italic (dao, 0, 0, 0, 0);
dao_set_cell (dao, 0, 0, _("Uncorrelated Random Variables"));
- fd_rand = gnm_func_lookup_or_add_placeholder
- ("RANDNORM", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_rand = gnm_func_lookup_or_add_placeholder ("RANDNORM");
gnm_func_ref (fd_rand);
expr_rand = gnm_expr_new_funcall2 (fd_rand,
gnm_expr_new_constant (value_new_int (0)),
@@ -89,11 +87,9 @@ tool_random_cor_engine_run (data_analysis_output_t *dao,
dao->offset_col += info->variables + 1;
- fd_mmult = gnm_func_lookup_or_add_placeholder
- ("MMULT", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_mmult = gnm_func_lookup_or_add_placeholder ("MMULT");
gnm_func_ref (fd_mmult);
- fd_transpose = gnm_func_lookup_or_add_placeholder
- ("TRANSPOSE", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ fd_transpose = gnm_func_lookup_or_add_placeholder ("TRANSPOSE");
gnm_func_ref (fd_transpose);
dao_set_merge (dao, 0, 0, info->variables - 1, 0);
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index f276836..ad82708 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -4596,8 +4596,7 @@ cb_auto_expr_insert_formula (WBCGtk *wbcg, gboolean below)
g_object_get (G_OBJECT (wb_control_view (WORKBOOK_CONTROL (wbcg))),
"auto-expr-func", &(specs->func), NULL);
if (specs->func == NULL)
- specs->func = gnm_func_lookup_or_add_placeholder
- ("sum", dao->sheet ? dao->sheet->workbook : NULL, FALSE);
+ specs->func = gnm_func_lookup_or_add_placeholder ("sum");
gnm_func_ref (specs->func);
cmd_analysis_tool (WORKBOOK_CONTROL (wbcg), scg_sheet (scg),
diff --git a/src/workbook-cmd-format.c b/src/workbook-cmd-format.c
index 76819d2..845eb39 100644
--- a/src/workbook-cmd-format.c
+++ b/src/workbook-cmd-format.c
@@ -195,8 +195,8 @@ workbook_cmd_wrap_sort (WorkbookControl *wbc, int type)
_("The range to be sorted may not contain any merged cells."));
return;
}
- fd_sort = gnm_func_lookup_or_add_placeholder ("sort", cl.wb, TRUE);
- fd_array = gnm_func_lookup_or_add_placeholder ("array", cl.wb, TRUE);
+ fd_sort = gnm_func_lookup_or_add_placeholder ("sort");
+ fd_array = gnm_func_lookup_or_add_placeholder ("array");
sheet_foreach_cell_in_range
(sv->sheet, CELL_ITER_ALL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]