]> 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 f8bd191af8cdf9e2c1a2db9fd3683f00916e9ad9..2dc94daeb9a3438554c68e82888c0f91f984d6b1 100644 (file)
@@ -28,7 +28,7 @@
 #include "Mover.h"
 #include "output_plaintext.h"
 #include "OutputParams.h"
-#include "frontends/Alert.h"
+#include "frontends/alert.h"
 
 #include "support/filetools.h"
 #include "support/lyxlib.h"
 
 #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;
 
@@ -63,7 +63,7 @@ namespace {
 vector<string> const Backends(Buffer const & buffer)
 {
        vector<string> v;
-       if (buffer.params().getLyXTextClass().isTeXClassAvailable()) {
+       if (buffer.params().getTextClass().isTeXClassAvailable()) {
                v.push_back(bufferFormat(buffer));
                // FIXME: Don't hardcode format names here, but use a flag
                if (v.back() == "latex")
@@ -78,13 +78,13 @@ 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 over-write that file?"),
+                                                    "Do you want to overwrite that file?"),
                                      makeDisplayPath(filename.absFilename()));
-               return Alert::prompt(_("Over-write file?"),
+               return Alert::prompt(_("Overwrite file?"),
                                     text, 0, 2,
-                                    _("&Over-write"), _("Over-write &all"),
+                                    _("&Overwrite"), _("Overwrite &all"),
                                     _("&Cancel export"));
        }
        return 0;
@@ -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,