]> git.lyx.org Git - lyx.git/blobdiff - src/Converter.cpp
Improve fractions bar
[lyx.git] / src / Converter.cpp
index 6acd05a22b1b8c902138575bb9d1af700c2db187..58e486e67d3dde4b2fe6aad4de2ba1ca2a5f9a96 100644 (file)
@@ -339,7 +339,9 @@ bool Converters::convert(Buffer const * buffer,
        runparams.flavor = getFlavor(edgepath, buffer);
 
        if (buffer) {
-               runparams.use_japanese = buffer->params().bufferFormat() == "platex";
+               runparams.use_japanese =
+                       buffer->params().bufferFormat() == "latex"
+                       && buffer->params().encoding().package() == Encoding::japanese;
                runparams.use_indices = buffer->params().use_indices;
                runparams.bibtex_command = (buffer->params().bibtex_command == "default") ?
                        string() : buffer->params().bibtex_command;
@@ -715,14 +717,13 @@ void Converters::buildGraph()
 }
 
 
-vector<Format const *> const
-Converters::intToFormat(vector<int> const & input)
+FormatList const Converters::intToFormat(vector<int> const & input)
 {
-       vector<Format const *> result(input.size());
+       FormatList result(input.size());
 
        vector<int>::const_iterator it = input.begin();
        vector<int>::const_iterator const end = input.end();
-       vector<Format const *>::iterator rit = result.begin();
+       FormatList::iterator rit = result.begin();
        for ( ; it != end; ++it, ++rit) {
                *rit = &formats.get(*it);
        }
@@ -730,8 +731,8 @@ Converters::intToFormat(vector<int> const & input)
 }
 
 
-vector<Format const *> const
-Converters::getReachableTo(string const & target, bool const clear_visited)
+FormatList const Converters::getReachableTo(string const & target, 
+               bool const clear_visited)
 {
        vector<int> const & reachablesto =
                G_.getReachableTo(formats.getNumber(target), clear_visited);
@@ -740,9 +741,9 @@ Converters::getReachableTo(string const & target, bool const clear_visited)
 }
 
 
-vector<Format const *> const
-Converters::getReachable(string const & from, bool const only_viewable,
-                        bool const clear_visited, set<string> const & excludes)
+FormatList const Converters::getReachable(string const & from, 
+               bool const only_viewable, bool const clear_visited, 
+               set<string> const & excludes)
 {
        set<int> excluded_numbers;
 
@@ -775,29 +776,28 @@ Graph::EdgePath Converters::getPath(string const & from, string const & to)
 }
 
 
-vector<Format const *> Converters::importableFormats()
+FormatList Converters::importableFormats()
 {
        vector<string> l = loaders();
-       vector<Format const *> result = getReachableTo(l[0], true);
+       FormatList result = getReachableTo(l[0], true);
        vector<string>::const_iterator it = l.begin() + 1;
        vector<string>::const_iterator en = l.end();
        for (; it != en; ++it) {
-               vector<Format const *> r = getReachableTo(*it, false);
+               FormatList r = getReachableTo(*it, false);
                result.insert(result.end(), r.begin(), r.end());
        }
        return result;
 }
 
 
-vector<Format const *> Converters::exportableFormats(bool only_viewable)
+FormatList Converters::exportableFormats(bool only_viewable)
 {
        vector<string> s = savers();
-       vector<Format const *> result = getReachable(s[0], only_viewable, true);
+       FormatList result = getReachable(s[0], only_viewable, true);
        vector<string>::const_iterator it = s.begin() + 1;
        vector<string>::const_iterator en = s.end();
        for (; it != en; ++it) {
-               vector<Format const *> r =
-                       getReachable(*it, only_viewable, false);
+                FormatList r = getReachable(*it, only_viewable, false);
                result.insert(result.end(), r.begin(), r.end());
        }
        return result;