]> git.lyx.org Git - lyx.git/blobdiff - src/Exporter.cpp
cleanups: split Paragraph::Private::simpleTeXSpecialChars() in two. Remove two or...
[lyx.git] / src / Exporter.cpp
index 498f8de5f93b9162187da7c5d244520459f668ea..2dc94daeb9a3438554c68e82888c0f91f984d6b1 100644 (file)
 
 #include <boost/filesystem/operations.hpp>
 
+using std::find;
+using std::string;
+using std::vector;
+
 
 namespace lyx {
 
@@ -51,10 +55,6 @@ using support::onlyPath;
 using support::package;
 using support::prefixIs;
 
-using std::find;
-using std::string;
-using std::vector;
-
 namespace Alert = frontend::Alert;
 namespace fs = boost::filesystem;
 
@@ -78,7 +78,7 @@ vector<string> const Backends(Buffer const & buffer)
 /// ask the user what to do if a file already exists
 int checkOverwrite(FileName const & filename)
 {
-       if (fs::exists(filename.toFilesystemEncoding())) {
+       if (filename.exists()) {
                docstring text = bformat(_("The file %1$s already exists.\n\n"
                                                     "Do you want to overwrite that file?"),
                                      makeDisplayPath(filename.absFilename()));
@@ -243,7 +243,7 @@ bool Exporter::Export(Buffer * buffer, string const & format,
                }
                if (status == CANCEL) {
                        buffer->message(_("Document export cancelled."));
-               } else if (fs::exists(tmp_result_file.toFilesystemEncoding())) {
+               } else if (tmp_result_file.exists()) {
                        // Finally copy the main file
                        status = copyFile(format, tmp_result_file,
                                          FileName(result_file), result_file,