From f41b4df870aac5e97123a089b7903d31d18094f8 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Thu, 28 Feb 2013 19:21:41 +0100 Subject: [PATCH] Got another test working --- src/data/ods-reader.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/data/ods-reader.c b/src/data/ods-reader.c index a5ece5c504..158a2735ac 100644 --- a/src/data/ods-reader.c +++ b/src/data/ods-reader.c @@ -637,7 +637,8 @@ ods_make_reader (struct spreadsheet *spreadsheet, /* Advance to the start of the cells for the target sheet */ - while ( ! reading_target_sheet (r) || r->state != STATE_ROW || r->row < r->start_row ) + while ( ! reading_target_sheet (r) + || r->state != STATE_ROW || r->row <= r->start_row ) { if (1 != (ret = xmlTextReaderRead (r->xtr))) break; @@ -696,6 +697,9 @@ ods_make_reader (struct spreadsheet *spreadsheet, var_spec[idx].firstval.type = 0; var_spec [idx].name = strdup (CHAR_CAST (const char *, value)); + + // printf ("%s:%d Name %s\n", __FILE__, __LINE__, var_spec [idx].name); + xmlFree (value); } } @@ -752,6 +756,8 @@ ods_make_reader (struct spreadsheet *spreadsheet, var_spec [idx].firstval.text = xmlTextReaderValue (r->xtr); var_spec [idx].firstval.value = val_string; + // printf ("%s:%d Text %s\n", __FILE__, __LINE__, var_spec [idx].firstval.text); + val_string = NULL; type = NULL; } -- 2.30.2