]> git.lyx.org Git - features.git/commitdiff
fix View Source for literate documents
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 16 Oct 2008 07:43:46 +0000 (07:43 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 16 Oct 2008 07:43:46 +0000 (07:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26917 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index 7358872b0b45b26b7ab5a893d8cc0768cf89204d..e08354b39abaf42dac7e79410e8e19c62ad5ab1b 100644 (file)
@@ -2121,10 +2121,11 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
                os << "% " << _("Preview source code") << "\n\n";
                d->texrow.newline();
                d->texrow.newline();
-               if (isLatex())
-                       writeLaTeXSource(os, filePath(), runparams, true, true);
-               else
+               if (isDocBook())
                        writeDocBookSource(os, absFileName(), runparams, false);
+               else 
+                       // latex or literate
+                       writeLaTeXSource(os, filePath(), runparams, true, true);
        } else {
                runparams.par_begin = par_begin;
                runparams.par_end = par_end;
@@ -2142,11 +2143,11 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
                d->texrow.newline();
                d->texrow.newline();
                // output paragraphs
-               if (isLatex())
-                       latexParagraphs(*this, text(), os, d->texrow, runparams);
-               else
-                       // DocBook
+               if (isDocBook())
                        docbookParagraphs(paragraphs(), *this, os, runparams);
+               else 
+                       // latex or literate
+                       latexParagraphs(*this, text(), os, d->texrow, runparams);
        }
 }