]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetexternal.C
* In the process of fixing the math background color bug, this commit transfer backgr...
[lyx.git] / src / insets / insetexternal.C
index ef0efd842f8657fb44d48f59b082a29364acb0d4..588dabc39969747a563997b3ae28e1ad6b4a506a 100644 (file)
@@ -687,7 +687,7 @@ int InsetExternal::latex(Buffer const & buf, odocstream & os,
        // "nice" means that the buffer is exported to LaTeX format but not
        // run through the LaTeX compiler.
        // If we're running through the LaTeX compiler, we should write the
-       // generated files in the bufer's temporary directory.
+       // generated files in the buffer's temporary directory.
        bool const external_in_tmpdir = !runparams.nice;
        bool const dryrun = runparams.dryrun || runparams.inComment;
 
@@ -726,7 +726,7 @@ int InsetExternal::plaintext(Buffer const & buf, odocstream & os,
        external::writeExternal(params_, "Ascii", buf, os,
                                *(runparams.exportdata), false,
                                runparams.dryrun || runparams.inComment);
-       return runparams.linelen; // start with column 0 in new line
+       return PLAINTEXT_NEWLINE;
 }
 
 
@@ -803,7 +803,9 @@ bool preview_wanted(InsetExternalParams const & params)
 docstring const latex_string(InsetExternal const & inset, Buffer const & buffer)
 {
        odocstringstream os;
-       OutputParams runparams;
+       // We don't need to set runparams.encoding since it is not used by
+       // latex().
+       OutputParams runparams(0);
        runparams.flavor = OutputParams::LATEX;
        inset.latex(buffer, os, runparams);
        return os.str();