#include "buffer.h"
#include "insets/inset.h"
#include "debug.h"
+#include "support/LAssert.h"
/// the flag used by FinishUndo();
bool undo_finished;
if (undo) {
finishUndo();
if (!undo_frozen) {
- Paragraph * first = bv->text->getParFromID(undo->number_of_before_par);
+ Paragraph * first = bv->buffer()->getParFromID(undo->number_of_before_par);
if (!first)
first = firstUndoParagraph(bv, undo->number_of_inset_id);
if (first) {
bv->buffer()->redostack.push(
createUndo(bv, undo->kind, first,
- bv->text->getParFromID(undo->number_of_behind_par)));
+ bv->buffer()->getParFromID(undo->number_of_behind_par)));
}
}
}
if (undo) {
finishUndo();
if (!undo_frozen) {
- Paragraph * first = bv->text->getParFromID(undo->number_of_before_par);
+ Paragraph * first = bv->buffer()->getParFromID(undo->number_of_before_par);
if (!first)
first = firstUndoParagraph(bv, undo->number_of_inset_id);
if (first) {
bv->buffer()->undostack.push(
createUndo(bv, undo->kind, first,
- bv->text->getParFromID(undo->number_of_behind_par)));
+ bv->buffer()->getParFromID(undo->number_of_behind_par)));
}
}
}
bool result = false;
if (undo) {
Paragraph * before =
- bv->text->getParFromID(undo->number_of_before_par);
+ bv->buffer()->getParFromID(undo->number_of_before_par);
Paragraph * behind =
- bv->text->getParFromID(undo->number_of_behind_par);
+ bv->buffer()->getParFromID(undo->number_of_behind_par);
Paragraph * tmppar;
Paragraph * tmppar2;
Paragraph * endpar;
} else
endpar = behind;
- tmppar = bv->text->getParFromID(undo->number_of_cursor_par);
- UpdatableInset* it = static_cast<UpdatableInset*>(tmppar3->InInset());
+ tmppar = bv->buffer()->getParFromID(undo->number_of_cursor_par);
+ UpdatableInset* it = static_cast<UpdatableInset*>(tmppar3->inInset());
if (it) {
it->getLyXText(bv)->redoParagraphs(bv, it->getLyXText(bv)->cursor,
endpar);
before_number = first->previous()->id();
if (behind)
behind_number = behind->id();
- if (first->InInset())
- inset_id = first->InInset()->id();
+ if (first->inInset())
+ inset_id = first->inInset()->id();
// Undo::EDIT and Undo::FINISH are
// always finished. (no overlapping there)