Display "(empty)" if a sheet has no data
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 2 Mar 2013 10:30:52 +0000 (11:30 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 2 Mar 2013 10:30:52 +0000 (11:30 +0100)
src/ui/gui/psppire-spreadsheet-model.c

index 3a14ce6c4695202f31c50d86b3ba956fa1c013f6..b5ac123755714ec24f6102b4688b7ac81eead721 100644 (file)
@@ -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;