Make sure to associate each line of the exported latex code to the id/pos

of the first call of TexRow::start(), rather than the last before a newline.
This is what was causing some recent grief (bug #7325, for example).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37894 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2011-03-10 04:05:49 +00:00
parent 98f381158e
commit 732212f233
2 changed files with 8 additions and 1 deletions

View File

@ -32,8 +32,12 @@ void TexRow::reset()
void TexRow::start(int id, int pos)
{
if (started)
return;
lastid = id;
lastpos = pos;
started = true;
}
@ -42,6 +46,7 @@ void TexRow::newline()
int const id = lastid;
RowList::value_type tmp(id, lastpos);
rowlist.push_back(tmp);
started = false;
}
void TexRow::newlines(int num_lines)

View File

@ -26,7 +26,7 @@ namespace lyx {
class TexRow {
public:
///
TexRow() : lastid(-1), lastpos(-1) {}
TexRow() : lastid(-1), lastpos(-1), started(false) {}
/// Clears structure
void reset();
@ -90,6 +90,8 @@ private:
int lastid;
/// Last position
int lastpos;
/// Is id/pos already registered for current row?
bool started;
};