3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Alfredo Braunstein
8 * Full author contact details are available in file CREDITS
13 #include "errorlist.h"
18 ErrorItem::ErrorItem(string const & error, string const & description,
19 int par_id, int pos_start, int pos_end)
20 : error(error), description(description), par_id(par_id),
21 pos_start(pos_start), pos_end(pos_end)
25 ErrorItem::ErrorItem()
26 : par_id(-1), pos_start(0), pos_end(0)
30 ErrorList::ErrorList(Buffer const & buf,
31 TeXErrors const & terr)
33 TeXErrors::Errors::const_iterator cit = terr.begin();
34 TeXErrors::Errors::const_iterator end = terr.end();
36 for (; cit != end; ++cit) {
39 int const errorrow = cit->error_in_line;
40 buf.texrow.getIdFromRow(errorrow, par_id, posstart);
42 buf.texrow.getIdFromRow(errorrow + 1, par_id, posend);
43 push_back(ErrorItem(cit->error_desc,
45 par_id, posstart, posend));