struct sheet_spec_page *ssp = ia->sheet_spec;
struct spreadsheet_read_info sri;
struct spreadsheet_read_options opts;
- struct spreadsheet *spreadsheet = NULL;
file->lines = NULL;
file->file_name = choose_file (parent_window, &file->encoding);
sri.read_names = true;
sri.asw = -1;
- if (spreadsheet == NULL)
- spreadsheet = gnumeric_probe (file->file_name);
+ if (ia->spreadsheet == NULL)
+ ia->spreadsheet = gnumeric_probe (file->file_name);
- if (spreadsheet == NULL)
- spreadsheet = ods_probe (file->file_name);
+ if (ia->spreadsheet == NULL)
+ ia->spreadsheet = ods_probe (file->file_name);
- if (spreadsheet)
- {
- // update_assistant (ia);
- }
- else
+ if (! ia->spreadsheet)
{
struct string input;
struct line_reader *reader = line_reader_for_file (file->encoding, file->file_name, O_RDONLY);
GtkWidget *page;
struct casereader *reader;
struct dictionary *dict;
- struct spreadsheet *spreadsheet;
struct spreadsheet_read_info sri;
struct spreadsheet_read_options opts;
};
-
-
-
/* Initializes IA's sheet_spec substructure. */
struct sheet_spec_page *
sheet_spec_page_create (struct import_assistant *ia)
GtkBuilder *builder = ia->asst.builder;
GtkWidget *sheet_entry = get_widget_assert (builder, "sheet-entry");
- printf ("%s %d\n", __FUNCTION__, p->spreadsheet->sheets);
-
- gtk_spin_button_set_digits (GTK_SPIN_BUTTON (sheet_entry), 0);
- gtk_spin_button_set_range (GTK_SPIN_BUTTON (sheet_entry), 1, p->spreadsheet->sheets);
+ gtk_spin_button_set_digits (GTK_SPIN_BUTTON (sheet_entry), 0);
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON (sheet_entry), 1, ia->spreadsheet->sheets);
}
ssp->sri.read_names = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (readnames_checkbox));
ssp->sri.asw = -1;
- switch (ssp->spreadsheet->type)
+ switch (ia->spreadsheet->type)
{
case SPREADSHEET_ODS:
{
- creader = ods_make_reader (ssp->spreadsheet, &ssp->sri, &ssp->opts);
- dict = ssp->spreadsheet->dict;
+ creader = ods_make_reader (ia->spreadsheet, &ssp->sri, &ssp->opts);
+ dict = ia->spreadsheet->dict;
}
break;
case SPREADSHEET_GNUMERIC:
{
- creader = gnumeric_make_reader (ssp->spreadsheet, &ssp->sri, &ssp->opts);
- dict = ssp->spreadsheet->dict;
+ creader = gnumeric_make_reader (ia->spreadsheet, &ssp->sri, &ssp->opts);
+ dict = ia->spreadsheet->dict;
}
break;
default:
struct sheet_spec_page *ssp = ia->sheet_spec;
int rows = 0;
-
if (ssp->dict)
{
struct ccase *c;