-// removes the row and reset the touched counters
-void LyXText::removeRow(RowList::iterator rit)
-{
- if (anchor_row_ == rit) {
- if (rit != rows().begin()) {
- anchor_row_ = boost::prior(rit);
- anchor_row_offset_ += anchor_row_->height();
- } else {
- anchor_row_ = boost::next(rit);
- anchor_row_offset_ -= rit->height();
- }
- }
-
- // the text becomes smaller
- height -= rit->height();
-
- rowlist_.erase(rit);
-}
-
-
-// remove all following rows of the paragraph of the specified row.
-void LyXText::removeParagraph(RowList::iterator rit)
-{
- ParagraphList::iterator tmppit = rit->par();
- ++rit;
-
- while (rit != rows().end() && rit->par() == tmppit) {
- RowList::iterator tmprit = boost::next(rit);
- removeRow(rit);
- rit = tmprit;
- }
-}
-
-
-void LyXText::insertParagraph(ParagraphList::iterator pit,
- RowList::iterator rowit)
-{
- // insert a new row, starting at position 0
- Row newrow(pit, 0);
- RowList::iterator rit = rowlist_.insert(rowit, newrow);
-
- // and now append the whole paragraph before the new row
- appendParagraph(rit);
-}
-
-