]> git.lyx.org Git - features.git/commitdiff
Martin's convertDefault patch. Remove lyxpreview2xpm cruft.
authorAngus Leeming <leeming@lyx.org>
Tue, 3 Sep 2002 11:55:22 +0000 (11:55 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 3 Sep 2002 11:55:22 +0000 (11:55 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5192 a592a061-630c-0410-9148-cb99ea01b6c8

src/graphics/ChangeLog
src/graphics/GraphicsConverter.C

index 22281bbe1a5b41f8da25b7b3a4cf475a3ac93d06..1cc6c0765cfd736948bfc98821367efed37439fb 100644 (file)
@@ -1,3 +1,12 @@
+2002-09-03  Angus Leeming  <leeming@lyx.org>
+
+       * GraphicsConverter.C (Impl c-tor): remove lyxpreview2xpm cruft.
+
+2002-09-03  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * GraphicsConverter.C (Impl c-tor): "hide" crash by prefixing
+       convertDefault command with "sh ".
+
 2002-08-28  Rob Lahaye  <lahaye@snu.ac.kr>
 
        * GraphicsImage.C: small style fix to width/height setting.
index b1fc6fbe828fe60f406c3838d8def6833c71895f..8fb5493af519301e279de84c56778ed0a353b23a 100644 (file)
@@ -134,33 +134,25 @@ Converter::Impl::Impl(string const & from_file,   string const & to_file_base,
                << "\n\tfrom_format:  " << from_format
                << "\n\tto_format:    " << to_format << endl;
 
+       // The converted image is to be stored in this file
+       to_file_ = ChangeExtension(to_file_base, formats.extension(to_format));
+
        // The conversion commands are stored in a stringstream
        ostringstream script;
        script << "#!/bin/sh\n";
        bool const success = build_script(from_file, to_file_base,
                                          from_format, to_format, script);
 
-       // The converted image is to be stored in this file
-       to_file_ = ChangeExtension(to_file_base, formats.extension(to_format));
-
        if (!success) {
-               script_file_ = string();
-               if (from_format == "lyxpreview") {
-                       script_command_ =
-                               LibFileSearch("scripts", "lyxpreview2xpm.sh")
-                                       + " " +from_file + " " + to_file_;
-                       lyxerr[Debug::GRAPHICS]
-                               << "\tI use lyxpreview2xpm for the conversion\n\t"
-                               << script_command_ << endl;
-               } else {
-                       script_command_ =
-                               LibFileSearch("scripts", "convertDefault.sh") +
-                                       ' ' + from_format + ':' + from_file + ' ' +
-                                       to_format + ':' + to_file_;
-                       lyxerr[Debug::GRAPHICS]
-                               << "\tNo converter defined! I use convertDefault.sh\n\t"
-                               << script_command_ << endl;
-               }
+               script_command_ =
+                       "sh " + LibFileSearch("scripts", "convertDefault.sh") +
+                       ' ' + from_format + ':' + from_file + ' ' +
+                       to_format + ':' + to_file_;
+
+               lyxerr[Debug::GRAPHICS]
+                       << "\tNo converter defined! I use convertDefault.sh\n\t"
+                       << script_command_ << endl;
+
        } else {
 
                lyxerr[Debug::GRAPHICS] << "\tConversion script:"