]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
de.po: update
[lyx.git] / src / BufferParams.cpp
index 060d9e411c1ae79a9d1972a3f2d75eeb6aa4a825..8cb0c2cae6f647bf28812e2a3057c28425c73816 100644 (file)
@@ -2286,7 +2286,8 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
        // (the rest is obsoleted by the new TU encoding).
        // It needs to be loaded at least after amsmath, amssymb,
        // esint and the other packages that provide special glyphs
-       if (features.mustProvide("tipa") && useNonTeXFonts) {
+       if (features.mustProvide("tipa") && useNonTeXFonts
+           && !features.isProvided("xunicode")) {
                // The package officially only supports XeTeX, but also works
                // with LuaTeX. Thus we work around its XeTeX test.
                if (features.runparams().flavor != OutputParams::XETEX) {
@@ -2673,9 +2674,8 @@ OutputParams::FLAVOR BufferParams::getOutputFlavor(string const & format) const
                if (find(backs.begin(), backs.end(), dformat) == backs.end()) {
                        // Get shortest path to format
                        Graph::EdgePath path;
-                       for (vector<string>::const_iterator it = backs.begin();
-                           it != backs.end(); ++it) {
-                               Graph::EdgePath p = theConverters().getPath(*it, dformat);
+                       for (auto const & bvar : backs) {
+                               Graph::EdgePath p = theConverters().getPath(bvar, dformat);
                                if (!p.empty() && (path.empty() || p.size() < path.size())) {
                                        path = p;
                                }
@@ -3190,21 +3190,21 @@ void BufferParams::writeEncodingPreamble(otexstream & os,
                        language->encoding()->package();
 
                // Create list of inputenc options:
-               set<string> encodings;
+               set<string> encoding_set;
                // luainputenc fails with more than one encoding
                if (!features.runparams().isFullUnicode()) // if we reach this point, this means LuaTeX with TeX fonts
                        // list all input encodings used in the document
-                       encodings = features.getEncodingSet(doc_encoding);
+                       encoding_set = features.getEncodingSet(doc_encoding);
 
                // If the "japanese" package (i.e. pLaTeX) is used,
                // inputenc must be omitted.
                // see http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129680.html
-               if ((!encodings.empty() || package == Encoding::inputenc)
+               if ((!encoding_set.empty() || package == Encoding::inputenc)
                    && !features.isRequired("japanese")
                    && !features.isProvided("inputenc")) {
                        os << "\\usepackage[";
-                       set<string>::const_iterator it = encodings.begin();
-                       set<string>::const_iterator const end = encodings.end();
+                       set<string>::const_iterator it = encoding_set.begin();
+                       set<string>::const_iterator const end = encoding_set.end();
                        if (it != end) {
                                os << from_ascii(*it);
                                ++it;
@@ -3212,7 +3212,7 @@ void BufferParams::writeEncodingPreamble(otexstream & os,
                        for (; it != end; ++it)
                                os << ',' << from_ascii(*it);
                        if (package == Encoding::inputenc) {
-                               if (!encodings.empty())
+                               if (!encoding_set.empty())
                                        os << ',';
                                os << from_ascii(doc_encoding);
                        }