- case OutlineIn:
- buf.undo().recordUndo(cur);
- for (; lit != lend; ++lit) {
- if ((*lit)->toclevel == thistoclevel + 1 &&
- start->layout()->labeltype == (*lit)->labeltype) {
- start->layout((*lit));
- break;
+ case OutlineIn: {
+ pit_type const len = distance(start, finish);
+ buf.undo().recordUndo(cur, ATOMIC_UNDO, pit, pit + len - 1);
+ for (; start != finish; ++start) {
+ toclevel = start->layout().toclevel;
+ if (toclevel == Layout::NOT_IN_TOC)
+ continue;
+ DocumentClass::const_iterator lit = tc.begin();
+ DocumentClass::const_iterator len = tc.end();
+ for (; lit != len; ++lit) {
+ if (lit->toclevel == toclevel + 1 &&
+ start->layout().labeltype == lit->labeltype) {
+ start->setLayout(*lit);
+ break;
+ }