+ // move on one position if possible
+ if (pos_ < lastpos()) {
+ //lyxerr << "... next pos" << endl;
+ ++pos_;
+ return;
+ }
+
+ // otherwise move on one paragraph if possible
+ if (pit_ < lastpit()) {
+ //lyxerr << "... next par" << endl;
+ ++pit_;
+ pos_ = 0;
+ return;
+ }
+
+ // otherwise move on one cell
+ //lyxerr << "... next idx" << endl;
+
+ LASSERT(idx_ < nargs(), /**/);
+
+ ++idx_;
+ pit_ = 0;
+ pos_ = 0;