[gnumeric] Fix leaks in potentially failing analysis tools.
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix leaks in potentially failing analysis tools.
- Date: Fri, 17 Dec 2010 18:07:36 +0000 (UTC)
commit b7743e24381fad4857b49d589cee783d5e3b8d07
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Fri Dec 17 11:06:57 2010 -0700
Fix leaks in potentially failing analysis tools.
2010-12-17 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-advanced-filter.c (advanced_filter_ok_clicked_cb):
add argument to cmd_analysis_tool
* dialog-analysis-tool-chi-squared.c (chi_squared_tool_ok_clicked_cb):
ditto
* dialog-analysis-tool-frequency.c (frequency_tool_ok_clicked_cb):
ditto
* dialog-analysis-tool-kaplan-meier.c (kaplan_meier_tool_ok_clicked_cb):
ditto
* dialog-analysis-tool-normality.c (normality_tool_ok_clicked_cb):
ditto
* dialog-analysis-tool-sign-test.c (sign_test_two_tool_ok_clicked_cb):
ditto
(sign_test_tool_ok_clicked_cb): ditto
* dialog-analysis-tools.c (corr_tool_ok_clicked_cb): ditto
(cov_tool_ok_clicked_cb): ditto
(rank_tool_ok_clicked_cb): ditto
(fourier_tool_ok_clicked_cb): ditto
(cb_desc_stat_tool_ok_clicked): ditto
(ttest_tool_ok_clicked_cb): ditto
(ftest_tool_ok_clicked_cb): ditto
(sampling_tool_ok_clicked_cb): ditto
(regression_tool_ok_clicked_cb): ditto
(exp_smoothing_tool_ok_clicked_cb): ditto
(average_tool_ok_clicked_cb): ditto
(histogram_tool_ok_clicked_cb): ditto
(anova_single_tool_ok_clicked_cb): ditto
(anova_two_factor_tool_ok_clicked_cb): ditto
* dialog-consolidate.c (cb_consolidate_ok_clicked): ditto
* dialog-fill-series.c (cb_fill_series_ok_clicked): ditto
* dialog-random-generator-cor.c (random_cor_tool_ok_clicked_cb): ditto
* dialog-random-generator.c (random_tool_ok_clicked_cb): ditto
* dialog-analysis-tool-principal-components.c
(principal_components_tool_ok_clicked_cb): ditto, note that the tool
never returns errors.
* dialog-analysis-tool-wilcoxon-mann-whitney.c
(wilcoxon_mann_whitney_tool_ok_clicked_cb): ditto
2010-12-17 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/wbc-gtk.c
* src/commands.h (cmd_analysis_tool): add argument
* src/commands.c (cmd_analysis_tool): use always_take_ownership
argument
ChangeLog | 7 ++++
NEWS | 1 +
src/commands.c | 4 +-
src/commands.h | 3 +-
src/dialogs/ChangeLog | 39 ++++++++++++++++++++
src/dialogs/dialog-advanced-filter.c | 2 +-
src/dialogs/dialog-analysis-tool-chi-squared.c | 3 +-
src/dialogs/dialog-analysis-tool-frequency.c | 6 ++-
src/dialogs/dialog-analysis-tool-kaplan-meier.c | 6 ++-
src/dialogs/dialog-analysis-tool-normality.c | 6 ++-
.../dialog-analysis-tool-principal-components.c | 11 +++---
src/dialogs/dialog-analysis-tool-sign-test.c | 7 ++--
.../dialog-analysis-tool-wilcoxon-mann-whitney.c | 12 +++----
src/dialogs/dialog-analysis-tools.c | 39 +++++++++++---------
src/dialogs/dialog-consolidate.c | 3 +-
src/dialogs/dialog-fill-series.c | 2 +-
src/dialogs/dialog-random-generator-cor.c | 2 +-
src/dialogs/dialog-random-generator.c | 2 +-
src/wbc-gtk.c | 3 +-
19 files changed, 108 insertions(+), 50 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c52a119..c47feea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-12-17 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * src/wbc-gtk.c
+ * src/commands.h (cmd_analysis_tool): add argument
+ * src/commands.c (cmd_analysis_tool): use always_take_ownership
+ argument
+
2010-12-17 Jean Brefort <jean brefort normalesup org>
* src/gnm-so-line.c (so_line_view_set_bounds): take zoom level into
diff --git a/NEWS b/NEWS
index bfe9259..bf8a888 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Andreas:
* Export text formats to and import from ODF. [#636158]
* Fix ODF import of sheets with far forward references. [#636968]
* Add EEK support to EURO and EUROCONVERT.
+ * Fix leaks in potentially failing analysis tools.
Jean:
* Only disable the formula bar when a chart sheet is selected. [#636031]
diff --git a/src/commands.c b/src/commands.c
index 8b25e39..b77eb32 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -5349,7 +5349,7 @@ cmd_analysis_tool_finalize (GObject *cmd)
gboolean
cmd_analysis_tool (WorkbookControl *wbc, G_GNUC_UNUSED Sheet *sheet,
data_analysis_output_t *dao, gpointer specs,
- analysis_tool_engine engine)
+ analysis_tool_engine engine, gboolean always_take_ownership)
{
CmdAnalysis_Tool *me;
gboolean trouble;
@@ -5364,7 +5364,7 @@ cmd_analysis_tool (WorkbookControl *wbc, G_GNUC_UNUSED Sheet *sheet,
/* Store the specs for the object */
me->specs = specs;
- me->specs_owned = FALSE;
+ me->specs_owned = always_take_ownership;
me->dao = dao;
me->engine = engine;
me->cmd.cmd_descriptor = NULL;
diff --git a/src/commands.h b/src/commands.h
index 609936a..4b310f3 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -126,7 +126,8 @@ gboolean cmd_set_comment (WorkbookControl *wbc, Sheet *sheet,
gboolean cmd_analysis_tool (WorkbookControl *wbc, Sheet *sheet,
data_analysis_output_t *dao, gpointer specs,
- analysis_tool_engine engine);
+ analysis_tool_engine engine,
+ gboolean always_take_ownership);
gboolean cmd_merge_data (WorkbookControl *wbc, Sheet *sheet,
GnmValue *merge_zone, GSList *merge_fields, GSList *merge_data);
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 47b6350..c93bb2e 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,42 @@
+2010-12-17 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * dialog-advanced-filter.c (advanced_filter_ok_clicked_cb):
+ add argument to cmd_analysis_tool
+ * dialog-analysis-tool-chi-squared.c (chi_squared_tool_ok_clicked_cb):
+ ditto
+ * dialog-analysis-tool-frequency.c (frequency_tool_ok_clicked_cb):
+ ditto
+ * dialog-analysis-tool-kaplan-meier.c (kaplan_meier_tool_ok_clicked_cb):
+ ditto
+ * dialog-analysis-tool-normality.c (normality_tool_ok_clicked_cb):
+ ditto
+ * dialog-analysis-tool-sign-test.c (sign_test_two_tool_ok_clicked_cb):
+ ditto
+ (sign_test_tool_ok_clicked_cb): ditto
+ * dialog-analysis-tools.c (corr_tool_ok_clicked_cb): ditto
+ (cov_tool_ok_clicked_cb): ditto
+ (rank_tool_ok_clicked_cb): ditto
+ (fourier_tool_ok_clicked_cb): ditto
+ (cb_desc_stat_tool_ok_clicked): ditto
+ (ttest_tool_ok_clicked_cb): ditto
+ (ftest_tool_ok_clicked_cb): ditto
+ (sampling_tool_ok_clicked_cb): ditto
+ (regression_tool_ok_clicked_cb): ditto
+ (exp_smoothing_tool_ok_clicked_cb): ditto
+ (average_tool_ok_clicked_cb): ditto
+ (histogram_tool_ok_clicked_cb): ditto
+ (anova_single_tool_ok_clicked_cb): ditto
+ (anova_two_factor_tool_ok_clicked_cb): ditto
+ * dialog-consolidate.c (cb_consolidate_ok_clicked): ditto
+ * dialog-fill-series.c (cb_fill_series_ok_clicked): ditto
+ * dialog-random-generator-cor.c (random_cor_tool_ok_clicked_cb): ditto
+ * dialog-random-generator.c (random_tool_ok_clicked_cb): ditto
+ * dialog-analysis-tool-principal-components.c
+ (principal_components_tool_ok_clicked_cb): ditto, note that the tool
+ never returns errors.
+ * dialog-analysis-tool-wilcoxon-mann-whitney.c
+ (wilcoxon_mann_whitney_tool_ok_clicked_cb): ditto
+
2010-12-17 Morten Welinder <terra gnome org>
* dialog-printer-setup.c (hf_insert_hf_stock_tag)
diff --git a/src/dialogs/dialog-advanced-filter.c b/src/dialogs/dialog-advanced-filter.c
index ba64cc9..cd8d259 100644
--- a/src/dialogs/dialog-advanced-filter.c
+++ b/src/dialogs/dialog-advanced-filter.c
@@ -140,7 +140,7 @@ advanced_filter_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->unique_only_flag = unique;
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
- dao, data, analysis_tool_advanced_filter_engine)) {
+ dao, data, analysis_tool_advanced_filter_engine, FALSE)) {
err = data->base.err;
g_free (data);
} else
diff --git a/src/dialogs/dialog-analysis-tool-chi-squared.c b/src/dialogs/dialog-analysis-tool-chi-squared.c
index 2f30772..0c13a10 100644
--- a/src/dialogs/dialog-analysis-tool-chi-squared.c
+++ b/src/dialogs/dialog-analysis-tool-chi-squared.c
@@ -103,7 +103,8 @@ chi_squared_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
if (!cmd_analysis_tool (data->wbc, state->base.sheet,
- dao, data, analysis_tool_chi_squared_engine))
+ dao, data, analysis_tool_chi_squared_engine,
+ TRUE))
gtk_widget_destroy (state->base.dialog);
return;
diff --git a/src/dialogs/dialog-analysis-tool-frequency.c b/src/dialogs/dialog-analysis-tool-frequency.c
index 79637c6..20f3404 100644
--- a/src/dialogs/dialog-analysis-tool-frequency.c
+++ b/src/dialogs/dialog-analysis-tool-frequency.c
@@ -182,8 +182,10 @@ frequency_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->base.gui, "exact-button");
data->exact = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_frequency_engine))
+ if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
+ state->base.sheet,
+ dao, data, analysis_tool_frequency_engine,
+ TRUE))
gtk_widget_destroy (state->base.dialog);
return;
diff --git a/src/dialogs/dialog-analysis-tool-kaplan-meier.c b/src/dialogs/dialog-analysis-tool-kaplan-meier.c
index d731a91..001330b 100644
--- a/src/dialogs/dialog-analysis-tool-kaplan-meier.c
+++ b/src/dialogs/dialog-analysis-tool-kaplan-meier.c
@@ -292,8 +292,10 @@ kaplan_meier_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->std_err = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (state->std_error_button));
- if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_kaplan_meier_engine))
+ if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
+ state->base.sheet,
+ dao, data, analysis_tool_kaplan_meier_engine,
+ TRUE))
gtk_widget_destroy (state->base.dialog);
return;
diff --git a/src/dialogs/dialog-analysis-tool-normality.c b/src/dialogs/dialog-analysis-tool-normality.c
index 3881d02..ebb02c8 100644
--- a/src/dialogs/dialog-analysis-tool-normality.c
+++ b/src/dialogs/dialog-analysis-tool-normality.c
@@ -161,8 +161,10 @@ normality_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->base.gui, "normalprobabilityplot");
data->graph = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_normality_engine))
+ if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
+ state->base.sheet,
+ dao, data, analysis_tool_normality_engine,
+ TRUE))
gtk_widget_destroy (state->base.dialog);
return;
diff --git a/src/dialogs/dialog-analysis-tool-principal-components.c b/src/dialogs/dialog-analysis-tool-principal-components.c
index 3651f4f..531bbec 100644
--- a/src/dialogs/dialog-analysis-tool-principal-components.c
+++ b/src/dialogs/dialog-analysis-tool-principal-components.c
@@ -107,7 +107,6 @@ principal_components_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data_analysis_output_t *dao;
analysis_tools_data_generic_t *data;
- char *text;
GtkWidget *w;
if (state->warning_dialog != NULL)
@@ -124,15 +123,15 @@ principal_components_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
- dao, data, analysis_tool_principal_components_engine)) {
+ dao, data,
+ analysis_tool_principal_components_engine,
+ TRUE)) {
+ char *text;
text = g_strdup_printf (
- _("An unexpected error has occurred: %d."), data->err);
+ _("An unexpected error has occurred."));
error_in_entry ((GenericToolState *) state,
GTK_WIDGET (state->input_entry), text);
g_free (text);
- range_list_destroy (data->input);
- g_free (dao);
- g_free (data);
} else
gtk_widget_destroy (state->dialog);
return;
diff --git a/src/dialogs/dialog-analysis-tool-sign-test.c b/src/dialogs/dialog-analysis-tool-sign-test.c
index cac6655..8a70fbe 100644
--- a/src/dialogs/dialog-analysis-tool-sign-test.c
+++ b/src/dialogs/dialog-analysis-tool-sign-test.c
@@ -222,7 +222,7 @@ sign_test_two_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
state->base.sheet,
- dao, data, engine))
+ dao, data, engine, TRUE))
gtk_widget_destroy (state->base.dialog);
return;
@@ -332,8 +332,9 @@ sign_test_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
? analysis_tool_sign_test_engine
: analysis_tool_signed_rank_test_engine;
- if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, engine))
+ if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
+ state->base.sheet,
+ dao, data, engine, TRUE))
gtk_widget_destroy (state->base.dialog);
return;
diff --git a/src/dialogs/dialog-analysis-tool-wilcoxon-mann-whitney.c b/src/dialogs/dialog-analysis-tool-wilcoxon-mann-whitney.c
index c0eb064..09071ad 100644
--- a/src/dialogs/dialog-analysis-tool-wilcoxon-mann-whitney.c
+++ b/src/dialogs/dialog-analysis-tool-wilcoxon-mann-whitney.c
@@ -127,8 +127,7 @@ wilcoxon_mann_whitney_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data_analysis_output_t *dao;
analysis_tools_data_generic_t *data;
- char *text;
- GtkWidget *w;
+ GtkWidget *w;
if (state->warning_dialog != NULL)
gtk_widget_destroy (state->warning_dialog);
@@ -144,15 +143,14 @@ wilcoxon_mann_whitney_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
- dao, data, analysis_tool_wilcoxon_mann_whitney_engine)) {
+ dao, data,
+ analysis_tool_wilcoxon_mann_whitney_engine, TRUE)) {
+ char *text;
text = g_strdup_printf (
- _("An unexpected error has occurred: %d."), data->err);
+ _("An unexpected error has occurred."));
error_in_entry ((GenericToolState *) state,
GTK_WIDGET (state->input_entry), text);
g_free (text);
- range_list_destroy (data->input);
- g_free (dao);
- g_free (data);
} else
gtk_widget_destroy (state->dialog);
return;
diff --git a/src/dialogs/dialog-analysis-tools.c b/src/dialogs/dialog-analysis-tools.c
index 6c81b84..f5a1d88 100644
--- a/src/dialogs/dialog-analysis-tools.c
+++ b/src/dialogs/dialog-analysis-tools.c
@@ -643,7 +643,7 @@ corr_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
- dao, data, analysis_tool_correlation_engine)) {
+ dao, data, analysis_tool_correlation_engine, FALSE)) {
switch (data->err - 1) {
case GROUPED_BY_ROW:
@@ -763,7 +763,7 @@ cov_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
- dao, data, analysis_tool_covariance_engine)) {
+ dao, data, analysis_tool_covariance_engine, FALSE)) {
switch (data->err - 1) {
case GROUPED_BY_ROW:
@@ -883,7 +883,7 @@ rank_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
- dao, data, analysis_tool_ranking_engine))
+ dao, data, analysis_tool_ranking_engine, TRUE))
gtk_widget_destroy (state->dialog);
return;
}
@@ -975,7 +975,7 @@ fourier_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->inverse = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)) != 0;
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
- dao, data, analysis_tool_fourier_engine))
+ dao, data, analysis_tool_fourier_engine, TRUE))
gtk_widget_destroy (state->dialog);
return;
@@ -1085,7 +1085,7 @@ cb_desc_stat_tool_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_descriptive_engine))
+ dao, data, analysis_tool_descriptive_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
return;
}
@@ -1352,18 +1352,20 @@ ttest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
switch (state->invocation) {
case TTEST_PAIRED:
- if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_ttest_paired_engine))
+ if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
+ state->base.sheet,
+ dao, data, analysis_tool_ttest_paired_engine,
+ TRUE))
gtk_widget_destroy (state->base.dialog);
break;
case TTEST_UNPAIRED_EQUALVARIANCES:
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_ttest_eqvar_engine))
+ dao, data, analysis_tool_ttest_eqvar_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
break;
case TTEST_UNPAIRED_UNEQUALVARIANCES:
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_ttest_neqvar_engine))
+ dao, data, analysis_tool_ttest_neqvar_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
break;
case TTEST_ZTEST:
@@ -1387,7 +1389,7 @@ ttest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
}
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_ztest_engine))
+ dao, data, analysis_tool_ztest_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
break;
}
@@ -1718,7 +1720,7 @@ ftest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
err = entry_to_float (GTK_ENTRY (state->alpha_entry), &data->alpha, TRUE);
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_ftest_engine))
+ dao, data, analysis_tool_ftest_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
return;
@@ -1946,7 +1948,7 @@ sampling_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
err = entry_to_int (GTK_ENTRY (state->number_entry), &data->number, TRUE);
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_sampling_engine))
+ dao, data, analysis_tool_sampling_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
return;
}
@@ -2194,7 +2196,7 @@ regression_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
(GTK_TOGGLE_BUTTON (state->switch_variables_check));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_regression_engine)) {
+ dao, data, analysis_tool_regression_engine, FALSE)) {
char *text;
text = g_strdup_printf (
@@ -2516,7 +2518,8 @@ exp_smoothing_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->es_type = gnm_gui_group_value (state->base.gui, exp_smoothing_group);
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_exponential_smoothing_engine))
+ dao, data, analysis_tool_exponential_smoothing_engine,
+ TRUE))
gtk_widget_destroy (state->base.dialog);
return;
@@ -2874,7 +2877,7 @@ average_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
}
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_moving_average_engine))
+ dao, data, analysis_tool_moving_average_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
return;
@@ -3282,7 +3285,7 @@ histogram_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->cumulative = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_histogram_engine))
+ dao, data, analysis_tool_histogram_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
return;
@@ -3442,7 +3445,7 @@ anova_single_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
(GTK_SPIN_BUTTON (state->alpha_entry));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
- dao, data, analysis_tool_anova_single_engine))
+ dao, data, analysis_tool_anova_single_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
return;
@@ -3604,7 +3607,7 @@ anova_two_factor_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
state->base.sheet,
- dao, data, analysis_tool_anova_two_factor_engine)) {
+ dao, data, analysis_tool_anova_two_factor_engine, FALSE)) {
switch (data->err) {
case analysis_tools_missing_data:
error_in_entry ((GenericToolState *) state,
diff --git a/src/dialogs/dialog-consolidate.c b/src/dialogs/dialog-consolidate.c
index 191d5af..b6d7801 100644
--- a/src/dialogs/dialog-consolidate.c
+++ b/src/dialogs/dialog-consolidate.c
@@ -315,7 +315,8 @@ cb_consolidate_ok_clicked (GtkWidget *button, ConsolidateState *state)
if (consolidate_check_destination (cs, dao)) {
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
state->base.sheet,
- dao, cs, tool_consolidate_engine) &&
+ dao, cs, tool_consolidate_engine,
+ FALSE) &&
(button == state->base.ok_button))
gtk_widget_destroy (state->base.dialog);
} else {
diff --git a/src/dialogs/dialog-fill-series.c b/src/dialogs/dialog-fill-series.c
index 7587725..656c558 100644
--- a/src/dialogs/dialog-fill-series.c
+++ b/src/dialogs/dialog-fill-series.c
@@ -119,7 +119,7 @@ cb_fill_series_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
state->base.sheet,
- dao, fs, fill_series_engine))
+ dao, fs, fill_series_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
}
diff --git a/src/dialogs/dialog-random-generator-cor.c b/src/dialogs/dialog-random-generator-cor.c
index 14a9373..771a0af 100644
--- a/src/dialogs/dialog-random-generator-cor.c
+++ b/src/dialogs/dialog-random-generator-cor.c
@@ -164,7 +164,7 @@ random_cor_tool_ok_clicked_cb (GtkWidget *button, RandomCorToolState *state)
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
state->base.sheet,
- dao, data, tool_random_cor_engine) &&
+ dao, data, tool_random_cor_engine, TRUE) &&
(button == state->base.ok_button))
gtk_widget_destroy (state->base.dialog);
}
diff --git a/src/dialogs/dialog-random-generator.c b/src/dialogs/dialog-random-generator.c
index e61cc32..65aeb91 100644
--- a/src/dialogs/dialog-random-generator.c
+++ b/src/dialogs/dialog-random-generator.c
@@ -698,7 +698,7 @@ random_tool_ok_clicked_cb (GtkWidget *button, RandomToolState *state)
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
state->base.sheet,
- dao, data, tool_random_engine) &&
+ dao, data, tool_random_engine, TRUE) &&
(button == state->base.ok_button))
gtk_widget_destroy (state->base.dialog);
}
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index e0718b7..85385cd 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -4742,7 +4742,8 @@ cb_auto_expr_insert_formula (WBCGtk *wbcg, gboolean below)
gnm_func_ref (specs->func);
cmd_analysis_tool (WORKBOOK_CONTROL (wbcg), scg_sheet (scg),
- dao, specs, analysis_tool_auto_expression_engine);
+ dao, specs, analysis_tool_auto_expression_engine,
+ TRUE);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]