]> git.lyx.org Git - features.git/commitdiff
Allow viewing full file of plaintext source.
authorRichard Heck <rgheck@lyx.org>
Sat, 28 Apr 2012 01:17:08 +0000 (21:17 -0400)
committerRichard Heck <rgheck@lyx.org>
Sat, 28 Apr 2012 01:17:08 +0000 (21:17 -0400)
src/Buffer.cpp

index 20ca153959542e191f0da6842a9e14937d3cadf0..0ac4f45d484c16b15ca4282dae1be042adaf46fc 100644 (file)
@@ -3337,6 +3337,11 @@ void Buffer::getSourceCode(odocstream & os, string const format,
                d->texrow.newline();
                if (runparams.flavor == OutputParams::HTML) {
                        writeLyXHTMLSource(os, runparams, output);
+               } else if (runparams.flavor == OutputParams::TEXT) {
+                       if (output == OnlyPreamble) {
+                               os << _("% Plaintext does not have a preamble.");
+                       } else
+                               writePlaintextFile(*this, os, runparams);
                } else if (params().isDocBook()) {
                                writeDocBookSource(os, absFileName(), runparams, output);
                } else {