]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Do not use \&@#^_~$ as lstinline delimiter, as suggested by Herbert
[lyx.git] / src / Buffer.cpp
index f4088ae8ac904d1d195fceb8ef896a489d3b6268..d4f1f9d77d408ec75ac1eed3e57fa251cb7f853b 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -427,6 +427,7 @@ int Buffer::readHeader(Lexer & lex)
        params().headheight.erase();
        params().headsep.erase();
        params().footskip.erase();
+       params().listings_params.clear();
        for (int i = 0; i < 4; ++i) {
                params().user_defined_bullet(i) = ITEMIZE_DEFAULTS[i];
                params().temp_bullet(i) = ITEMIZE_DEFAULTS[i];
@@ -1739,7 +1740,7 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
        runparams.dryrun = true;
 
        if (full_source) {
-               os << "% Preview source code\n\n";
+               os << "% " << _("Preview source code") << "\n\n";
                if (isLatex())
                        writeLaTeXSource(os, filePath(), runparams, true, true);
                else {
@@ -1749,10 +1750,15 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
                runparams.par_begin = par_begin;
                runparams.par_end = par_end;
                if (par_begin + 1 == par_end)
-                       os << "% Preview source code for paragraph " << par_begin << "\n\n";
+                       os << "% "
+                          << bformat(_("Preview source code for paragraph %1$s"), par_begin)
+                          << "\n\n";
                else
-                       os << "% Preview source code from paragraph " << par_begin
-                          << " to " << par_end - 1 << "\n\n";
+                       os << "% "
+                          << bformat(_("Preview source code from paragraph %1$s to %2$s"),
+                                       convert<docstring>(par_begin),
+                                       convert<docstring>(par_end - 1))
+                          << "\n\n";
                // output paragraphs
                if (isLatex()) {
                        texrow().reset();