X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ferrorlist.C;h=89bc1c1ee2e37f6eb1be64de6d283a07a5146dc7;hb=10ba1b8918e7da14334bb5573ce2a707671c8b51;hp=b9a3c341e5a1ddf124e99cf30bceb8c9b4306947;hpb=2a882902eb6a2633ed419556f6a630e0a048e154;p=lyx.git diff --git a/src/errorlist.C b/src/errorlist.C index b9a3c341e5..89bc1c1ee2 100644 --- a/src/errorlist.C +++ b/src/errorlist.C @@ -5,43 +5,24 @@ * * \author Alfredo Braunstein * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ #include #include "errorlist.h" -#include "buffer.h" -#include "LaTeX.h" +using lyx::pos_type; +using std::string; -ErrorItem::ErrorItem(string const & error, string const & description, - int par_id, int pos_start, int pos_end) - : error(error), description(description), par_id(par_id), - pos_start(pos_start), pos_end(pos_end) + +ErrorItem::ErrorItem(string const & error_, string const & description_, + int par_id_, pos_type pos_start_, pos_type pos_end_) + : error(error_), description(description_), par_id(par_id_), + pos_start(pos_start_), pos_end(pos_end_) {} ErrorItem::ErrorItem() - : par_id(-1), pos_start(0), pos_end(0) + : par_id(-1), pos_start(0), pos_end(0) {} - - -ErrorList::ErrorList(Buffer const & buf, - TeXErrors const & terr) -{ - TeXErrors::Errors::const_iterator cit = terr.begin(); - TeXErrors::Errors::const_iterator end = terr.end(); - - for (; cit != end; ++cit) { - int par_id = -1; - int posstart = -1; - int const errorrow = cit->error_in_line; - buf.texrow.getIdFromRow(errorrow, par_id, posstart); - int posend = -1; - buf.texrow.getIdFromRow(errorrow + 1, par_id, posend); - push_back(ErrorItem(cit->error_desc, - cit->error_text, - par_id, posstart, posend)); - } -}