- // if no special converter defined, then we take the default one
- // from ImageMagic: convert from:inname.from to:outname.to
- if (!converters.convert(&buf, temp_file, temp_file, from, to)) {
- string const command =
- "sh " + LibFileSearch("scripts", "convertDefault.sh") +
- ' ' + from + ':' + temp_file + ' ' +
- to + ':' + to_file;
- lyxerr[Debug::GRAPHICS]
- << "No converter defined! I use convertDefault.sh:\n\t"
- << command << endl;
- Systemcall one;
- one.startscript(Systemcall::Wait, command);
- if (IsFileReadable(to_file)) {
- runparams.exportdata->addExternalFile("latex",
- to_file, output_to_file);
- runparams.exportdata->addExternalFile("dvi",
- to_file, output_to_file);
- } else {
- string str = bformat(_("No information for converting %1$s "
- "format files to %2$s.\n"
- "Try defining a convertor in the preferences."), from, to);
- Alert::error(_("Could not convert image"), str);
- }
+ // FIXME (Abdel 12/08/06): Is there a need to show these errors?
+ ErrorList el;
+ if (theConverters().convert(&buf, temp_file, to_file, params().filename,
+ from, to, el,
+ Converters::try_default | Converters::try_cache)) {
+ runparams.exportdata->addExternalFile(tex_format,
+ to_file, output_to_file);
+ runparams.exportdata->addExternalFile("dvi",
+ to_file, output_to_file);