mathed52.diff

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1728 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2001-03-09 23:55:50 +00:00
parent ce64f74dd7
commit bce1032704
2 changed files with 9 additions and 7 deletions

View File

@ -6,6 +6,8 @@
* math_xiter.C: use MathedRowContainer::erase * math_xiter.C: use MathedRowContainer::erase
* math_parser.C: use MathedRowContainer::insert_after
2001-03-08 André Pönitz <poenitz@htwm.de> 2001-03-08 André Pönitz <poenitz@htwm.de>
* math_rowst.h: give MathedRowContainer an 'insert' method. * math_rowst.h: give MathedRowContainer an 'insert' method.

View File

@ -424,8 +424,10 @@ void mathed_parse(MathedArray & array, unsigned flags = 0,
int acc_brace = 0; int acc_brace = 0;
int acc_braces[8]; int acc_braces[8];
MathParInset * mt = (mtx) ? *mtx : 0; MathParInset * mt = (mtx) ? *mtx : 0;
MathedRowSt * crow = (mt) ? mt->getRowSt().data_ : 0; MathedRowContainer::iterator crow;
if (mt)
crow = mt->getRowSt().begin();
++plevel; ++plevel;
MathedIter data(&array); MathedIter data(&array);
while (t) { while (t) {
@ -602,10 +604,8 @@ void mathed_parse(MathedArray & array, unsigned flags = 0,
case LM_TK_NEWLINE: case LM_TK_NEWLINE:
if (mt && (flags & FLAG_END)) { if (mt && (flags & FLAG_END)) {
if (mt->Permit(LMPF_ALLOW_CR)) { if (mt->Permit(LMPF_ALLOW_CR)) {
if (crow) { mt->getRowSt().insert_after(crow, MathedRowSt(mt->GetColumns() + 1));
crow->next_ = new MathedRowSt(mt->GetColumns() + 1); ++crow;
crow = crow->next_;
}
data.insert('K', LM_TC_CR); data.insert('K', LM_TC_CR);
} else } else
mathPrintError("Unexpected newline"); mathPrintError("Unexpected newline");
@ -869,7 +869,7 @@ void mathed_parse(MathedArray & array, unsigned flags = 0,
} }
mt->SetStyle(size); mt->SetStyle(size);
mt->SetType(mathed_env); mt->SetType(mathed_env);
crow = mt->getRowSt().data_; crow = mt->getRowSt().begin();
} }
lyxerr[Debug::MATHED] << "MATH BEGIN[" << mathed_env << "]" << endl; lyxerr[Debug::MATHED] << "MATH BEGIN[" << mathed_env << "]" << endl;