- list_ = il.list_;
- List::iterator it = list_.begin();
- List::iterator end = list_.end();
- for (; it != end; ++it)
- it->inset = it->inset->clone();
+ for (auto & i : list_)
+ i.inset = i.inset->clone();
+}
+
+
+InsetList::InsetList(InsetList const & il, pos_type beg, pos_type end)
+{
+ for (auto const & ci : il) {
+ if (ci.pos < beg)
+ continue;
+ if (ci.pos >= end)
+ break;
+ // Add a new entry in the insetlist_.
+ insert(ci.inset->clone(), ci.pos - beg);
+ }