From bce1032704bcb0c5b8403bdcf8aedf06cc14382b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Fri, 9 Mar 2001 23:55:50 +0000 Subject: [PATCH] mathed52.diff git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1728 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 2 ++ src/mathed/math_parser.C | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index c1f3ee1593..9252083331 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -6,6 +6,8 @@ * math_xiter.C: use MathedRowContainer::erase + * math_parser.C: use MathedRowContainer::insert_after + 2001-03-08 André Pönitz * math_rowst.h: give MathedRowContainer an 'insert' method. diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index ea084cc494..32c49d0bc8 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -424,8 +424,10 @@ void mathed_parse(MathedArray & array, unsigned flags = 0, int acc_brace = 0; int acc_braces[8]; MathParInset * mt = (mtx) ? *mtx : 0; - MathedRowSt * crow = (mt) ? mt->getRowSt().data_ : 0; - + MathedRowContainer::iterator crow; + if (mt) + crow = mt->getRowSt().begin(); + ++plevel; MathedIter data(&array); while (t) { @@ -602,10 +604,8 @@ void mathed_parse(MathedArray & array, unsigned flags = 0, case LM_TK_NEWLINE: if (mt && (flags & FLAG_END)) { if (mt->Permit(LMPF_ALLOW_CR)) { - if (crow) { - crow->next_ = new MathedRowSt(mt->GetColumns() + 1); - crow = crow->next_; - } + mt->getRowSt().insert_after(crow, MathedRowSt(mt->GetColumns() + 1)); + ++crow; data.insert('K', LM_TC_CR); } else mathPrintError("Unexpected newline"); @@ -869,7 +869,7 @@ void mathed_parse(MathedArray & array, unsigned flags = 0, } mt->SetStyle(size); mt->SetType(mathed_env); - crow = mt->getRowSt().data_; + crow = mt->getRowSt().begin(); } lyxerr[Debug::MATHED] << "MATH BEGIN[" << mathed_env << "]" << endl; -- 2.39.5