X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FConverter.cpp;h=ab7e51f912e2c7fbe782207a52a8404dce1fe609;hb=2f271f61bcd514da3ab5b44d2b7bf61e12ac0c44;hp=085ed5fb2f50104a87cd01c08ed8aa6039a8f5ba;hpb=9abb7db46800e554f57e865a3e768602ffd9d6f1;p=lyx.git diff --git a/src/Converter.cpp b/src/Converter.cpp index 085ed5fb2f..ab7e51f912 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -27,10 +27,8 @@ #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" @@ -66,8 +64,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) @@ -287,7 +285,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()) + @@ -325,7 +323,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(); @@ -497,8 +495,8 @@ bool Converters::move(string const & fmt, string const to_base = removeExtension(to.absFilename()); string const to_extension = getExtension(to.absFilename()); - FileNameList const files = FileName(path).dirList(getExtension(from.absFilename())); - for (FileNameList::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);