]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_iterator.C
make \newcommand{\bb}[1]{\mathbf{#1}} work for read/write/display.
[lyx.git] / src / mathed / math_iterator.C
index f84858abf630f3bf65589adae3bf35d2519ad9fa..3d6406c799c2faa4f9b33aafff4db283ff77a6e4 100644 (file)
@@ -59,6 +59,12 @@ MathXArray const & MathIterator::xcell() const
 }
 
 
+MathArray const & MathIterator::cell() const
+{
+       return par()->xcell(position().idx_).data_;
+}
+
+
 MathInset * MathIterator::nextInset() const
 {
        if (position().pos_ == xcell().data_.size())
@@ -132,6 +138,13 @@ void MathIterator::operator++()
 }
 
 
+void MathIterator::jump(MathInset::difference_type i)
+{
+       position().pos_ += i;
+       //lyx::Assert(position().pos_ >= 0);
+       lyx::Assert(position().pos_ <= cell().size());
+}
+
 
 bool operator==(MathIterator const & it, MathIterator const & jt)
 {
@@ -151,7 +164,6 @@ bool operator!=(MathIterator const & it, MathIterator const & jt)
 }
 
 
-
 MathIterator ibegin(MathInset * p)
 {
        return MathIterator(p);