]> git.lyx.org Git - lyx.git/blobdiff - src/Converter.cpp
Add lfuns doxy.
[lyx.git] / src / Converter.cpp
index 136227b219811b50e6f807f263aadd44fc528996..32afe035e67c28da44836546645933fce4f80ecc 100644 (file)
 #include "support/FileZipListDir.h"
 #include "support/gettext.h"
 #include "support/lstrings.h"
-#include "support/lyxlib.h"
 #include "support/os.h"
 #include "support/Package.h"
 #include "support/Path.h"
 #include "support/Systemcall.h"
 
-using std::find_if;
-using std::string;
-using std::vector;
-using std::distance;
-
+using namespace std;
+using namespace lyx::support;
 
 namespace lyx {
 
-using support::addName;
-using support::bformat;
-using support::changeExtension;
-using support::compare_ascii_no_case;
-using support::contains;
-using support::FileName;
-using support::FileNameList;
-using support::getExtension;
-using support::libFileSearch;
-using support::libScriptSearch;
-using support::makeAbsPath;
-using support::makeRelPath;
-using support::onlyFilename;
-using support::onlyPath;
-using support::package;
-using support::prefixIs;
-using support::quoteName;
-using support::removeExtension;
-using support::split;
-using support::subst;
-using support::Systemcall;
-
 namespace Alert = lyx::frontend::Alert;
 
 
@@ -312,7 +286,7 @@ bool Converters::convert(Buffer const * buffer,
                                formats.extension(from_format);
                        string const to_ext = formats.extension(to_format);
                        string const command =
-                               support::os::python() + ' ' +
+                               os::python() + ' ' +
                                quoteName(libFileSearch("scripts", "convertDefault.py").toFilesystemEncoding()) +
                                ' ' +
                                quoteName(from_ext + ':' + from_file.toFilesystemEncoding()) +
@@ -350,7 +324,7 @@ bool Converters::convert(Buffer const * buffer,
        string const path(onlyPath(from_file.absFilename()));
        // Prevent the compiler from optimizing away p
        FileName pp(path);
-       support::PathChanger p(pp);
+       PathChanger p(pp);
 
        // empty the error list before any new conversion takes place.
        errorList.clear();
@@ -513,6 +487,8 @@ bool Converters::convert(Buffer const * buffer,
 bool Converters::move(string const & fmt,
                      FileName const & from, FileName const & to, bool copy)
 {
+       if (from == to)
+               return true;
 
        bool no_errors = true;
        string const path = onlyPath(from.absFilename());
@@ -521,8 +497,6 @@ bool Converters::move(string const & fmt,
        string const to_extension = getExtension(to.absFilename());
 
        FileNameList const files = FileName(path).dirList(getExtension(from.absFilename()));
-       if (from == to)
-               return true;
        for (FileNameList::const_iterator it = files.begin();
             it != files.end(); ++it) {
                string const from2 = it->absFilename();
@@ -651,8 +625,8 @@ void Converters::buildGraph()
 }
 
 
-std::vector<Format const *> const
-Converters::intToFormat(std::vector<int> const & input)
+vector<Format const *> const
+Converters::intToFormat(vector<int> const & input)
 {
        vector<Format const *> result(input.size());