}
-void InsetText::paragraph(Paragraph * p)
-{
- // GENERAL COMMENT: We don't have to free the old paragraphs as the
- // caller of this function has to take care of it. This IS important
- // as we could have to insert a paragraph before this one and just
- // link the actual to a new ones next and set it with this function
- // and are done!
- paragraphs.set(p);
- // set ourself as owner for all the paragraphs inserted!
- for_each(paragraphs.begin(), paragraphs.end(),
- boost::bind(&Paragraph::setInsetOwner, _1, this));
-
- reinitLyXText();
- // redraw myself when asked for
- need_update = INIT;
-}
-
-
Inset * InsetText::getInsetFromID(int id_arg) const
{
if (id_arg == id())
t->setCursorIntern(undoParagraphs(bv, num).begin(), 0);
}
- // Set the right(new) inset-owner of the paragraph if there is any.
+ // Set the right(new) inset-owner of the paragraph if there is any.
if (!undo.pars.empty()) {
Inset * in = 0;
if (before != end)
}
// this surprisingly fills the undo! (Andre')
size_t par = 0;
- //while (deletepar && deletepar != *behind)
+ //while (deletepar && deletepar != *behind)
while (deletepar != *behind) {
deletelist.push_back(&*deletepar);
++deletepar;
int id = undoParagraphs(bv, undo.number_of_inset_id).front().id();
ParIterator op = bv->buffer()->getParFromID(id);
if (op != end && op->inInset()) {
- static_cast<InsetText*>(op->inInset())->paragraph(undopar);
+#warning FIXME reimplementaion needed here
+ //static_cast<InsetText*>(op->inInset())->paragraph(undopar);
} else {
- bv->buffer()->paragraphs.set(undopar);
+#warning FIXME reimplementation needed here
+ //bv->buffer()->paragraphs.set(undopar);
}
}
} else {
int id = undoParagraphs(bv, undo.number_of_inset_id).front().id();
ParIterator op = bv->buffer()->getParFromID(id);
if (op != end && op->inInset()) {
- static_cast<InsetText*>(op->inInset())->paragraph(&**behind);
+#warning FIXME reimplementation needed here
+ //static_cast<InsetText*>(op->inInset())->paragraph(&**behind);
} else {
- bv->buffer()->paragraphs.set(&**behind);
+#warning FIXME reimplementation needed here
+ //bv->buffer()->paragraphs.set(&**behind);
}
undopar = &**behind;
}
if (kind == Undo::EDIT) {
for (size_t i = 0, n = undo_pars.size(); i < n; ++i)
undo_pars[i]->clearContents();
- }
+ }
int cursor_par = undoCursor(bv).par()->id();
int cursor_pos = undoCursor(bv).pos();
- //lyxerr << "createUndo: inset_id: " << inset_id << " before_number: "
+ //lyxerr << "createUndo: inset_id: " << inset_id << " before_number: "
// << before_number << " behind_number: " << behind_number << "\n";
u.reset(new Undo(kind, inset_id,
before_number, behind_number,