gnumeric_get_sheet_name (struct spreadsheet *s, int n)
{
struct gnumeric_reader *gr = (struct gnumeric_reader *) s;
- assert (n < s->sheets);
+ assert (n < s->n_sheets);
return gr->sheets[n].name;
}
int ret;
struct gnumeric_reader *gr = (struct gnumeric_reader *) s;
- assert (n < s->sheets);
+ assert (n < s->n_sheets);
while (
(gr->sheets[n].stop_col == -1)
caseproto_unref (r->proto);
- for (i = 0; i < r->spreadsheet.sheets; ++i)
+ for (i = 0; i < r->spreadsheet.n_sheets; ++i)
{
xmlFree (r->sheets[i].name);
}
XML_READER_TYPE_ELEMENT == r->node_type)
{
r->state = STATE_SHEET_COUNT;
- r->spreadsheet.sheets = 0;
+ r->spreadsheet.n_sheets = 0;
}
break;
XML_READER_TYPE_ELEMENT == r->node_type)
{
struct sheet_detail *sd ;
- r->spreadsheet.sheets++;
- r->sheets = xrealloc (r->sheets, r->spreadsheet.sheets * sizeof *r->sheets);
- sd = &r->sheets[r->spreadsheet.sheets - 1];
+ r->spreadsheet.n_sheets++;
+ r->sheets = xrealloc (r->sheets, r->spreadsheet.n_sheets * sizeof *r->sheets);
+ sd = &r->sheets[r->spreadsheet.n_sheets - 1];
sd->start_col = sd->stop_col = sd->start_row = sd->stop_row = -1;
}
else if (0 == xmlStrcasecmp (name, _xml("gnm:SheetNameIndex")) &&
}
else if (XML_READER_TYPE_TEXT == r->node_type)
{
- r->sheets [r->spreadsheet.sheets - 1].name = xmlTextReaderValue (r->xtr);
+ r->sheets [r->spreadsheet.n_sheets - 1].name = xmlTextReaderValue (r->xtr);
}
break;
if (r == NULL)
{
r = xzalloc (sizeof *r);
- r->spreadsheet.sheets = -1;
+ r->spreadsheet.n_sheets = -1;
r->spreadsheet.file_name = filename;
}
if (iter == NULL)
return FALSE;
- if ((gint) iter->user_data >= spreadsheetModel->spreadsheet->sheets - 1)
+ if ((gint) iter->user_data >= spreadsheetModel->spreadsheet->n_sheets - 1)
{
iter->user_data = NULL;
iter->stamp = 0;
if (parent)
return FALSE;
- if (n >= spreadsheetModel->spreadsheet->sheets)
+ if (n >= spreadsheetModel->spreadsheet->n_sheets)
return FALSE;
iter->stamp = spreadsheetModel->stamp;
PSPPIRE_SPREADSHEET_MODEL (model);
if (iter == NULL)
- return spreadsheetModel->spreadsheet->sheets;
+ return spreadsheetModel->spreadsheet->n_sheets;
return 0;
}