X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fundo.C;h=3fa8ca88a969e58e4977a59adf384dcdd164eef2;hb=09e01879979643949f1f2c7216023f1f35d5ada2;hp=f2c02285089528ef1d91a2cbe33de79c79a0ff01;hpb=7521b5d20f42102cf444e3fd8718a088a60d0098;p=lyx.git diff --git a/src/undo.C b/src/undo.C index f2c0228508..3fa8ca88a9 100644 --- a/src/undo.C +++ b/src/undo.C @@ -1,8 +1,8 @@ /* This file is part of * ====================================================== - * + * * LyX, The Document Processor - * + * * Copyright 1995 Matthias Ettrich * Copyright 1995-2001 The LyX Team. * @@ -10,37 +10,19 @@ #include -#ifdef __GNUG__ -#pragma implementation -#endif - #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, - Paragraph * 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; - par = par_arg; -} - - -Undo::~Undo() -{ - Paragraph * tmppar; - while (par) { - tmppar = par; - par = par->next(); - delete tmppar; - } -} +Undo::Undo(undo_kind kind_arg, int inset, + int first, int last, + int cursor, int cursor_pos_arg, + ParagraphList const & par) + : + kind(kind_arg), + inset_id(inset), + first_par_offset(first), + last_par_offset(last), + cursor_par_offset(cursor), + cursor_pos(cursor_pos_arg), + pars(par) +{}