From cfc43d772d7df156103bc33745ead0556174cf66 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 4 Jun 2012 18:30:37 -0400 Subject: [PATCH] Move TexRow stuff near where it is used. --- src/Buffer.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 8fb72aecb1..c0723bea05 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3316,10 +3316,6 @@ void Buffer::getSourceCode(odocstream & os, string const format, convert(par_end - 1)) << "\n\n"; } - TexRow texrow; - texrow.reset(); - texrow.newline(); - texrow.newline(); // output paragraphs if (runparams.flavor == OutputParams::HTML) { XHTMLStream xs(os); @@ -3334,6 +3330,10 @@ void Buffer::getSourceCode(odocstream & os, string const format, } else if (params().isDocBook()) { docbookParagraphs(text(), *this, os, runparams); } else { + TexRow texrow; + texrow.reset(); + texrow.newline(); + texrow.newline(); // latex or literate otexstream ots(os, texrow); latexParagraphs(*this, text(), ots, runparams); @@ -3347,9 +3347,6 @@ void Buffer::getSourceCode(odocstream & os, string const format, else if (output == OnlyBody) os << _("Preview body"); os << "\n\n"; - d->texrow.reset(); - d->texrow.newline(); - d->texrow.newline(); if (runparams.flavor == OutputParams::HTML) { writeLyXHTMLSource(os, runparams, output); } else if (runparams.flavor == OutputParams::TEXT) { @@ -3361,6 +3358,9 @@ void Buffer::getSourceCode(odocstream & os, string const format, writeDocBookSource(os, absFileName(), runparams, output); } else { // latex or literate + d->texrow.reset(); + d->texrow.newline(); + d->texrow.newline(); otexstream ots(os, d->texrow); writeLaTeXSource(ots, string(), runparams, output); } -- 2.39.2