[gnumeric] xls: fix auto filter save problem.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: fix auto filter save problem.
- Date: Wed, 3 Jul 2013 02:06:08 +0000 (UTC)
commit c690b47e4d052742c7c8efe910d8c880ed9ae9f4
Author: Morten Welinder <terra gnome org>
Date: Tue Jul 2 22:05:38 2013 -0400
xls: fix auto filter save problem.
ChangeLog | 5 +++++
NEWS | 1 +
plugins/excel/ChangeLog | 6 ++++++
plugins/excel/ms-excel-write.c | 2 +-
src/expr-name.c | 6 ++----
5 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 64e2363..b899d7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-02 Morten Welinder <terra gnome org>
+
+ * src/expr-name.c (expr_name_set_is_placeholder): Rearrange the
+ deck chairs.
+
2013-07-01 Morten Welinder <terra gnome org>
* configure.ac (long double): Crude use -lm for long double
diff --git a/NEWS b/NEWS
index b3f98f2..4647f8f 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ Morten:
* Improve accuracy for 2-argument ERF.
* Fix crashes on corrupted files. [#703143] [#703307]
* Fix --with-long-double tests. [#703397]
+ * Fix problems saving auto filters to xls. [#703308]
--------------------------------------------------------------------------
Gnumeric 1.12.3
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 7f4e3de..e6fd707 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,9 @@
+2013-07-02 Morten Welinder <terra gnome org>
+
+ * ms-excel-write.c (excel_write_autofilter_names): Use
+ expr_name_unref, not expr_name_remove since the fake name is not
+ in any scope. Fixes #703308.
+
2013-06-30 Morten Welinder <terra gnome org>
* ms-excel-read.c (excel_read_BOUNDSHEET): Check record length.
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index 098f5a6..851798a 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -3903,7 +3903,7 @@ excel_write_autofilter_names (ExcelWriteState *ewb)
if (NULL != sheet->filters->next) {
/* TODO Warn of lost autofilters */
}
- expr_name_remove (nexpr);
+ expr_name_unref (nexpr);
}
}
}
diff --git a/src/expr-name.c b/src/expr-name.c
index d8ebc83..1056367 100644
--- a/src/expr-name.c
+++ b/src/expr-name.c
@@ -1005,18 +1005,16 @@ expr_name_is_placeholder (GnmNamedExpr const *nexpr)
void
expr_name_set_is_placeholder (GnmNamedExpr *nexpr, gboolean is_placeholder)
{
- const char *name;
-
g_return_if_fail (nexpr != NULL);
- name = expr_name_name (nexpr);
-
is_placeholder = !!is_placeholder;
if (nexpr->is_placeholder == is_placeholder)
return;
nexpr->is_placeholder = is_placeholder;
if (nexpr->scope) {
+ const char *name = expr_name_name (nexpr);
+
g_hash_table_steal (is_placeholder
? nexpr->scope->names
: nexpr->scope->placeholders,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]