mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-30 05:12:40 +00:00
4b8025d992
* undo.[Ch]: rely on std::vector<Paragraph *> instead of manually linked lists git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6923 a592a061-630c-0410-9148-cb99ea01b6c8
39 lines
939 B
C
39 lines
939 B
C
/* This file is part of
|
|
* ======================================================
|
|
*
|
|
* LyX, The Document Processor
|
|
*
|
|
* Copyright 1995 Matthias Ettrich
|
|
* Copyright 1995-2001 The LyX Team.
|
|
*
|
|
* ====================================================== */
|
|
|
|
#include <config.h>
|
|
|
|
#include "undo.h"
|
|
#include "paragraph.h"
|
|
|
|
|
|
Undo::Undo(undo_kind kind_arg, int id_inset_arg,
|
|
int number_before_arg, int number_behind_arg,
|
|
int cursor_par_arg, int cursor_pos_arg,
|
|
std::vector<Paragraph *> const & par_arg)
|
|
: pars(par_arg)
|
|
{
|
|
kind = kind_arg;
|
|
number_of_inset_id = id_inset_arg;
|
|
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;
|
|
}
|
|
|
|
|
|
Undo::~Undo()
|
|
{
|
|
std::vector<Paragraph *>::iterator it = pars.begin();
|
|
std::vector<Paragraph *>::iterator end = pars.end();
|
|
for ( ; it != end; ++it)
|
|
delete *it;
|
|
}
|