fix compile

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6959 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2003-05-13 23:12:45 +00:00
parent 3e2abfdd78
commit 9a3ed31897
3 changed files with 19 additions and 11 deletions

View File

@ -1,3 +1,7 @@
2003-05-14 Lars Gullik Bjønnes <larsbj@gullik.net>
* ControlErrorList.C (goTo): use lyxerr not cout.
2003-05-12 Alfredo Braunstein: <abraunst@libero.it> 2003-05-12 Alfredo Braunstein: <abraunst@libero.it>
* ControlErrorList.[Ch]: added * ControlErrorList.[Ch]: added

View File

@ -16,29 +16,33 @@
#include "buffer.h" #include "buffer.h"
#include "BufferView.h" #include "BufferView.h"
#include "lyxtext.h" #include "lyxtext.h"
#include "debug.h"
using std::endl;
ControlErrorList::ErrorItem::ErrorItem(string const & error,
string const & description, ControlErrorList::ErrorItem::ErrorItem(string const & error,
int par_id, int pos_start, int pos_end) string const & description,
: error(error), description(description), par_id(par_id), 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) pos_start(pos_start), pos_end(pos_end)
{} {}
ControlErrorList::ControlErrorList(Dialog & d)
ControlErrorList::ControlErrorList(Dialog & d)
: Dialog::Controller(d), current_(0) : Dialog::Controller(d), current_(0)
{} {}
void ControlErrorList::clearParams() void ControlErrorList::clearParams()
{ {
logfilename_.clear(); logfilename_.clear();
clearErrors(); clearErrors();
} }
std::vector<ControlErrorList::ErrorItem> const & std::vector<ControlErrorList::ErrorItem> const &
ControlErrorList::ErrorList() const ControlErrorList::ErrorList() const
{ {
return ErrorList_; return ErrorList_;
@ -51,7 +55,7 @@ int ControlErrorList::currentItem() const
} }
bool ControlErrorList::initialiseParams(string const &) bool ControlErrorList::initialiseParams(string const &)
{ {
logfilename_ = kernel().buffer()->getLogName().second; logfilename_ = kernel().buffer()->getLogName().second;
clearErrors(); clearErrors();
@ -115,7 +119,7 @@ void ControlErrorList::goTo(int item)
ParagraphList::iterator pit = buf->getParFromID(err.par_id); ParagraphList::iterator pit = buf->getParFromID(err.par_id);
if (pit == bv->text->ownerParagraphs().end()) { if (pit == bv->text->ownerParagraphs().end()) {
cout << "par id not found" << endl; lyxerr << "par id not found" << endl;
return; return;
} }
@ -124,7 +128,7 @@ void ControlErrorList::goTo(int item)
if (err.pos_end > pit->size() || range <= 0) if (err.pos_end > pit->size() || range <= 0)
range = pit->size() - err.pos_start; range = pit->size() - err.pos_start;
//now make the selection // Now make the selection.
bv->insetUnlock(); bv->insetUnlock();
bv->toggleSelection(); bv->toggleSelection();
bv->text->clearSelection(); bv->text->clearSelection();

View File

@ -31,7 +31,7 @@ public:
int par_id; int par_id;
int pos_start; int pos_start;
int pos_end; int pos_end;
ErrorItem(string const &, string const &, int, int, int); ErrorItem(string const &, string const &, int, int, int);
}; };
/// ///
ControlErrorList(Dialog & parent); ControlErrorList(Dialog & parent);