]> git.lyx.org Git - features.git/blobdiff - src/insets/insetgraphics.C
change "support/std_sstream.h" to <sstream>
[features.git] / src / insets / insetgraphics.C
index 043583f31a9f710fa59e6fa06a994798fcd4ba55..fe29faf3ba076b397f9aabd04e8d0a38aaa2262e 100644 (file)
@@ -77,12 +77,14 @@ TODO
 #include "support/os.h"
 #include "support/systemcall.h"
 #include "support/tostr.h"
-#include "support/std_sstream.h"
 
 #include <boost/bind.hpp>
 #include <boost/tuple/tuple.hpp>
 
+#include <sstream>
+
 namespace support = lyx::support;
+
 using lyx::support::AbsolutePath;
 using lyx::support::bformat;
 using lyx::support::ChangeExtension;
@@ -455,16 +457,12 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
        // This is necessary for DVI export.
        string const temp_path = m_buffer->temppath();
 
-       bool conversion_needed = true;
-
        CopyStatus status;
        boost::tie(status, temp_file) =
                        copyToDirIfNeeded(orig_file, temp_path, zipped);
 
        if (status == FAILURE)
                return orig_file;
-       else if (status == IDENTICAL_CONTENTS)
-               conversion_needed = false;
 
        // a relative filename should be relative to the master
        // buffer.
@@ -477,7 +475,7 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
 
        if (zipped) {
                if (params().noUnzip) {
-                       // We don't know wether latex can actually handle
+                       // We don't know whether latex can actually handle
                        // this file, but we can't check, because that would
                        // mean to unzip the file and thereby making the
                        // noUnzip parameter meaningless.
@@ -551,8 +549,7 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
 
        // Do we need to perform the conversion?
        // Yes if to_file does not exist or if temp_file is newer than to_file
-       if (!conversion_needed ||
-           compare_timestamps(temp_file, to_file) < 0) {
+       if (compare_timestamps(temp_file, to_file) < 0) {
                lyxerr[Debug::GRAPHICS]
                        << bformat(_("No conversion of %1$s is needed after all"),
                                   rel_file)