]> git.lyx.org Git - lyx.git/blob - src/undo.C
The "I want this in now" 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            std::vector<Paragraph *> const & par_arg)
21         : pars(par_arg)
22 {
23         kind = kind_arg;
24         number_of_inset_id = id_inset_arg;
25         number_of_before_par = number_before_arg;
26         number_of_behind_par = number_behind_arg;
27         number_of_cursor_par = cursor_par_arg;
28         cursor_pos = cursor_pos_arg;
29 }
30
31
32 Undo::~Undo()
33 {
34         std::vector<Paragraph *>::iterator it = pars.begin();
35         std::vector<Paragraph *>::iterator end = pars.end();
36         for ( ; it != end; ++it)
37                 delete *it;
38 }