From 9a3ed318970479f73fe4d219827c8a8feae62e7f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Tue, 13 May 2003 23:12:45 +0000 Subject: [PATCH] fix compile git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6959 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/controllers/ChangeLog | 4 ++++ src/frontends/controllers/ControlErrorList.C | 24 ++++++++++++-------- src/frontends/controllers/ControlErrorList.h | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index a56f2fad76..2779675a5a 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,7 @@ +2003-05-14 Lars Gullik Bjønnes + + * ControlErrorList.C (goTo): use lyxerr not cout. + 2003-05-12 Alfredo Braunstein: * ControlErrorList.[Ch]: added diff --git a/src/frontends/controllers/ControlErrorList.C b/src/frontends/controllers/ControlErrorList.C index 35e48ee3e0..f3475bf670 100644 --- a/src/frontends/controllers/ControlErrorList.C +++ b/src/frontends/controllers/ControlErrorList.C @@ -16,29 +16,33 @@ #include "buffer.h" #include "BufferView.h" #include "lyxtext.h" +#include "debug.h" +using std::endl; -ControlErrorList::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), + +ControlErrorList::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) {} -ControlErrorList::ControlErrorList(Dialog & d) + +ControlErrorList::ControlErrorList(Dialog & d) : Dialog::Controller(d), current_(0) {} -void ControlErrorList::clearParams() +void ControlErrorList::clearParams() { logfilename_.clear(); clearErrors(); } -std::vector const & +std::vector const & ControlErrorList::ErrorList() const { 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; clearErrors(); @@ -115,7 +119,7 @@ void ControlErrorList::goTo(int item) ParagraphList::iterator pit = buf->getParFromID(err.par_id); if (pit == bv->text->ownerParagraphs().end()) { - cout << "par id not found" << endl; + lyxerr << "par id not found" << endl; return; } @@ -124,7 +128,7 @@ void ControlErrorList::goTo(int item) if (err.pos_end > pit->size() || range <= 0) range = pit->size() - err.pos_start; - //now make the selection + // Now make the selection. bv->insetUnlock(); bv->toggleSelection(); bv->text->clearSelection(); diff --git a/src/frontends/controllers/ControlErrorList.h b/src/frontends/controllers/ControlErrorList.h index 4ce577b37b..8c194a1093 100644 --- a/src/frontends/controllers/ControlErrorList.h +++ b/src/frontends/controllers/ControlErrorList.h @@ -31,7 +31,7 @@ public: int par_id; int pos_start; int pos_end; - ErrorItem(string const &, string const &, int, int, int); + ErrorItem(string const &, string const &, int, int, int); }; /// ControlErrorList(Dialog & parent); -- 2.39.2