fix View Source for literate documents

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@26918 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2008-10-16 12:10:42 +00:00
parent 5579327a30
commit f1a845ca42
2 changed files with 11 additions and 8 deletions

View File

@ -1806,11 +1806,11 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
if (full_source) { if (full_source) {
os << "% " << _("Preview source code") << "\n\n"; os << "% " << _("Preview source code") << "\n\n";
if (isLatex()) if (isDocBook())
writeLaTeXSource(os, filePath(), runparams, true, true);
else {
writeDocBookSource(os, fileName(), runparams, false); writeDocBookSource(os, fileName(), runparams, false);
} else
// latex or literate
writeLaTeXSource(os, filePath(), runparams, true, true);
} else { } else {
runparams.par_begin = par_begin; runparams.par_begin = par_begin;
runparams.par_end = par_end; runparams.par_end = par_end;
@ -1825,12 +1825,12 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
convert<docstring>(par_end - 1)) convert<docstring>(par_end - 1))
<< "\n\n"; << "\n\n";
// output paragraphs // output paragraphs
if (isLatex()) { if (isDocBook())
docbookParagraphs(paragraphs(), *this, os, runparams);
else {
// latex or literate
texrow().reset(); texrow().reset();
latexParagraphs(*this, text(), os, texrow(), runparams); latexParagraphs(*this, text(), os, texrow(), runparams);
} else {
// DocBook
docbookParagraphs(paragraphs(), *this, os, runparams);
} }
} }
} }

View File

@ -67,6 +67,9 @@ What's new
- The nomenclature processor can be customized independently from the - The nomenclature processor can be customized independently from the
index processor (bug 5184). index processor (bug 5184).
- Fix View Source windows contents for documents with literate programming
support enabled.
* WINDOWS INSTALLER * WINDOWS INSTALLER