+ ///
+ UndoElement(UndoKind kin, CursorData const & cb,
+ StableDocIterator const & cel,
+ pit_type fro, pit_type en, ParagraphList * pl, MathData * ar,
+ bool lc, size_t gid) :
+ cur_before(cb), cell(cel), from(fro), end(en),
+ pars(pl), array(ar), bparams(nullptr),
+ group_id(gid), time(current_time()), kind(kin), lyx_clean(lc)
+ {}
+ ///
+ UndoElement(CursorData const & cb, BufferParams const & bp,
+ bool lc, size_t gid) :
+ cur_before(cb), cell(), from(0), end(0),
+ pars(nullptr), array(nullptr), bparams(new BufferParams(bp)),
+ group_id(gid), time(current_time()), kind(ATOMIC_UNDO), lyx_clean(lc)
+ {}
+ ///
+ UndoElement(UndoElement const & ue) :
+ cur_before(ue.cur_before), cur_after(ue.cur_after),
+ cell(ue.cell), from(ue.from), end(ue.end),
+ pars(ue.pars), array(ue.array),
+ bparams(ue.bparams ? new BufferParams(*ue.bparams) : nullptr),
+ group_id(ue.group_id), time(current_time()), kind(ue.kind),
+ lyx_clean(ue.lyx_clean)
+ {}
+ ///
+ ~UndoElement()
+ {
+ if (bparams)
+ delete bparams;
+ }
+ /// the position of the cursor before recordUndo
+ CursorData cur_before;
+ /// the position of the cursor at the end of the undo group
+ CursorData cur_after;