diff --git a/ChangeLog b/ChangeLog index 1386aaeeb2..0d710f2a17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-12-21 Juergen Vigna + + * src/table.C (Read): Now read bogus row format informations + if the format is < 5 so that afterwards the table can + be read by lyx but without any format-info. Fixed the + crash we experienced when not doing this. + 1999-12-21 Lars Gullik Bjønnes * src/text2.C (RedoHeightOfParagraph): rename arg cursor -> cur diff --git a/src/table.C b/src/table.C index 0c454dcb25..ac5b6487d3 100644 --- a/src/table.C +++ b/src/table.C @@ -872,13 +872,36 @@ void LyXTable::Read(FILE * file) #ifdef WITH_WARNINGS #warning Insert a error message window here that this format is not supported anymore #endif + a = b = c = d = -1; if (version < 5) { - lyxerr << "Tabular format < 5 is not supported anymore\n" - "Get an older version of LyX (< 1.1.x) for conversion!" - << endl; + lyxerr << "Tabular format < 5 is not supported anymore\n" + "Get an older version of LyX (< 1.1.x) for conversion!" + << endl; + if (version > 2) { + fgets(vtmp,sizeof(vtmp),file); + sscanf(vtmp, "%d %d %d %d %d %d %d %d\n", + &rows_arg, &columns_arg, + &is_long_table_arg, &rotate_arg, &a, &b, &c, &d); + } else + fscanf(file, "%d %d\n", + &rows_arg, &columns_arg); + Init(rows_arg, columns_arg); + SetLongTable(is_long_table_arg); + SetRotateTable(rotate_arg); + for (i = 0; i