- RowList::iterator rit = firstRow(pit);
-
- // remove paragraph from rowlist
- while (rit != rows().end() && rit->par() == pit) {
- RowList::iterator rit2 = rit++;
- removeRow(rit2);
- }
-
- // reinsert the paragraph
- // insert a new row, starting at position 0
- Row newrow(pit, 0);
- rit = rowlist_.insert(rit, newrow);
- //newrow.dump("newrow: ");
-
- // and now append the whole paragraph before the new row
- pos_type const last = rit->par()->size();
- bool done = false;
-
- do {
- pos_type z = rowBreakPoint(*rit);
-
- RowList::iterator tmprow = rit;
- //tmprow->dump("tmprow: ");
-
- if (z < last) {
- ++z;
- Row newrow(rit->par(), z);
- //newrow.dump("newrow2: ");
- rit = rowlist_.insert(boost::next(rit), newrow);
- } else {
- done = true;
- }
-
- // Set the dimensions of the row
- // fixed fill setting now by calling inset->update() in
- // SingleWidth when needed!
- //tmprow->dump("tmprow 1: ");
- tmprow->fill(fill(tmprow, workWidth()));
- //tmprow->dump("tmprow 2: ");
- setHeightOfRow(tmprow);
- //tmprow->dump("tmprow 3: ");
- height += rit->height();
-
- } while (!done);
-
- setHeightOfRow(rows().begin());