void InsetMathGrid::write(WriteStream & os) const
{
+ MathEnsurer ensurer(os, false);
docstring eol;
for (row_type row = 0; row < nrows(); ++row) {
os << verboseHLine(rowinfo_[row].lines_);
lastcol = col + 1;
emptyline = false;
}
- for (col_type col = 0; col < lastcol; ++col)
- os << cell(index(row, col)) << eocString(col, lastcol);
+ for (col_type col = 0; col < lastcol; ++col) {
+ os << cell(index(row, col));
+ if (os.pendingBrace())
+ ModeSpecifier specifier(os, TEXT_MODE);
+ os << eocString(col, lastcol);
+ }
eol = eolString(row, emptyline, os.fragile());
os << eol;
// append newline only if line wasn't completely empty
case LFUN_TABULAR_FEATURE: {
string const s = to_utf8(cmd.argument());
if (nrows() <= 1 && (s == "delete-row" || s == "swap-row")) {
- status.enabled(false);
+ status.setEnabled(false);
status.message(from_utf8(N_("Only one row")));
return true;
}
if (ncols() <= 1 &&
(s == "delete-column" || s == "swap-column")) {
- status.enabled(false);
+ status.setEnabled(false);
status.message(from_utf8(N_("Only one column")));
return true;
}
s == "delete-hline-above") ||
(rowinfo_[cur.row() + 1].lines_ == 0 &&
s == "delete-hline-below")) {
- status.enabled(false);
+ status.setEnabled(false);
status.message(from_utf8(N_("No hline to delete")));
return true;
}
s == "delete-vline-left") ||
(colinfo_[cur.col() + 1].lines_ == 0 &&
s == "delete-vline-right")) {
- status.enabled(false);
+ status.setEnabled(false);
status.message(from_utf8(N_("No vline to delete")));
return true;
}
s == "copy-column" || s == "swap-column" ||
s == "add-vline-left" || s == "add-vline-right" ||
s == "delete-vline-left" || s == "delete-vline-right")
- status.enabled(true);
+ status.setEnabled(true);
else {
- status.enabled(false);
+ status.setEnabled(false);
status.message(bformat(
from_utf8(N_("Unknown tabular feature '%1$s'")), lyx::from_ascii(s)));
}
break;
}
status.setOnOff(cmd.argument()[0] == v_align_);
- status.enabled(true);
+ status.setEnabled(true);
#endif
return true;
}
case LFUN_CELL_SPLIT:
- status.enabled(true);
+ status.setEnabled(true);
return true;
case LFUN_CELL_BACKWARD:
case LFUN_CELL_FORWARD:
- status.enabled(true);
+ status.setEnabled(true);
return true;
default: