|| token == "\\end_float"
|| token == "\\end_deeper") {
lex.pushToken(token);
+ // Here we need to insert the inset_ert_contents into the last
+ // cell of the tabular.
+ owner_->bufferOwner()->insertErtContents(par, pos, font);
+
break;
}
if (owner_->bufferOwner()->parseSingleLyXformat2Token(lex, par,
for (int i = 0; i < par->size(); ++i) {
if (par->isNewline(i)) {
++cell;
- if (cell > GetNumberOfCells()) {
+ if (cell > numberofcells) {
lyxerr << "Some error in reading old table format occured!" <<
endl << "Terminating when reading cell[" << cell << "]!" <<
endl;
}
}
par->copyIntoMinibuffer(*owner_->bufferOwner(), i);
- inset->par->insertFromMinibuffer(inset->par->size());
+ inset->paragraph()->insertFromMinibuffer(inset->paragraph()->size());
}
delete par;
Reinit();
bool LyXTabular::IsLastCell(int cell) const
{
- if ((cell + 1) < GetNumberOfCells())
+ if ((cell + 1) < numberofcells)
return false;
return true;
}
int LyXTabular::GetCellNumber(int row, int column) const
{
+#if 0
if (column >= columns_)
column = columns_ - 1;
else if (column < 0)
row = rows_ - 1;
else if (row < 0)
row = 0;
-
+#else
+ lyx::Assert(column >= 0 || column < columns_ || row >= 0 || row < rows_);
+#endif
return cell_info[row][column].cellno;
}
ret += TeXCellPreamble(os, cell);
InsetText * inset = GetCellInset(cell);
- bool rtl = inset->par->isRightToLeftPar(buf->params) &&
- inset->par->size() > 0 && GetPWidth(cell).empty();
+ bool rtl = inset->paragraph()->isRightToLeftPar(buf->params) &&
+ inset->paragraph()->size() > 0 && GetPWidth(cell).empty();
if (rtl)
os << "\\R{";
InsetText * LyXTabular::GetCellInset(int row, int column) const
{
-#ifdef WITH_WARNINGS
-#warning Juergen, should we check whether the row/column values are correct?
-// If we do not need to do that, the tests in GetCellNumber should be
-// changed to asserts.
-#endif
cur_cell = GetCellNumber(row, column);
return & cell_info[row][column].inset;
}
LyXTabular::BoxType LyXTabular::UseParbox(int cell) const
{
- Paragraph * par = GetCellInset(cell)->par;
+ Paragraph * par = GetCellInset(cell)->paragraph();
for (; par; par = par->next()) {
for (int i = 0; i < par->size(); ++i) {