> btw.  Are you checking that reading and writing still works for each
> patch that you send?

Just the Userguide and this cut-down bit of thesis...

Andre'

PS: Further small changes attached. Changes are pretty obvious now,
the intermediate container helps a lot...

-- 
André Pönitz ........................................ [EMAIL PROTECTED]
Index: formula.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/formula.C,v
retrieving revision 1.91
diff -u -p -r1.91 formula.C
--- formula.C   2001/03/01 15:03:52     1.91
+++ formula.C   2001/03/06 18:14:10
@@ -393,7 +393,7 @@ void InsetFormula::draw(BufferView * bv,
                } else {
                        MathMatrixInset * mt =
                                static_cast<MathMatrixInset*>(par);
-                       MathedRowSt const * crow = mt->getRowSt();
+                       MathedRowContainer::iterator crow = mt->getRowSt().begin();
                        while (crow) {
                                int const y = baseline + crow->getBaseline();
                                if (crow->isNumbered()) {
@@ -404,7 +404,7 @@ void InsetFormula::draw(BufferView * bv,
                                                str = "(#)";
                                        pain.text(int(x + 20), y, str, wfont);
                                }
-                               crow = crow->getNext();
+                               ++crow;
                        }
                }
        }
@@ -557,11 +557,11 @@ vector<string> const InsetFormula::getLa
 
        if (is_multi_numbered(par->GetType())) {
                MathMatrixInset * mt = static_cast<MathMatrixInset*>(par);
-               MathedRowSt const * crow = mt->getRowSt();
+               MathedRowContainer::iterator crow = mt->getRowSt().begin();
                while (crow) {
                        if (!crow->getLabel().empty())
                                label_list.push_back(crow->getLabel());
-                       crow = crow->getNext();
+                       ++crow;
                }
        } else if (!label_.empty())
                label_list.push_back(label_);
Index: math_matrixinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_matrixinset.C,v
retrieving revision 1.11
diff -u -p -r1.11 math_matrixinset.C
--- math_matrixinset.C  2001/03/06 17:44:53     1.11
+++ math_matrixinset.C  2001/03/06 18:14:10
@@ -53,7 +53,7 @@ MathMatrixInset::MathMatrixInset(MathMat
                                row_ = r;
                        else
                                ro->setNext(r);
-                       mrow = mrow->getNext();
+                       mrow = mrow->next_;
                        ro = r;
                        ++nr_;
                }
@@ -67,7 +67,7 @@ MathMatrixInset::~MathMatrixInset()
 {
        MathedRowSt * r = row_.data_;
        while (r) {
-               MathedRowSt * q = r->getNext();
+               MathedRowSt * q = r->next_;
                delete r;
                r = q;
        }
@@ -184,7 +184,7 @@ void MathMatrixInset::Metrics()
                ascent = h - hl;
                break;
        default:
-               ascent = (row_.data_->getNext()) ? h / 2 : h - hl;
+               ascent = (row_.begin().is_last()) ? h / 2 : h - hl;
                break;
        }
        descent = h - ascent + 2;
Index: math_matrixinset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_matrixinset.h,v
retrieving revision 1.6
diff -u -p -r1.6 math_matrixinset.h
--- math_matrixinset.h  2001/03/06 17:13:12     1.6
+++ math_matrixinset.h  2001/03/06 18:14:10
@@ -45,9 +45,9 @@ public: 
        virtual bool isMatrix() const;
        
        /// Use this to manage the extra information independently of paragraph
-       MathedRowSt * getRowSt() const;
+       MathedRowContainer & getRowSt();
        ///
-       void setRowSt(MathedRowSt * r);
+       void setRowSt(MathedRowContainer & r);
 private:
        ///  Number of columns & rows
        int nc_;
@@ -87,14 +87,14 @@ bool MathMatrixInset::isMatrix() const
        
 
 inline
-MathedRowSt * MathMatrixInset::getRowSt() const
+MathedRowContainer & MathMatrixInset::getRowSt()
 {
-       return row_.data_;
+       return row_;
 }
 
 
 inline
-void MathMatrixInset::setRowSt(MathedRowSt * r)
+void MathMatrixInset::setRowSt(MathedRowContainer & r)
 {
        row_ = r;
 }
Index: math_parinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parinset.C,v
retrieving revision 1.13
diff -u -p -r1.13 math_parinset.C
--- math_parinset.C     2001/03/01 20:05:38     1.13
+++ math_parinset.C     2001/03/06 18:14:10
@@ -21,9 +21,10 @@ using std::endl;
 extern int number_of_newlines;
 
 
-MathedRowSt * MathParInset::getRowSt() const
+MathedRowContainer & MathParInset::getRowSt()
 {
-       return 0;
+       static MathedRowContainer dummy;
+       return dummy;
 }
 
 
@@ -270,7 +271,7 @@ void MathParInset::Write(ostream & os, b
        latexkeys const * l;
        MathedIter data(&array);
        // hack
-       MathedRowSt const * crow = getRowSt();   
+       MathedRowContainer::iterator crow = getRowSt().begin();   
        data.Reset();
        
        if (!Permit(LMPF_FIXED_SIZE)) { 
@@ -348,7 +349,7 @@ void MathParInset::Write(ostream & os, b
                                                           << crow->getLabel()
                                                           << "} ";
                                                }
-                                               crow = crow->getNext();
+                                               ++crow;
                                        }
                                        if (fragile)
                                                os << "\\protect";
Index: math_parinset.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parinset.h,v
retrieving revision 1.10
diff -u -p -r1.10 math_parinset.h
--- math_parinset.h     2001/03/06 17:13:12     1.10
+++ math_parinset.h     2001/03/06 18:14:10
@@ -67,9 +67,9 @@ public: 
        ///
        virtual void SetStyle(short);
        ///
-       virtual MathedRowSt * getRowSt() const;
+       virtual MathedRowContainer & getRowSt();
        ///
-       virtual void setRowSt(MathedRowSt *);
+       virtual void setRowSt(MathedRowContainer &);
        ///
        virtual bool Permit(short f) const;
        ///
@@ -150,7 +150,7 @@ int MathParInset::getMaxArgumentIdx() co
 
 
 inline
-void MathParInset::setRowSt(MathedRowSt *)
+void MathParInset::setRowSt(MathedRowContainer &)
 {}
 
 
Index: math_parser.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_parser.C,v
retrieving revision 1.38
diff -u -p -r1.38 math_parser.C
--- math_parser.C       2001/03/05 10:18:36     1.38
+++ math_parser.C       2001/03/06 18:14:10
@@ -424,7 +424,7 @@ void mathed_parse(MathedArray & array, u
        int acc_brace = 0;
        int acc_braces[8];
        MathParInset * mt = (mtx) ? *mtx : 0;
-       MathedRowSt * crow = (mt) ? mt->getRowSt() : 0;
+       MathedRowSt * crow = (mt) ? mt->getRowSt().data_ : 0;
        
        ++plevel;
        MathedIter data(&array);
@@ -869,7 +869,7 @@ void mathed_parse(MathedArray & array, u
                                        }
                                        mt->SetStyle(size);
                                        mt->SetType(mathed_env);
-                                       crow = mt->getRowSt();
+                                       crow = mt->getRowSt().data_;
                                }
                                
                                lyxerr[Debug::MATHED] << "MATH BEGIN[" << mathed_env 
<< "]" << endl;
Index: math_xiter.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_xiter.C,v
retrieving revision 1.12
diff -u -p -r1.12 math_xiter.C
--- math_xiter.C        2001/02/20 18:32:18     1.12
+++ math_xiter.C        2001/03/06 18:14:10
@@ -186,7 +186,7 @@ void MathedXIter::SetData(MathParInset *
        x_ = y_ = 0;
        array = &p_->GetData();
        ncols = p_->GetColumns();
-       crow_ = p_->getRowSt();
+       crow_ = p_->getRowSt().data_;
        if (p_->Permit(LMPF_ALLOW_CR))
                flags |= MthIF_CR;
        if (p_->Permit(LMPF_ALLOW_TAB))
@@ -272,7 +272,7 @@ void MathedXIter::GoBegin()
        x_ = y_ = 0;   
        sw_ = sx_ = 0;
        if (p_) {
-               crow_ = p_->getRowSt();
+               crow_ = p_->getRowSt().data_;
                if (crow_) {
                        x_ = crow_->getTab(0);
                        y_ = crow_->getBaseline();
@@ -447,7 +447,7 @@ void MathedXIter::ipop()
        x_ = stck.x;
        y_ = stck.y;
        if (p_) {
-               crow_ = p_->getRowSt();
+               crow_ = p_->getRowSt().data_;
                if (crow_)
                        for (int i = 0; i < row; ++i)
                                crow_ = crow_->getNext();

Reply via email to