]> git.lyx.org Git - lyx.git/blob - src/undo.C
Fixed insert File inside tabulars/insettext (fix #301,#302).
[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 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "undo.h"
18 #include "paragraph.h"
19
20
21 Undo::Undo(undo_kind kind_arg, int id_inset_arg,
22            int number_before_arg, int number_behind_arg,
23            int cursor_par_arg, int cursor_pos_arg,
24            Paragraph * par_arg)
25 {
26         kind = kind_arg;
27         number_of_inset_id = id_inset_arg;
28         number_of_before_par = number_before_arg;
29         number_of_behind_par = number_behind_arg;
30         number_of_cursor_par = cursor_par_arg;
31         cursor_pos = cursor_pos_arg;
32         par = par_arg;
33 }
34
35
36 Undo::~Undo()
37 {
38         Paragraph * tmppar;
39         while (par) {
40                 tmppar = par;
41                 par = par->next();
42                 delete tmppar;
43         }
44 }