#include "qt_helpers.h"
+#include "FileDialog.h"
#include "LengthCombo.h"
-#include "support/debug.h"
-#include "support/gettext.h"
+#include "frontends/alert.h"
+
#include "Language.h"
#include "Length.h"
-#include "frontends/FileDialog.h"
-#include "frontends/alert.h"
-
+#include "support/debug.h"
#include "support/filetools.h"
+#include "support/gettext.h"
#include "support/lstrings.h"
#include "support/lyxalgo.h"
#include "support/os.h"
#include <locale>
using namespace std;
+using namespace lyx::support;
namespace lyx {
-
-using support::addName;
-using support::bformat;
-using support::FileFilterList;
-using support::FileName;
-using support::getExtension;
-using support::getVectorFromString;
-using support::libFileSearch;
-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::Systemcall;
-using support::token;
-using support::isStrDbl;
-
namespace frontend {
string widgetsToLength(QLineEdit const * input, LengthCombo const * combo)
Sorter() : loc_ok(true)
{
try {
- loc_ = std::locale("");
+ loc_ = locale("");
} catch (...) {
loc_ok = false;
}
return lhs.first < rhs.first;
}
private:
- std::locale loc_;
+ locale loc_;
bool loc_ok;
#endif
};
vector<LanguagePair>::iterator begin = character_dlg ?
langs.begin() + 2 : langs.begin();
- std::sort(begin, langs.end(), Sorter());
+ sort(begin, langs.end(), Sorter());
return langs;
}
void rescanTexStyles()
{
// Run rescan in user lyx directory
- support::PathChanger p(package().user_support());
+ PathChanger p(package().user_support());
FileName const command = libFileSearch("scripts", "TeXFiles.py");
Systemcall one;
int const status = one.startscript(Systemcall::Wait,
- support::os::python() + ' ' +
+ os::python() + ' ' +
quoteName(command.toFilesystemEncoding()));
if (status == 0)
return;
}
-void getTexFileList(string const & filename, std::vector<string> & list)
+void getTexFileList(string const & filename, vector<string> & list)
{
list.clear();
FileName const file = libFileSearch("", filename);
return;
// FIXME Unicode.
- std::vector<docstring> doclist =
+ vector<docstring> doclist =
getVectorFromString(file.fileContents("UTF-8"), from_ascii("\n"));
// Normalise paths like /foo//bar ==> /foo/bar
boost::RegEx regex("/{2,}");
- std::vector<docstring>::iterator it = doclist.begin();
- std::vector<docstring>::iterator end = doclist.end();
+ vector<docstring>::iterator it = doclist.begin();
+ vector<docstring>::iterator end = doclist.end();
for (; it != end; ++it)
list.push_back(regex.Merge(to_utf8(*it), "/"));
// remove empty items and duplicates
- list.erase(std::remove(list.begin(), list.end(), ""), list.end());
+ list.erase(remove(list.begin(), list.end(), ""), list.end());
eliminate_duplicates(list);
}