Better debug ouput

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34171 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2010-04-16 18:30:52 +00:00
parent f47878c5c1
commit b6846bdace
3 changed files with 8 additions and 3 deletions

View File

@ -1417,6 +1417,12 @@ void Buffer::writeLaTeXSource(odocstream & os,
// Just to be sure. (Asger)
d->texrow.newline();
//for (int i = 0; i<d->texrow.rows(); i++) {
// int id,pos;
// if (d->texrow.getIdFromRow(i+1,id,pos) && id>0)
// lyxerr << i+1 << ":" << id << ":" << getParFromID(id).paragraph().asString()<<"\n";
//}
LYXERR(Debug::INFO, "Finished making LaTeX file.");
LYXERR(Debug::INFO, "Row count was " << d->texrow.rows() - 1 << '.');
}

View File

@ -68,9 +68,6 @@ bool TexRow::getIdFromRow(int row, int & id, int & pos) const
int TexRow::getRowFromIdPos(int id, int pos) const
{
bool foundid = false;
//lyxerr<<"Table:";
//for (unsigned int i=0; i<rowlist.size(); i++)
//lyxerr<<i<<" (id,pos):\t"<<rowlist[i].id()<<" "<<rowlist[i].pos()<<"\n";
// this loop finds the last *nonempty* row with the same id
// and position <= pos

View File

@ -3235,6 +3235,8 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
}
int row = doc_buffer->texrow().getRowFromIdPos(bv->cursor().paragraph().id(), bv->cursor().pos());
LYXERR(Debug::ACTION, "Forward search: row:" << row
<< " id:" << bv->cursor().paragraph().id() << "\n");
if (!row || command.empty()) {
dr.setMessage(_("Couldn't proceed."));
break;