#include "Buffer.h"
#include "buffer_funcs.h"
#include "BufferParams.h"
-#include "debug.h"
#include "ErrorList.h"
#include "Format.h"
-#include "gettext.h"
#include "Language.h"
#include "LaTeX.h"
#include "Mover.h"
#include "frontends/alert.h"
+#include "support/debug.h"
+#include "support/FileNameList.h"
#include "support/filetools.h"
+#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::dirList;
-using support::FileName;
-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;
string result;
if (bp.papersize != PAPER_CUSTOM) {
- string const paper_size = bp.paperSizeName();
- if (paper_size != "b5" && paper_size != "foolscap")
+ string const paper_size = bp.paperSizeName(BufferParams::DVIPDFM);
+ if (!paper_size.empty())
result = "-p "+ paper_size;
if (bp.orientation == ORIENTATION_LANDSCAPE)
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()) +
"I use convertDefault.py:\n\t" << command);
Systemcall one;
one.startscript(Systemcall::Wait, command);
- if (to_file.isFileReadable()) {
+ if (to_file.isReadableFile()) {
if (conversionflags & try_cache)
ConverterCache::get().add(orig_from,
to_format, to_file);
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();
string const to_base = removeExtension(to.absFilename());
string const to_extension = getExtension(to.absFilename());
- vector<FileName> const files = dirList(FileName(path),
- getExtension(from.absFilename()));
- for (vector<FileName>::const_iterator it = files.begin();
+ support::FileNameList const files = FileName(path).dirList(getExtension(from.absFilename()));
+ for (support::FileNameList::const_iterator it = files.begin();
it != files.end(); ++it) {
string const from2 = it->absFilename();
string const file2 = onlyFilename(from2);
}
-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());