]> git.lyx.org Git - lyx.git/blobdiff - src/converter.C
another fix
[lyx.git] / src / converter.C
index e2f662dce456f01fdc2d6fff2800d8b99cfd2cad..4b3bf5fe86701abdbc51142e966e4aadc34cac81 100644 (file)
 #include "support/path.h"
 #include "support/systemcall.h"
 
+#ifndef CXX_GLOBAL_CSTD
+using std::isdigit;
+#endif
+
 using std::vector;
 using std::queue;
 using std::endl;
@@ -260,10 +264,13 @@ void Converter::readFlags()
 
 bool operator<(Converter const & a, Converter const & b)
 {
-       int const i = compare_no_case(a.From->prettyname(),
-                                     b.From->prettyname());
+       // 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_no_case(a.To->prettyname(), b.To->prettyname())
+               return compare_ascii_no_case(a.To->prettyname(), b.To->prettyname())
                        < 0;
        else
                return i < 0;
@@ -576,10 +583,6 @@ bool Converters::convert(Buffer const * buffer,
 
        EdgePath edgepath = getPath(from_format, to_format);
        if (edgepath.empty()) {
-               Alert::alert(_("Cannot convert file"),
-                          _("No information for converting from ")
-                          + formats.prettyName(from_format) + _(" to ")
-                          + formats.prettyName(to_format));
                return false;
        }
 
@@ -630,6 +633,7 @@ bool Converters::convert(Buffer const * buffer,
                        command = subst(command, token_from, QuoteName(infile2));
                        command = subst(command, token_base, QuoteName(from_base));
                        command = subst(command, token_to, QuoteName(outfile2));
+                       command = LibScriptSearch(command);
 
                        if (!conv.parselog.empty())
                                command += " 2> " + QuoteName(infile2 + ".out");
@@ -796,7 +800,8 @@ bool Converters::scanLog(Buffer const * buffer, string const & command,
                if ((result & LaTeX::ERRORS)) {
                        // Insert all errors as errors boxes
                        bv->insertErrors(terr);
-                       bv->redraw();
+#warning repaint() or update() or nothing ?
+                       bv->repaint();
                        bv->fitCursor();
                }
                bv->owner()->allowInput();
@@ -847,13 +852,14 @@ bool Converters::runLaTeX(Buffer const * buffer, string const & command)
        LaTeX latex(command, name, buffer->filePath());
        TeXErrors terr;
        int result = latex.run(terr,
-                              bv ? bv->owner()->getLyXFunc() : 0);
+                              bv ? &bv->owner()->getLyXFunc() : 0);
 
        if (bv) {
                if ((result & LaTeX::ERRORS)) {
                        // Insert all errors as errors boxes
                        bv->insertErrors(terr);
-                       bv->redraw();
+#warning repaint() or update() or nothing ?
+                       bv->repaint();
                        bv->fitCursor();
                }
        }