+ if (try_default) {
+ // if no special converter defined, then we take the
+ // default one from ImageMagic.
+ string const from_ext = from_format.empty() ?
+ GetExtension(from_file) :
+ formats.extension(from_format);
+ string const command =
+ "sh " +
+ QuoteName(LibFileSearch("scripts", "convertDefault.sh")) +
+ ' ' +
+ QuoteName(from_ext + ':' + from_file) +
+ ' ' +
+ QuoteName(to_ext + ':' + to_file);
+ lyxerr[Debug::FILES]
+ << "No converter defined! "
+ "I use convertDefault.sh:\n\t"
+ << command << endl;
+ Systemcall one;
+ one.startscript(Systemcall::Wait, command);
+ if (IsFileReadable(to_file)) {
+ return true;
+ }
+ }
+ Alert::error(_("Cannot convert file"),
+ bformat(_("No information for converting %1$s "
+ "format files to %2$s.\n"
+ "Try defining a convertor in the preferences."),
+ from_format, to_format));