From: Richard Heck Date: Sat, 28 Apr 2012 01:14:25 +0000 (-0400) Subject: Re-organize logic of getSourceCode() routine, so we can see XHTML X-Git-Tag: 2.1.0beta1~1933^2~3 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=db71ec4477c13e6df1b75911b250d390191e3738;p=features.git Re-organize logic of getSourceCode() routine, so we can see XHTML for DocBook files. --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 2c4e9a4788..20ca153959 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3306,9 +3306,7 @@ void Buffer::getSourceCode(odocstream & os, string const format, texrow.newline(); texrow.newline(); // output paragraphs - if (params().isDocBook()) - docbookParagraphs(text(), *this, os, runparams); - else if (runparams.flavor == OutputParams::HTML) { + if (runparams.flavor == OutputParams::HTML) { XHTMLStream xs(os); setMathFlavor(runparams); xhtmlParagraphs(text(), *this, xs, runparams); @@ -3318,6 +3316,8 @@ void Buffer::getSourceCode(odocstream & os, string const format, // Probably should have some routine with a signature like them. writePlaintextParagraph(*this, text().paragraphs()[par_begin], os, runparams, dummy); + } else if (params().isDocBook()) { + docbookParagraphs(text(), *this, os, runparams); } else { // latex or literate otexstream ots(os, texrow); @@ -3335,11 +3335,11 @@ void Buffer::getSourceCode(odocstream & os, string const format, d->texrow.reset(); d->texrow.newline(); d->texrow.newline(); - if (params().isDocBook()) - writeDocBookSource(os, absFileName(), runparams, output); - else if (runparams.flavor == OutputParams::HTML) + if (runparams.flavor == OutputParams::HTML) { writeLyXHTMLSource(os, runparams, output); - else { + } else if (params().isDocBook()) { + writeDocBookSource(os, absFileName(), runparams, output); + } else { // latex or literate otexstream ots(os, d->texrow); writeLaTeXSource(ots, string(), runparams, output);