[gnumeric] GUI: Make sure an empty string is shown with a quote.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GUI: Make sure an empty string is shown with a quote.
- Date: Wed, 21 Apr 2010 15:53:27 +0000 (UTC)
commit d7b0f0103746d21fd474eb88ddd13196dda3fdcc
Author: Morten Welinder <terra gnome org>
Date: Wed Apr 21 11:53:12 2010 -0400
GUI: Make sure an empty string is shown with a quote.
ChangeLog | 5 +++++
NEWS | 3 +++
src/cell.c | 4 +++-
3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ecd63c6..2232509 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-21 Morten Welinder <terra gnome org>
+
+ * src/cell.c (gnm_cell_get_entered_text): Make sure the empty
+ string gets quoted. Fixes part of #616139.
+
2010-04-21 Jean Brefort <jean brefort normalesup org>
reviewed by: <delete if not using a buddy>
diff --git a/NEWS b/NEWS
index 99563de..0536ddf 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,9 @@ Andreas:
Jean
* Implement graph only sheets. [#158170]
+Morten:
+ * Make sure an empty string is shown with a quote.
+
--------------------------------------------------------------------------
Gnumeric 1.10.2
diff --git a/src/cell.c b/src/cell.c
index 9f2bc77..98923be 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -581,7 +581,9 @@ gnm_cell_get_entered_text (GnmCell const *cell)
/* Try to be reasonably smart about adding a leading quote */
char const *tmp = value_peek_string (v);
- if (tmp[0] != '\'' && !gnm_expr_char_start_p (tmp)) {
+ if (tmp[0] != '\'' &&
+ tmp[0] != 0 &&
+ !gnm_expr_char_start_p (tmp)) {
GnmValue *val = format_match_number
(tmp,
gnm_cell_get_format (cell),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]