]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
use ParagraphList::iterator a bit more
[lyx.git] / src / buffer.C
index b5f9f8561e51aeb751481c1b19eb0920af927fbb..030e4f3d556c1f0c619b0b500f3912b28d602156 100644 (file)
@@ -1778,7 +1778,7 @@ void Buffer::makeLaTeXFile(ostream & os,
                texrow.newline();
        }
 
-       latexParagraphs(os, &*(paragraphs.begin()), 0, texrow);
+       latexParagraphs(os, paragraphs.begin(), paragraphs.end(), texrow);
 
        // add this just in case after all the paragraphs
        os << endl;
@@ -1816,8 +1816,10 @@ void Buffer::makeLaTeXFile(ostream & os,
 //
 // LaTeX all paragraphs from par to endpar, if endpar == 0 then to the end
 //
-void Buffer::latexParagraphs(ostream & ofs, Paragraph * par,
-                            Paragraph * endpar, TexRow & texrow,
+void Buffer::latexParagraphs(ostream & ofs,
+                            ParagraphList::iterator par,
+                            ParagraphList::iterator endpar,
+                            TexRow & texrow,
                             bool moving_arg) const
 {
        bool was_title = false;
@@ -1865,12 +1867,12 @@ void Buffer::latexParagraphs(ostream & ofs, Paragraph * par,
                        if (layout->isEnvironment() ||
                                !par->params().leftIndent().zero())
                        {
-                               par = par->TeXEnvironment(this, params, ofs, texrow);
+                               par = TeXEnvironment(this, params, par, ofs, texrow);
                        } else {
-                               par = par->TeXOnePar(this, params, ofs, texrow, moving_arg);
+                               par = TeXOnePar(this, params, par, ofs, texrow, moving_arg);
                        }
                } else {
-                       par = par->TeXOnePar(this, params, ofs, texrow, moving_arg);
+                       par = TeXOnePar(this, params, par, ofs, texrow, moving_arg);
                }
        }
        // It might be that we only have a title in this document