]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetGraphics.cpp
Fix problem with static error list.
[lyx.git] / src / insets / InsetGraphics.cpp
index f76666fb05cc4ce555c24de07da9da1831c21b8f..dc79a017e0c763e279c9c0ebff1b72857e9c9d30 100644 (file)
@@ -611,8 +611,7 @@ string InsetGraphics::prepareFile(OutputParams const & runparams) const
 
        FileName source_file = runparams.nice ? FileName(params().filename) : temp_file;
        // determine the export format
-       string const tex_format = (runparams.flavor == OutputParams::LATEX) ?
-                       "latex" : "pdflatex";
+       string const tex_format = flavor2format(runparams.flavor);
 
        // If the file is compressed and we have specified that it
        // should not be uncompressed, then just return its name and
@@ -746,8 +745,8 @@ string InsetGraphics::prepareFile(OutputParams const & runparams) const
 }
 
 
-int InsetGraphics::latex(otexstream & os,
-                        OutputParams const & runparams) const
+void InsetGraphics::latex(otexstream & os,
+                         OutputParams const & runparams) const
 {
        // If there is no file specified or not existing,
        // just output a message about it in the latex output.
@@ -796,8 +795,6 @@ int InsetGraphics::latex(otexstream & os,
        os << from_utf8(latex_str);
 
        LYXERR(Debug::GRAPHICS, "InsetGraphics::latex outputting:\n" << latex_str);
-       // Return how many newlines we issued.
-       return int(count(latex_str.begin(), latex_str.end(),'\n'));
 }