Merge branch 'master' into import-gui
[pspp] / src / ui / gui / page-sheet-spec.c
index 9aa16b592544e8e1ed34f7a27ad5a45cb7390926..5bd1aa40b869729aaa2acee46d98ec1ccc444948 100644 (file)
@@ -22,7 +22,6 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <gtk-contrib/psppire-sheet.h>
 #include <gtk/gtk.h>
 #include <limits.h>
 #include <stdlib.h>
@@ -51,7 +50,6 @@
 #include "ui/gui/psppire-encoding-selector.h"
 #include "ui/gui/psppire-empty-list-store.h"
 #include "ui/gui/psppire-var-sheet.h"
-#include "ui/gui/psppire-var-store.h"
 #include "ui/gui/psppire-scanf.h"
 #include "ui/syntax-gen.h"
 
@@ -78,7 +76,6 @@ struct sheet_spec_page
     struct casereader *reader;
     struct dictionary *dict;
     
-    struct spreadsheet_read_info sri;
     struct spreadsheet_read_options opts;
   };
 
@@ -102,7 +99,7 @@ sheet_spec_gen_syntax (const struct import_assistant *ia)
                   (ia->spreadsheet->type == SPREADSHEET_GNUMERIC) ? "GNM" : "ODS",
                   ia->file.file_name,                   
                   ssp->opts.sheet_index,
-                  ssp->sri.read_names ? "ON" : "OFF");
+                  ssp->opts.read_names ? "ON" : "OFF");
 
 
   if (range && 0 != strcmp ("", range))
@@ -215,20 +212,15 @@ post_sheet_spec_page (struct import_assistant *ia)
       ssp->opts.cell_range = range;
     }
 
-  ssp->sri.read_names = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (readnames_checkbox));
-  ssp->sri.asw = -1;
+  ssp->opts.read_names = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (readnames_checkbox));
+  ssp->opts.asw = -1;
 
   switch (ia->spreadsheet->type)
     {
     case SPREADSHEET_ODS:
-      {
-       creader = ods_make_reader (ia->spreadsheet, &ssp->sri, &ssp->opts);
-       dict = ia->spreadsheet->dict;
-      }
-      break;
     case SPREADSHEET_GNUMERIC:
       {
-       creader = gnumeric_make_reader (ia->spreadsheet, &ssp->sri, &ssp->opts);
+       creader = spreadsheet_make_reader (ia->spreadsheet, &ssp->opts);
        dict = ia->spreadsheet->dict;
       }
       break;