From f1a845ca4284b1d0554dc3c0154858bf8c62d129 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 16 Oct 2008 12:10:42 +0000 Subject: [PATCH] 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 --- src/Buffer.cpp | 16 ++++++++-------- status.15x | 3 +++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 9b4591ed28..bd352559f3 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1806,11 +1806,11 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin, if (full_source) { os << "% " << _("Preview source code") << "\n\n"; - if (isLatex()) - writeLaTeXSource(os, filePath(), runparams, true, true); - else { + if (isDocBook()) writeDocBookSource(os, fileName(), runparams, false); - } + else + // latex or literate + writeLaTeXSource(os, filePath(), runparams, true, true); } else { runparams.par_begin = par_begin; runparams.par_end = par_end; @@ -1825,12 +1825,12 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin, convert(par_end - 1)) << "\n\n"; // output paragraphs - if (isLatex()) { + if (isDocBook()) + docbookParagraphs(paragraphs(), *this, os, runparams); + else { + // latex or literate texrow().reset(); latexParagraphs(*this, text(), os, texrow(), runparams); - } else { - // DocBook - docbookParagraphs(paragraphs(), *this, os, runparams); } } } diff --git a/status.15x b/status.15x index 9416c5c3ea..e69f8fab09 100644 --- a/status.15x +++ b/status.15x @@ -67,6 +67,9 @@ What's new - The nomenclature processor can be customized independently from the index processor (bug 5184). +- Fix View Source windows contents for documents with literate programming + support enabled. + * WINDOWS INSTALLER