]> git.lyx.org Git - features.git/blobdiff - src/graphics/GraphicsConverter.C
change "support/std_sstream.h" to <sstream>
[features.git] / src / graphics / GraphicsConverter.C
index 5ac8f7bd95f42ddd9f1d3523be460127125d3bd0..4e1a754f8d8b5f32a8b14b3e209c00f01470fb28 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <boost/bind.hpp>
 
-#include "support/std_sstream.h"
+#include <sstream>
 #include <fstream>
 
 namespace support = lyx::support;
@@ -43,6 +43,8 @@ using support::unlink;
 
 using std::endl;
 using std::ostream;
+using std::ostringstream;
+using std::string;
 
 
 namespace lyx {
@@ -176,7 +178,7 @@ Converter::Impl::Impl(string const & from_file,   string const & to_file_base,
 
                lyxerr[Debug::GRAPHICS] << "\tConversion script:"
                        << "\n--------------------------------------\n"
-                       << STRCONV(script.str())
+                       << script.str()
                        << "\n--------------------------------------\n";
 
                // Output the script to file.
@@ -185,10 +187,15 @@ Converter::Impl::Impl(string const & from_file,   string const & to_file_base,
                        tostr(counter++) + ".sh";
 
                std::ofstream fs(script_file_.c_str());
-               if (!fs.good())
+               if (!fs.good()) {
+                       lyxerr << "Unable to write the conversion script to \""
+                              << script_file_ << '\n'
+                              << "Please check your directory permissions."
+                              << std::endl;
                        return;
+               }
 
-               fs << STRCONV(script.str());
+               fs << script.str();
                fs.close();
 
                // The command needed to run the conversion process
@@ -258,7 +265,7 @@ string const move_file(string const & from_file, string const & to_file)
                << "\t'rm' -f ${fromfile}\n"
                << "}\n";
 
-       return STRCONV(command.str());
+       return command.str();
 }