]> git.lyx.org Git - lyx.git/blobdiff - src/TexRow.cpp
partial fix for bug 6986: Use the right tex2lyx (at least if tex2lyx is installed)
[lyx.git] / src / TexRow.cpp
index 59a8779309d76a56e51bb53052a6a2658b348741..a18d84f5438925847e1a65129d5f14f7236aeb97 100644 (file)
@@ -4,7 +4,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author Matthias Ettrich
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  * \author John Levon
  *
  * Full author contact details are available in file CREDITS.
@@ -44,6 +44,12 @@ void TexRow::newline()
        rowlist.push_back(tmp);
 }
 
+void TexRow::newlines(int num_lines)
+{
+       for (int i = 0; i < num_lines; ++i) {
+               newline();
+       }
+}
 
 bool TexRow::getIdFromRow(int row, int & id, int & pos) const
 {
@@ -78,7 +84,7 @@ int TexRow::getRowFromIdPos(int id, int pos) const
        }
        if (!foundid)
                return rowlist.size();
-       return distance(rowlist.begin(), bestrow);
+       return distance(rowlist.begin(), bestrow) + 1;
 }