]> git.lyx.org Git - lyx.git/blobdiff - src/Format.cpp
Introducing Font::validate().
[lyx.git] / src / Format.cpp
index e2107a5bdcc0242781a4abb94f99d493024fce96..28c588c9aca40a0ebf053c0cca88f28510185f6e 100644 (file)
@@ -26,7 +26,9 @@
 #include "support/os.h"
 #include "support/Systemcall.h"
 
-#include <boost/filesystem/operations.hpp>
+using std::find_if;
+using std::string;
+using std::distance;
 
 
 namespace lyx {
@@ -44,11 +46,7 @@ using support::subst;
 using support::Systemcall;
 using support::token;
 
-using std::string;
-using std::distance;
-
 namespace Alert = frontend::Alert;
-namespace fs = boost::filesystem;
 namespace os = support::os;
 
 namespace {
@@ -265,7 +263,7 @@ void Formats::setViewer(string const & name, string const & command)
 bool Formats::view(Buffer const & buffer, FileName const & filename,
                   string const & format_name) const
 {
-       if (filename.empty() || !fs::exists(filename.toFilesystemEncoding())) {
+       if (filename.empty() || !filename.exists()) {
                Alert::error(_("Cannot view file"),
                        bformat(_("File does not exist: %1$s"),
                                from_utf8(filename.absFilename())));
@@ -335,7 +333,7 @@ bool Formats::view(Buffer const & buffer, FileName const & filename,
 bool Formats::edit(Buffer const & buffer, FileName const & filename,
                         string const & format_name) const
 {
-       if (filename.empty() || !fs::exists(filename.toFilesystemEncoding())) {
+       if (filename.empty() || !filename.exists()) {
                Alert::error(_("Cannot edit file"),
                        bformat(_("File does not exist: %1$s"),
                                from_utf8(filename.absFilename())));