]> git.lyx.org Git - lyx.git/blobdiff - src/Converter.cpp
Fix biber execution om MikTeX.
[lyx.git] / src / Converter.cpp
index 8adcfc32589a3e986aa1ac661dd6a3be215f0c30..a589b60b1f2add5a0e8fa334828edab56ce457a0 100644 (file)
@@ -131,21 +131,6 @@ void Converter::readFlags()
 }
 
 
-bool operator<(Converter const & a, Converter const & b)
-{
-       // use the compare_ascii_no_case instead of compare_no_case,
-       // because in turkish, 'i' is not the lowercase version of 'I',
-       // and thus turkish locale breaks parsing of tags.
-       int const i = compare_ascii_no_case(a.From->prettyname(),
-                                           b.From->prettyname());
-       if (i == 0)
-               return compare_ascii_no_case(a.To->prettyname(),
-                                            b.To->prettyname()) < 0;
-       else
-               return i < 0;
-}
-
-
 Converter const * Converters::getConverter(string const & from,
                                            string const & to) const
 {
@@ -250,12 +235,6 @@ void Converters::updateLast(Formats const & formats)
 }
 
 
-void Converters::sort()
-{
-       std::sort(converterlist_.begin(), converterlist_.end());
-}
-
-
 OutputParams::FLAVOR Converters::getFlavor(Graph::EdgePath const & path)
 {
        for (Graph::EdgePath::const_iterator cit = path.begin();
@@ -266,6 +245,8 @@ OutputParams::FLAVOR Converters::getFlavor(Graph::EdgePath const & path)
                                return OutputParams::XETEX;
                        if (conv.latex_flavor == "lualatex")
                                return OutputParams::LUATEX;
+                       if (conv.latex_flavor == "dvilualatex")
+                               return OutputParams::DVILUATEX;
                        if (conv.latex_flavor == "pdflatex")
                                return OutputParams::PDFLATEX;
                if (conv.xml)
@@ -307,7 +288,8 @@ bool Converters::convert(Buffer const * buffer,
                        LYXERR(Debug::FILES, "No converter defined! "
                                   "I use convertDefault.py:\n\t" << command);
                        Systemcall one;
-                       one.startscript(Systemcall::Wait, command, buffer->filePath());
+                       one.startscript(Systemcall::Wait, command, buffer ?
+                                       buffer->filePath() : string());
                        if (to_file.isReadableFile()) {
                                if (conversionflags & try_cache)
                                        ConverterCache::get().add(orig_from,
@@ -337,7 +319,7 @@ bool Converters::convert(Buffer const * buffer,
        runparams.flavor = getFlavor(edgepath);
 
        if (buffer) {
-               runparams.use_japanese = buffer->bufferFormat() == "platex";
+               runparams.use_japanese = buffer->params().bufferFormat() == "platex";
                runparams.use_indices = buffer->params().use_indices;
                runparams.bibtex_command = (buffer->params().bibtex_command == "default") ?
                        string() : buffer->params().bibtex_command;
@@ -444,13 +426,14 @@ bool Converters::convert(Buffer const * buffer,
                        if (dummy) {
                                res = one.startscript(Systemcall::DontWait,
                                        to_filesystem8bit(from_utf8(command)),
-                                       buffer->filePath());
+                                       buffer ? buffer->filePath() : string());
                                // We're not waiting for the result, so we can't do anything
                                // else here.
                        } else {
                                res = one.startscript(Systemcall::Wait,
                                                to_filesystem8bit(from_utf8(command)),
-                                               buffer->filePath());
+                                               buffer ? buffer->filePath()
+                                                      : string());
                                if (!real_outfile.empty()) {
                                        Mover const & mover = getMover(conv.to);
                                        if (!mover.rename(outfile, real_outfile))
@@ -774,6 +757,7 @@ vector<string> Converters::savers() const
        v.push_back("latex");
        v.push_back("literate");
        v.push_back("luatex");
+       v.push_back("dviluatex");
        v.push_back("lyx");
        v.push_back("xhtml");
        v.push_back("pdflatex");