+void Paragraph::operator=(Paragraph const & lp)
+{
+ // needed as we will destroy the pimpl_ before copying it
+ if (&lp != this)
+ return;
+ lyxerr << "Paragraph::operator=()\n";
+ delete pimpl_;
+ pimpl_ = new Pimpl(*lp.pimpl_, this);
+
+ enumdepth = lp.enumdepth;
+ itemdepth = lp.itemdepth;
+ // this is because of the dummy layout of the paragraphs that
+ // follow footnotes
+ layout_ = lp.layout();
+
+ // copy everything behind the break-position to the new paragraph
+ insetlist = lp.insetlist;
+ InsetList::iterator it = insetlist.begin();
+ InsetList::iterator end = insetlist.end();
+ for (; it != end; ++it) {
+ it->inset = static_cast<InsetOld*>(it->inset->clone().release());
+ // tell the new inset who is the boss now
+ it->inset->parOwner(this);
+ }
+}
+