#include <config.h>
#include "InsetMathGrid.h"
+
#include "MathData.h"
#include "MathParser.h"
#include "MathStream.h"
+#include "MetricsInfo.h"
#include "BufferView.h"
#include "CutAndPaste.h"
#include "frontends/Painter.h"
#include "support/lstrings.h"
+#include "support/docstream.h"
#include <sstream>
colinfo_[col].lines_ = std::count(
colinfo_[col].special_.begin(),
colinfo_[col].special_.end(), '|');
- LYXERR(Debug::MATHED)
- << "special column separator: `"
- << to_utf8(colinfo_[col].special_)
- << '\'' << endl;
+ LYXERR(Debug::MATHED, "special column separator: `"
+ << to_utf8(colinfo_[col].special_) << '\'');
++col;
colinfo_[col].lines_ = 0;
colinfo_[col].special_.clear();
colinfo_[col].lines_ = std::count(
colinfo_[col].special_.begin(),
colinfo_[col].special_.end(), '|');
- LYXERR(Debug::MATHED)
- << "special column separator: `"
- << to_utf8(colinfo_[col].special_)
- << '\'' << endl;
+ LYXERR(Debug::MATHED, "special column separator: `"
+ << to_utf8(colinfo_[col].special_) << '\'');
}
++col;
colinfo_[col].lines_ = 0;
}
-void InsetMathGrid::appendRow(row_type row)
+void InsetMathGrid::addRow(row_type row)
{
rowinfo_.insert(rowinfo_.begin() + row + 1, RowInfo());
cells_.insert
void InsetMathGrid::copyRow(row_type row)
{
- appendRow(row);
+ addRow(row);
for (col_type col = 0; col < ncols(); ++col)
cells_[(row + 1) * ncols() + col] = cells_[row * ncols() + col];
}
}
-bool InsetMathGrid::idxLeft(Cursor & cur) const
+bool InsetMathGrid::idxBackward(Cursor & cur) const
{
- // leave matrix if on the left hand edge
+ // leave matrix if at the front edge
if (cur.col() == 0)
return false;
--cur.idx();
}
-bool InsetMathGrid::idxRight(Cursor & cur) const
+bool InsetMathGrid::idxForward(Cursor & cur) const
{
- // leave matrix if on the right hand edge
+ // leave matrix if at the back edge
if (cur.col() + 1 == ncols())
return false;
++cur.idx();
case LFUN_BREAK_LINE: {
cur.recordUndoInset();
row_type const r = cur.row();
- appendRow(r);
+ addRow(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)
- appendRow(cur.row());
+ addRow(cur.row());
else if (s == "delete-row") {
cur.clearSelection(); // bug 4323
for (int i = 0, n = extractInt(is); i < n; ++i) {