]> git.lyx.org Git - lyx.git/blob - src/undo.C
Alfredo's second patch
[lyx.git] / src / undo.C
1 /* This file is part of
2  * ======================================================
3  *
4  *           LyX, The Document Processor
5  *
6  *           Copyright 1995 Matthias Ettrich
7  *           Copyright 1995-2001 The LyX Team.
8  *
9  * ====================================================== */
10
11 #include <config.h>
12
13 #include "undo.h"
14 #include "paragraph.h"
15
16
17 Undo::Undo(undo_kind kind_arg, int id_inset_arg,
18            int number_before_arg, int number_behind_arg,
19            int cursor_par_arg, int cursor_pos_arg,
20            Paragraph * par_arg)
21 {
22         kind = kind_arg;
23         number_of_inset_id = id_inset_arg;
24         number_of_before_par = number_before_arg;
25         number_of_behind_par = number_behind_arg;
26         number_of_cursor_par = cursor_par_arg;
27         cursor_pos = cursor_pos_arg;
28         par = par_arg;
29 }
30
31
32 Undo::~Undo()
33 {
34         Paragraph * tmppar;
35         while (par) {
36                 tmppar = par;
37                 par = par->next();
38                 delete tmppar;
39         }
40 }