]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
Minimal fix needed to give Qt a label dialog again.
[lyx.git] / src / buffer.C
index b5f9f8561e51aeb751481c1b19eb0920af927fbb..d091ac51e867a2cec56a97b67b30cc5bf48342df 100644 (file)
@@ -1015,7 +1015,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
 
 // needed to insert the selection
 void Buffer::insertStringAsLines(Paragraph *& par, pos_type & pos,
-                                LyXFont const & fn,string const & str) const
+                                LyXFont const & fn,string const & str)
 {
        LyXLayout_ptr const & layout = par->layout();
 
@@ -1030,7 +1030,7 @@ void Buffer::insertStringAsLines(Paragraph *& par, pos_type & pos,
            cit != str.end(); ++cit) {
                if (*cit == '\n') {
                        if (autobreakrows && (!par->empty() || layout->keepempty)) {
-                               breakParagraph(params, par, pos,
+                               breakParagraph(this, par, pos,
                                               layout->isEnvironment());
                                par = par->next();
                                pos = 0;
@@ -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