mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Re-organize logic of getSourceCode() routine, so we can see XHTML
for DocBook files.
This commit is contained in:
parent
66a95b9c1b
commit
db71ec4477
@ -3306,9 +3306,7 @@ void Buffer::getSourceCode(odocstream & os, string const format,
|
|||||||
texrow.newline();
|
texrow.newline();
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
// output paragraphs
|
// output paragraphs
|
||||||
if (params().isDocBook())
|
if (runparams.flavor == OutputParams::HTML) {
|
||||||
docbookParagraphs(text(), *this, os, runparams);
|
|
||||||
else if (runparams.flavor == OutputParams::HTML) {
|
|
||||||
XHTMLStream xs(os);
|
XHTMLStream xs(os);
|
||||||
setMathFlavor(runparams);
|
setMathFlavor(runparams);
|
||||||
xhtmlParagraphs(text(), *this, xs, 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.
|
// Probably should have some routine with a signature like them.
|
||||||
writePlaintextParagraph(*this,
|
writePlaintextParagraph(*this,
|
||||||
text().paragraphs()[par_begin], os, runparams, dummy);
|
text().paragraphs()[par_begin], os, runparams, dummy);
|
||||||
|
} else if (params().isDocBook()) {
|
||||||
|
docbookParagraphs(text(), *this, os, runparams);
|
||||||
} else {
|
} else {
|
||||||
// latex or literate
|
// latex or literate
|
||||||
otexstream ots(os, texrow);
|
otexstream ots(os, texrow);
|
||||||
@ -3335,11 +3335,11 @@ void Buffer::getSourceCode(odocstream & os, string const format,
|
|||||||
d->texrow.reset();
|
d->texrow.reset();
|
||||||
d->texrow.newline();
|
d->texrow.newline();
|
||||||
d->texrow.newline();
|
d->texrow.newline();
|
||||||
if (params().isDocBook())
|
if (runparams.flavor == OutputParams::HTML) {
|
||||||
writeDocBookSource(os, absFileName(), runparams, output);
|
|
||||||
else if (runparams.flavor == OutputParams::HTML)
|
|
||||||
writeLyXHTMLSource(os, runparams, output);
|
writeLyXHTMLSource(os, runparams, output);
|
||||||
else {
|
} else if (params().isDocBook()) {
|
||||||
|
writeDocBookSource(os, absFileName(), runparams, output);
|
||||||
|
} else {
|
||||||
// latex or literate
|
// latex or literate
|
||||||
otexstream ots(os, d->texrow);
|
otexstream ots(os, d->texrow);
|
||||||
writeLaTeXSource(ots, string(), runparams, output);
|
writeLaTeXSource(ots, string(), runparams, output);
|
||||||
|
Loading…
Reference in New Issue
Block a user