]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_xiter.C
small cleanup, doxygen, formatting changes
[lyx.git] / src / mathed / math_xiter.C
index 0fa446250e5a7e8f7762bd3b29c22f3559b55802..44e5304a395b6acbc8d962f5c11832f347ce707c 100644 (file)
@@ -5,7 +5,9 @@
 #include "math_rowst.h"
 #include "array.h"
 #include "mathed/support.h"
+#include "debug.h"
 
+using std::endl;
 
 MathedXIter::MathedXIter()
        : MathedIter(), sx(0), sw(0)
@@ -16,6 +18,12 @@ MathedXIter::MathedXIter()
 }
 
 
+MathParInset * MathedXIter::getPar() const
+{
+       return p;
+}
+
+
 void MathedXIter::GetPos(int & xx, int & yy) const
 { 
        if (p) 
@@ -129,11 +137,15 @@ void MathedXIter::Merge(MathedArray * a0)
        // All insets must be clonned
        MathedIter it(a0);
        MathedArray * a = it.Copy();
-       
+
+#if 0
+       array->insert(array->begin() + pos,
+                     a->begin(), a->end());
+#else
        // make room for the data 
        split(a->last());
        array->mergeF(a, pos, a->last());
-       
+#endif
        int pos1 = pos;
        int pos2 = pos + a->last();
        
@@ -175,7 +187,6 @@ MathedXIter::MathedXIter(MathParInset * pp)
        x = y = 0;
        sx = sw = 0;   
        limits = false;
-       s_type = 0;  
        if (p) 
                SetData(p);
        else {
@@ -203,7 +214,7 @@ void MathedXIter::SetData(MathParInset * pp)
        } 
        if (!array) {
                array = new MathedArray; // this leaks
-               p->SetData(array);
+               p->setData(array);
        }
        size = p->GetStyle();
        Reset();
@@ -317,13 +328,14 @@ bool MathedXIter::Prev()
 }
 
 
-bool MathedXIter::goNextColumn()
+void MathedXIter::goNextColumn()
 {  
-       int rowp = row;
+       //int rowp = row;
        int colp = col;
-       while (Next() && col == colp);
+       while (Next() && col == colp)
+               ;
        
-       return (col != colp + 1 || rowp != row);
+       //return (col != colp + 1 || rowp != row);
 }