// copy more than one paragraph
// clone the paragraphs within the selection
LyXParagraph * tmppar = startpar;
+#if 0
buf = tmppar->Clone();
+#else
+ buf = new LyXParagraph(*tmppar);
+#endif
LyXParagraph * tmppar2 = buf;
while (tmppar != endpar
&& tmppar->next()) {
tmppar = tmppar->next();
+#if 0
tmppar2->next(tmppar->Clone());
+#else
+ tmppar2->next(new LyXParagraph(*tmppar));
+#endif
tmppar2->next()->previous(tmppar2);
tmppar2 = tmppar2->next();
}
if (pos > (*par)->size())
pos = (*par)->size();
- LyXParagraph * tmpbuf;
+ // LyXParagraph * tmpbuf;
LyXParagraph * tmppar = *par;
int tmppos = pos;
// There are two cases: cutbuffer only one paragraph or many
if (!buf->next()) {
// only within a paragraph
- tmpbuf = buf->Clone();
+#if 0
+ LyXParagraph * tmpbuf = buf->Clone();
+#else
+ LyXParagraph * tmpbuf = new LyXParagraph(*buf);
+#endif
// Some provisions should be done here for checking
// if we are inserting at the beginning of a
// paragraph. If there are a space at the beginning
// many paragraphs
// make a copy of the simple cut_buffer
- tmpbuf = buf;
+ LyXParagraph * tmpbuf = buf;
+#if 0
LyXParagraph * simple_cut_clone = tmpbuf->Clone();
+#else
+ LyXParagraph * simple_cut_clone = new LyXParagraph(*tmpbuf);
+#endif
LyXParagraph * tmpbuf2 = simple_cut_clone;
while (tmpbuf->next()) {
tmpbuf = tmpbuf->next();
+#if 0
tmpbuf2->next(tmpbuf->Clone());
+#else
+ tmpbuf2->next(new LyXParagraph(*tmpbuf));
+#endif
tmpbuf2->next()->previous(tmpbuf2);
tmpbuf2 = tmpbuf2->next();
}