}
-void MathMatrixInset::Metrics(MathStyles st)
+void MathMatrixInset::Metrics(MathStyles /* st */)
{
- size_ = st;
+ size_ = (GetType() == LM_OT_SIMPLE) ? LM_ST_TEXT : LM_ST_DISPLAY;
+
//LyXFont wfont = WhichFont(LM_TC_BF, size());
//wfont.setLatex(LyXFont::OFF);
// let the cells adjust themselves
- MathGridInset::Metrics(st);
+ MathGridInset::Metrics(size_);
if (display()) {
ascent_ += 12;
os << "\\begin{alignat" << star(n) << "}"
<< "{" << ncols()/2 << "}\n";
break;
+ default:
+ os << "\\begin{unknown" << star(n) << "}";
}
}
case LM_OT_ALIGNAT:
os << "\\end{alignat" << star(n) << "}\n";
break;
+
+ default:
+ os << "\\end{unknown" << star(n) << "}";
}
}
}
}
-void MathMatrixInset::breakLine()
-{
- if (GetType() == LM_OT_SIMPLE || GetType() == LM_OT_EQUATION)
- mutate(LM_OT_EQNARRAY);
- addRow(nrows() - 1);
-}
-
-
-void MathMatrixInset::splitCell(int idx)
-{
- if (idx == nargs() - 1) {
- lyxerr << "can't split last cell\n";
- return;
- }
-
- lyxerr << "unimplemented\n";
-}
-
string MathMatrixInset::nicelabel(int row) const
{
case LM_OT_EQNARRAY:
switch (newtype) {
case LM_OT_SIMPLE:
- glueall();
- break;
-
case LM_OT_EQUATION:
- if (nrows() == 1) {
- MathGridInset::delCol(2);
- MathGridInset::delCol(1);
- SetType(LM_OT_EQUATION);
- mutate(newtype);
- } else
- lyxerr << "need to delete rows first\n";
+ glueall();
+ mutate(newtype);
break;
case LM_OT_ALIGN:
case LM_OT_EQNARRAY:
MathGridInset::addCol(1);
SetType(LM_OT_EQNARRAY);
- halign("lrl");
+ halign("rcl");
mutate(newtype);
break;