{
}
+
+struct casereader *
+spreadsheet_make_reader (struct spreadsheet *s, const struct spreadsheet_read_options *opts)
+{
+ return ods_make_reader (s, opts);
+}
+
+const char *
+spreadsheet_get_sheet_name (struct spreadsheet *s, int n)
+{
+ return ods_get_sheet_name (s, n);
+}
+
+char *
+spreadsheet_get_sheet_range (struct spreadsheet *s, int n)
+{
+ return ods_get_sheet_range (s, n);
+}
+
+
#define RADIX 26
static void
#include <stdbool.h>
+struct casereeader;
+
/* Default width of string variables. */
#define SPREADSHEET_DEFAULT_WIDTH 8
SPREADSHEET_ODS
};
+
struct spreadsheet
{
const char *file_name;
};
+struct casereader * spreadsheet_make_reader (struct spreadsheet *, const struct spreadsheet_read_options *);
+
+const char * spreadsheet_get_sheet_name (struct spreadsheet *s, int n);
+char * spreadsheet_get_sheet_range (struct spreadsheet *s, int n);
+
+
char *create_cell_ref (int col0, int row0, int coli, int rowi);
/*
struct spreadsheet * spreadsheet_open (const char *filename);
void spreadsheet_close (struct spreadsheet *);
-struct casereeader;
-struct casereader * spreadsheet_make_reader (struct spreadsheet *s);
+
+
#define SPREADSHEET_CAST(X) ((struct spreadsheet *)(X))
switch (ia->spreadsheet->type)
{
case SPREADSHEET_ODS:
- {
- creader = ods_make_reader (ia->spreadsheet, &ssp->opts);
- dict = ia->spreadsheet->dict;
- }
- break;
case SPREADSHEET_GNUMERIC:
{
- creader = gnumeric_make_reader (ia->spreadsheet, &ssp->opts);
+ creader = spreadsheet_make_reader (ia->spreadsheet, &ssp->opts);
dict = ia->spreadsheet->dict;
}
break;
#include <config.h>
#include <glib.h>
-#include "psppire-spreadsheet-model.h"
+#include <gettext.h>
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+#include "psppire-spreadsheet-model.h"
#include "data/spreadsheet-reader.h"
-#include "data/gnumeric-reader.h"
-#include "data/ods-reader.h"
static void psppire_spreadsheet_model_init (PsppireSpreadsheetModel *
spreadsheetModel);
case PSPPIRE_SPREADSHEET_MODEL_COL_NAME:
{
const char *x =
- ods_get_sheet_name (spreadsheetModel->spreadsheet,
+ spreadsheet_get_sheet_name (spreadsheetModel->spreadsheet,
(gint) iter->user_data);
g_value_set_string (value, x);
case PSPPIRE_SPREADSHEET_MODEL_COL_RANGE:
{
char *x =
- ods_get_sheet_range (spreadsheetModel->spreadsheet,
+ spreadsheet_get_sheet_range (spreadsheetModel->spreadsheet,
(gint) iter->user_data);
- g_value_set_string (value, x ? x : "(empty)");
+ g_value_set_string (value, x ? x : _("(empty)"));
g_free (x);
}
break;