+ /// fix DocIterator in circumstances that should never happen.
+ /// \return true if the DocIterator was fixed.
+ bool fixIfBroken();
+ /// Repopulate the slices insets from bottom to top. Useful
+ /// for stable iterators or Undo data.
+ void sanitize();
+
+ /// find index of CursorSlice with &cell() == &cell (or -1 if not found)
+ int find(MathData const & cell) const;
+ /// find index of CursorSlice with inset() == inset (or -1 of not found)
+ int find(Inset const * inset) const;
+ /// cut off CursorSlices with index > above and store cut off slices in cut.
+ void cutOff(int above, std::vector<CursorSlice> & cut);
+ /// cut off CursorSlices with index > above
+ void cutOff(int above);
+ /// push CursorSlices on top
+ void append(std::vector<CursorSlice> const & x);
+ /// push one CursorSlice on top and set its index and position
+ void append(idx_type idx, pos_type pos);