+ if (from_format == to_format)
+ return move(from_format, from_file, to_file, false);
+
+ Graph::EdgePath edgepath = getPath(from_format, to_format);
+ if (edgepath.empty()) {
+ 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 =
+ "python " +
+ quoteName(libFileSearch("scripts", "convertDefault.py")) +
+ ' ' +
+ quoteName(from_ext + ':' + from_file) +
+ ' ' +
+ quoteName(to_ext + ':' + to_file);
+ lyxerr[Debug::FILES]
+ << "No converter defined! "
+ "I use convertDefault.py:\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"
+ "Define a convertor in the preferences."),
+ from_format, to_format));
+ return false;