X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FConverter.cpp;h=e674fc9d484cef2d4ccafc013bdea806acf3dcca;hb=0362c6aae73c293d1c20277c12d362acfe0b2ef6;hp=6768299f7c8352ad2964dbe5aa01ffe8b46e2382;hpb=9383f4c3c6f9cfab2d658701ba66e2b54cd68bea;p=lyx.git diff --git a/src/Converter.cpp b/src/Converter.cpp index 6768299f7c..e674fc9d48 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -30,38 +30,16 @@ #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 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; @@ -87,8 +65,8 @@ string const dvipdfm_options(BufferParams const & bp) 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) @@ -308,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()) + @@ -346,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(); @@ -647,8 +625,8 @@ void Converters::buildGraph() } -std::vector const -Converters::intToFormat(std::vector const & input) +vector const +Converters::intToFormat(vector const & input) { vector result(input.size());