par = is_multiline(p->GetType()) ?
new MathMatrixInset(static_cast<MathMatrixInset*>(p)):
- new MathParInset(p);
+ new MathParInset(*p);
// mathcursor = 0;
disp_flag = (par->GetType()>0);
// Silly hack to read labels.
mathed_label.erase();
- mathed_parse(0, 0, &par);
+ MathedArray ar;
+ mathed_parse(ar, 0, &par);
par->Metrics();
disp_flag = (par->GetType() > 0);
par->SetStyle(LM_ST_DISPLAY);
} else {
if (is_multiline(par->GetType())) {
- MathParInset * p = new MathParInset(par);
- delete par;
- par = p;
if (mathcursor)
mathcursor->SetPar(par);
}
UpdatableInset::RESULT
-InsetFormula::LocalDispatch(BufferView * bv, int action, string const & arg)
+InsetFormula::LocalDispatch(BufferView * bv, kb_action action,
+ string const & arg)
{
// extern char *dispatch_result;
MathedTextCodes varcode = LM_TC_MIN;
if (mathcursor && p) {
if (k > 2 && int(strlen(s)) > m)
p->SetAlign(s[0], &s[1]);
- mathcursor->Insert(p, LM_TC_ACTIVE_INSET);
+ mathcursor->insertInset(p, LM_TC_ACTIVE_INSET);
UpdateLocal(bv);
}
break;
}
MathDelimInset * p = new MathDelimInset(ilf, irg);
- mathcursor->Insert(p, LM_TC_ACTIVE_INSET);
+ mathcursor->insertInset(p, LM_TC_ACTIVE_INSET);
UpdateLocal(bv);
break;
}
case LFUN_PROTECTEDSPACE:
bv->lockedInsetStoreUndo(Undo::INSERT);
sp = new MathSpaceInset(1);
- mathcursor->Insert(sp);
+ mathcursor->insertInset(sp, LM_TC_INSET);
space_on = true;
UpdateLocal(bv);
break;
static
void mathedValidate(LaTeXFeatures & features, MathParInset * par)
{
- MathedIter it(par->GetData());
+ MathedIter it(&par->GetData());
while (it.OK() && !(features.binom && features.boldsymbol)) {
if (it.IsInset()) {