From 39a37f8235f3bb03e48b91ca0f969768ca57acef Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 2 Mar 2013 11:30:52 +0100 Subject: [PATCH] Display "(empty)" if a sheet has no data --- src/ui/gui/psppire-spreadsheet-model.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/gui/psppire-spreadsheet-model.c b/src/ui/gui/psppire-spreadsheet-model.c index 3a14ce6c46..b5ac123755 100644 --- a/src/ui/gui/psppire-spreadsheet-model.c +++ b/src/ui/gui/psppire-spreadsheet-model.c @@ -257,7 +257,8 @@ tree_model_get_value (GtkTreeModel * model, GtkTreeIter * iter, char *x = ods_get_sheet_range (spreadsheetModel->spreadsheet, (gint) iter->user_data); - g_value_set_string (value, x); + + g_value_set_string (value, x ? x : "(empty)"); g_free (x); } break; -- 2.30.2