]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettext.C
Enable the external inset to handle unknown templates gracefully.
[lyx.git] / src / insets / insettext.C
index bdbf361b74ee4d97a7d1b6e39c898c5c7329a05a..d13ead97c16267b2df8f63debfe2b316b9bcac6c 100644 (file)
@@ -224,7 +224,7 @@ void InsetText::clear(bool just_mark_erased)
 }
 
 
-Inset * InsetText::clone(Buffer const &) const
+Inset * InsetText::clone() const
 {
        return new InsetText(*this);
 }
@@ -2593,40 +2593,6 @@ void InsetText::appendParagraphs(Buffer * buffer, ParagraphList & plist)
 #warning FIXME Check if Changes stuff needs changing here. (Lgb)
 // And it probably does. You have to take a look at this John. (Lgb)
 #warning John, have a look here. (Lgb)
-#if 0
-       BufferParams const & bparams = buffer->params;
-       Paragraph * buf;
-       Paragraph * tmpbuf = newpar;
-       Paragraph * lastbuffer = buf = new Paragraph(*tmpbuf, false);
-       if (bparams.tracking_changes)
-               buf->cleanChanges();
-
-       while (tmpbuf->next()) {
-               tmpbuf = tmpbuf->next();
-               lastbuffer->next(new Paragraph(*tmpbuf, false));
-               lastbuffer->next()->previous(lastbuffer);
-               lastbuffer = lastbuffer->next();
-               if (bparams.tracking_changes)
-                       lastbuffer->cleanChanges();
-       }
-
-       lastbuffer = &*(paragraphs.begin());
-       while (lastbuffer->next())
-               lastbuffer = lastbuffer->next();
-       if (!newpar->empty() && !lastbuffer->empty() &&
-               !lastbuffer->isSeparator(lastbuffer->size() - 1))
-       {
-               lastbuffer->insertChar(lastbuffer->size(), ' ');
-       }
-
-       // make the buf exactly the same layout than our last paragraph
-       buf->makeSameLayout(lastbuffer);
-
-       // paste it!
-       lastbuffer->next(buf);
-       buf->previous(lastbuffer);
-       mergeParagraph(buffer->params, paragraphs, lastbuffer);
-#else
        ParagraphList::iterator pit = plist.begin();
        ParagraphList::iterator ins = paragraphs.insert(paragraphs.end(), *pit);
        ++pit;
@@ -2637,8 +2603,6 @@ void InsetText::appendParagraphs(Buffer * buffer, ParagraphList & plist)
                paragraphs.push_back(*pit);
        }
 
-#endif
-
        reinitLyXText();
 }