#include "Buffer.h"
#include "buffer_funcs.h"
-#include "LCursor.h"
+#include "Cursor.h"
#include "debug.h"
#include "BufferView.h"
#include "LyXText.h"
#include "ParagraphList.h"
#include "mathed/MathSupport.h"
-#include "mathed/MathArray.h"
+#include "mathed/MathData.h"
-#include "insets/Inset.h"
+#include "insets/InsetBase.h"
#include <algorithm>
// fill in the real data to be saved
if (cell.inMathed()) {
// simply use the whole cell
- undo.array = new MathArray(cell.cell());
+ undo.array = new MathData(cell.cell());
} else {
// some more effort needed here as 'the whole cell' of the
// main LyXText _is_ the whole document.
void recordUndo(Undo::undo_kind kind,
- LCursor & cur, pit_type first_pit, pit_type last_pit,
+ Cursor & cur, pit_type first_pit, pit_type last_pit,
limited_stack<Undo> & stack)
{
BOOST_ASSERT(first_pit <= cur.lastpit());
BOOST_ASSERT(undo.array == 0);
// Set cursor
- LCursor & cur = bv.cursor();
+ Cursor & cur = bv.cursor();
cur.setCursor(undo.cursor.asDocIterator(&buf->inset()));
cur.selection() = false;
cur.resetAnchor();
void recordUndo(Undo::undo_kind kind,
- LCursor & cur, pit_type first, pit_type last)
+ Cursor & cur, pit_type first, pit_type last)
{
Buffer * buf = cur.bv().buffer();
recordUndo(kind, cur, first, last, buf->undostack());
}
-void recordUndo(LCursor & cur, Undo::undo_kind kind)
+void recordUndo(Cursor & cur, Undo::undo_kind kind)
{
recordUndo(kind, cur, cur.pit(), cur.pit());
}
-void recordUndoInset(LCursor & cur, Undo::undo_kind kind)
+void recordUndoInset(Cursor & cur, Undo::undo_kind kind)
{
- LCursor c = cur;
+ Cursor c = cur;
c.pop();
Buffer * buf = cur.bv().buffer();
doRecordUndo(kind, c, c.pit(), c.pit(), cur,
}
-void recordUndoSelection(LCursor & cur, Undo::undo_kind kind)
+void recordUndoSelection(Cursor & cur, Undo::undo_kind kind)
{
recordUndo(kind, cur, cur.selBegin().pit(), cur.selEnd().pit());
}
-void recordUndo(LCursor & cur, Undo::undo_kind kind, pit_type from)
+void recordUndo(Cursor & cur, Undo::undo_kind kind, pit_type from)
{
recordUndo(kind, cur, cur.pit(), from);
}
-void recordUndo(LCursor & cur, Undo::undo_kind kind,
+void recordUndo(Cursor & cur, Undo::undo_kind kind,
pit_type from, pit_type to)
{
recordUndo(kind, cur, from, to);