1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2000 The LyX Team.
9 * ====================================================== */
14 #pragma implementation
18 #include "lyxparagraph.h"
32 // Defines paragraph and position for the beginning of this row
33 void TexRow::start(LyXParagraph * par, int pos)
40 // Insert node when line is completed
41 void TexRow::newline()
46 tmp.id = lastpar->id();
49 tmp.rownumber = ++count;
50 rowlist.push_back(tmp);
54 void TexRow::getIdFromRow(int row, int & id, int & pos)
56 RowList::const_iterator cit = rowlist.begin();
57 for (; cit != rowlist.end(); ++cit) {
58 if ((*cit).rownumber == row) break;
60 if (cit != rowlist.end()) {
61 RowList::iterator kit = rowlist.begin();
62 // Increase the pos of all rows with the
63 // same id (and where the pos is larger)
64 // to avoid putting errorinsets at the
66 for(; kit != rowlist.end(); ++kit) {
67 if (&(*kit) != &(*cit)
68 && (*kit).id == (*cit).id
69 && (*kit).pos >= (*cit).pos)
81 TexRow & TexRow::operator+= (TexRow const & tr)
83 rowlist.insert(rowlist.end(), tr.rowlist.begin(), tr.rowlist.end());