]> git.lyx.org Git - lyx.git/blobdiff - src/Converter.cpp
Remove black box around GuiWorkarea? which is visible with Qt4.5.
[lyx.git] / src / Converter.cpp
index 7c71cff525b188dd0ebe882c1975cd1513c1e7ef..9c905355c6dfcb322f5e98adc0c8430b0e8d0cc3 100644 (file)
@@ -326,10 +326,14 @@ bool Converters::convert(Buffer const * buffer,
        OutputParams runparams(buffer ? &buffer->params().encoding() : 0);
        runparams.flavor = getFlavor(edgepath);
        
-       runparams.use_indices = buffer->params().use_indices;
-
-       if (buffer)
+       if (buffer) {
                runparams.use_japanese = buffer->bufferFormat() == "platex";
+               runparams.use_indices = buffer->params().use_indices;
+               runparams.bibtex_command = (buffer->params().bibtex_command == "default") ?
+                       string() : buffer->params().bibtex_command;
+               runparams.index_command = (buffer->params().index_command == "default") ?
+                       string() : buffer->params().index_command;
+       }
 
        // Some converters (e.g. lilypond) can only output files to the
        // current directory, so we need to change the current directory.
@@ -707,6 +711,20 @@ vector<Format const *> Converters::importableFormats()
 }
 
 
+vector<Format const *> Converters::exportableFormats(bool only_viewable)
+{
+       vector<string> s = savers();
+       vector<Format const *> result = getReachable(s[0], only_viewable, true);
+       for (vector<string>::const_iterator it = s.begin() + 1;
+            it != s.end(); ++it) {
+               vector<Format const *> r =
+                       getReachable(*it, only_viewable, false);
+               result.insert(result.end(), r.begin(), r.end());
+       }
+       return result;
+}
+
+
 vector<string> Converters::loaders() const
 {
        vector<string> v;
@@ -717,4 +735,19 @@ vector<string> Converters::loaders() const
 }
 
 
+vector<string> Converters::savers() const
+{
+       vector<string> v;
+       v.push_back("docbook");
+       v.push_back("latex");
+       v.push_back("literate");
+       v.push_back("lyx");
+       v.push_back("pdflatex");
+       v.push_back("platex");
+       v.push_back("text");
+       v.push_back("xetex");
+       return v;
+}
+
+
 } // namespace lyx