]> git.lyx.org Git - lyx.git/blobdiff - src/InsetList.cpp
Fix layout bug. Pasting text into a cell tried to set Standard layout, because
[lyx.git] / src / InsetList.cpp
index 057c82d00ec1c376510d9a949a83848f7d4a1e9b..d69211dbd4bb6eaaa343c6326521d3a0a276d4e2 100644 (file)
@@ -52,6 +52,21 @@ InsetList::InsetList(InsetList const & il)
 }
 
 
+InsetList::InsetList(InsetList const & il, pos_type beg, pos_type end)
+{
+       InsetList::const_iterator cit = il.begin();
+       InsetList::const_iterator cend = il.end();
+       for (; cit != cend; ++cit) {
+               if (cit->pos < beg)
+                       continue;
+               if (cit->pos >= end)
+                       break;
+               // Add a new entry in the insetlist_.
+               insert(cit->inset->clone(), cit->pos - beg);
+       }
+}
+
+
 InsetList::~InsetList()
 {
        List::iterator it = list_.begin();