]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.C
Compile fix following this weekend's commits.
[lyx.git] / src / tabular.C
index 80dfcbcfc04b589055a05c8d9f9abcaded7356a8..d8623ee958b40acb5018c68e64e2df6cd81d88d2 100644 (file)
@@ -301,11 +301,13 @@ void LyXTabular::AppendColumn(int cell)
                        c_info[i][j] = cell_info[i][j - 1];
                }
                // care about multicolumns
-               if (c_info[i][column + 1].multicolumn==CELL_BEGIN_OF_MULTICOLUMN) {
+               if (c_info[i][column + 1].multicolumn==CELL_BEGIN_OF_MULTICOLUMN)
+               {
                        c_info[i][column + 1].multicolumn = CELL_PART_OF_MULTICOLUMN;
                }
-               if ((column + 1) == columns_ ||
-                       c_info[i][column + 2].multicolumn != CELL_PART_OF_MULTICOLUMN) {
+               if ((column + 2) >= columns_ ||
+                       c_info[i][column + 2].multicolumn != CELL_PART_OF_MULTICOLUMN)
+               {
                        c_info[i][column + 1].multicolumn = LyXTabular::CELL_NORMAL;
                }
        }
@@ -1438,7 +1440,7 @@ void LyXTabular::OldFormatRead(LyXLex & lex, string const & fl)
 #ifndef NO_COMPABILITY
                        // Here we need to insert the inset_ert_contents into the last
                        // cell of the tabular.
-                       owner_->bufferOwner()->insertErtContents(par, pos, font);
+                       owner_->bufferOwner()->insertErtContents(par, pos);
 #endif
                        break;
                }