}
for (row_type row = 1; row < dat.size(); ++row)
- addRow(0);
+ appendRow(0);
for (col_type col = 1; col < dat[0].size(); ++col)
addCol(0);
for (row_type row = 0; row < dat.size(); ++row)
}
-void InsetMathGrid::addRow(row_type row)
+void InsetMathGrid::appendRow(row_type row)
{
rowinfo_.insert(rowinfo_.begin() + row + 1, RowInfo());
cells_.insert
void InsetMathGrid::copyRow(row_type row)
{
- addRow(row);
+ appendRow(row);
for (col_type col = 0; col < ncols(); ++col)
cells_[(row + 1) * ncols() + col] = cells_[row * ncols() + col];
}
case LFUN_BREAK_LINE: {
cur.recordUndoInset();
row_type const r = cur.row();
- addRow(r);
+ appendRow(r);
// split line
for (col_type c = col(cur.idx()) + 1; c < ncols(); ++c)
halign('c', cur.col());
else if (s == "append-row")
for (int i = 0, n = extractInt(is); i < n; ++i)
- addRow(cur.row());
+ appendRow(cur.row());
else if (s == "delete-row") {
for (int i = 0, n = extractInt(is); i < n; ++i) {
delRow(cur.row());
row_type const r = cur.row();
col_type const c = cur.col();
for (int i = 0, n = extractInt(is); i < n; ++i)
- addCol(cur.col());
+ addCol(cur.col() + 1);
cur.idx() = index(r, c);
}
else if (s == "delete-column") {
/// pulls cell after pressing erase
void idxGlue(idx_type idx);
- /// add a row
- virtual void addRow(row_type r);
+ /// add a row, one row down
+ virtual void appendRow(row_type r);
/// delete a row
virtual void delRow(row_type r);
/// copy a row
virtual void copyRow(row_type r);
/// swap two rows
virtual void swapRow(row_type r);
- /// add a column
+ /// add a column, here
virtual void addCol(col_type c);
/// delete a column
virtual void delCol(col_type c);
return;
nonum_.insert(nonum_.begin() + row + 1, !numberedType());
label_.insert(label_.begin() + row + 1, docstring());
- InsetMathGrid::addRow(row);
+ InsetMathGrid::appendRow(row);
}
MathData ar = cur.cell();
lyxerr << "use cell: " << ar << endl;
// FIXME: temporarily disabled
- addRow(cur.row());
+ appendRow(cur.row());
++cur.idx();
++cur.idx();
cur.cell() = eq;
++cellrow;
if (cellrow == grid.nrows()) {
//lyxerr << "adding row " << cellrow << endl;
- grid.addRow(cellrow - 1);
+ grid.appendRow(cellrow - 1);
if (cellrow == grid.nrows()) {
// We can't add a row to this grid, so let's
// append the content of this cell to the previous