+ GtkClipboard *clip =
+ gtk_clipboard_get_for_display (gtk_widget_get_display (GTK_WIDGET (dw)),
+ GDK_SELECTION_CLIPBOARD);
+
+ /* Save the selected area to a string */
+ GString *str = g_string_new ("");
+ for (y = sel.start_y ; y <= sel.end_y; ++y)
+ {
+ for (x = sel.start_x ; x <= sel.end_x; ++x)
+ {
+ const struct variable * var = psppire_dict_get_variable (dict, x);
+ gchar *s = psppire_data_store_get_string (dw->data_editor->data_store,
+ y, var, FALSE);
+ g_string_append (str, s);
+ g_string_append (str, "\t");
+ g_free (s);
+ }
+ g_string_append (str, "\n");
+ }