1999-11-15 12:01:38 +00:00
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 1995 Matthias Ettrich
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 1995-2001 The LyX Team.
|
1999-11-15 12:01:38 +00:00
|
|
|
*
|
|
|
|
* ====================================================== */
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2001-05-08 13:28:44 +00:00
|
|
|
#include "undo.h"
|
2001-06-25 00:06:33 +00:00
|
|
|
#include "paragraph.h"
|
2001-05-08 13:28:44 +00:00
|
|
|
|
2000-01-06 02:44:26 +00:00
|
|
|
|
2001-07-06 15:57:54 +00:00
|
|
|
Undo::Undo(undo_kind kind_arg, int id_inset_arg,
|
2000-01-06 02:44:26 +00:00
|
|
|
int number_before_arg, int number_behind_arg,
|
|
|
|
int cursor_par_arg, int cursor_pos_arg,
|
2001-06-25 00:06:33 +00:00
|
|
|
Paragraph * par_arg)
|
2000-01-06 02:44:26 +00:00
|
|
|
{
|
|
|
|
kind = kind_arg;
|
2001-07-06 15:57:54 +00:00
|
|
|
number_of_inset_id = id_inset_arg;
|
2000-01-06 02:44:26 +00:00
|
|
|
number_of_before_par = number_before_arg;
|
|
|
|
number_of_behind_par = number_behind_arg;
|
|
|
|
number_of_cursor_par = cursor_par_arg;
|
|
|
|
cursor_pos = cursor_pos_arg;
|
|
|
|
par = par_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-03-09 00:56:42 +00:00
|
|
|
Undo::~Undo()
|
|
|
|
{
|
2001-06-25 00:06:33 +00:00
|
|
|
Paragraph * tmppar;
|
2001-03-09 00:56:42 +00:00
|
|
|
while (par) {
|
|
|
|
tmppar = par;
|
|
|
|
par = par->next();
|
|
|
|
delete tmppar;
|
|
|
|
}
|
|
|
|
}
|
2000-01-06 02:44:26 +00:00
|
|
|
|
|
|
|
|