[gnumeric] ssconvert: when using --set, recalculate only if workbook set for it.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] ssconvert: when using --set, recalculate only if workbook set for it.
- Date: Mon, 18 Nov 2019 23:50:19 +0000 (UTC)
commit 1a3da836ffc01d8e2045e552496d4038e2193a47
Author: Morten Welinder <terra gnome org>
Date: Sun Nov 17 19:23:52 2019 -0500
ssconvert: when using --set, recalculate only if workbook set for it.
Change of plans. This makes --set work more like entering a new value
into a cell in the GUI. If automatic recalculation is on, the workbook
will be recalculated, otherwise not.
doc/ssconvert.1 | 7 +++++--
src/ssconvert.c | 5 ++---
2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/doc/ssconvert.1 b/doc/ssconvert.1
index 12b3aa2a4..125d4c99f 100644
--- a/doc/ssconvert.1
+++ b/doc/ssconvert.1
@@ -32,9 +32,12 @@ starting with two dashes (`--').
Recalculate all cells before writing the result.
.TP
.B \-\-set \fICELL=CONTENTS\fR
-Set the value of \fICELL\fR to \fICONTENTS\fR. Implies --recalc. To
+Set the value of \fICELL\fR to \fICONTENTS\fR. To
put an expression in a cell, add an extra =, for example \-\-set "A11==A10+1".
-This option may be repeated as many times as needed.
+This option may be repeated as many times as needed. The workbook will be
+recalculated after all cells have been set, provided that the workbook is
+set for automatic recalculation. If not, recalculation can be forced
+with --recalc.
.TP
.B \-v, \-\-verbose
Be slightly more verbose about what is going on.
diff --git a/src/ssconvert.c b/src/ssconvert.c
index 235586661..056ba33e3 100644
--- a/src/ssconvert.c
+++ b/src/ssconvert.c
@@ -931,6 +931,8 @@ apply_updates (WorkbookView *wbv)
return 1;
}
+ gnm_app_recalc ();
+
return 0;
}
@@ -1278,9 +1280,6 @@ main (int argc, char const **argv)
return 1;
}
- if (ssconvert_set_cells && ssconvert_set_cells[0])
- ssconvert_recalc = TRUE; // Implied
-
if (ssconvert_object_export) {
// One file per object
ssconvert_one_file_per_sheet = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]