X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FErrorList.h;h=35294476dccdb4a27fdb198e8e01d25ee06dd89a;hb=a98df5853719256139977e5de0146f3604af9975;hp=e58c47d0f043fce7b6283d69794411dae856d7e2;hpb=f630be890494c849981e4fb52ea4740506e92bed;p=lyx.git diff --git a/src/ErrorList.h b/src/ErrorList.h index e58c47d0f0..35294476dc 100644 --- a/src/ErrorList.h +++ b/src/ErrorList.h @@ -12,10 +12,12 @@ #ifndef ERRORLIST_H #define ERRORLIST_H +#include "TexRow.h" + #include "support/docstring.h" +#include "support/types.h" #include -#include namespace lyx { @@ -25,13 +27,19 @@ class Buffer; /// A class to hold an error item class ErrorItem { public: + typedef TexRow::TextEntry TextEntry; docstring error; docstring description; - int par_id; - pos_type pos_start; - pos_type pos_end; + // To generalise into RowEntries + TextEntry start; + TextEntry end; + Buffer const * buffer; + // With a start position and an end position + ErrorItem(docstring const & error, docstring const & description, + TextEntry start, TextEntry end, Buffer const * buf = 0); + // Error outside the document body ErrorItem(docstring const & error, docstring const & description, - int parid, pos_type posstart, pos_type posend); + Buffer const * buf = 0); ErrorItem(); }; @@ -39,7 +47,7 @@ public: class ErrorList : private std::vector { public: - ErrorList() : std::vector () {}; + ErrorList() : std::vector () {} using std::vector::push_back; using std::vector::end;