]> git.lyx.org Git - lyx.git/blobdiff - src/Encoding.cpp
prepare Qt 5.6 builds
[lyx.git] / src / Encoding.cpp
index c4fb1d581ad851fd375b01a92c4116f209f637b0..73edc843ff361bfe977441284f67f10d498239e6 100644 (file)
@@ -166,11 +166,11 @@ void Encoding::init() const
                }
        }
        lyxerr.enable();
-       CharSet::iterator it = encodable_.find(start_encodable_);
-       while (it != encodable_.end()) {
+       CharSet::iterator it = encodable.find(start_encodable);
+       while (it != encodable.end()) {
                encodable.erase(it);
                ++start_encodable;
-               it = encodable_.find(start_encodable_);
+               it = encodable.find(start_encodable);
        }
        const_cast<Encoding *>(this)->complete_ = true;
 }
@@ -317,6 +317,8 @@ char_type Encodings::fromLaTeXCommand(docstring const & cmd, int cmdtype,
        CharInfoMap::const_iterator const end = unicodesymbols.end();
        CharInfoMap::const_iterator it = unicodesymbols.begin();
        for (combining = false; it != end; ++it) {
+               if (it->second.deprecated())
+                       continue;
                docstring const math = it->second.mathcommand();
                docstring const text = it->second.textcommand();
                if ((cmdtype & MATH_CMD) && math == cmd) {
@@ -402,6 +404,8 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, int cmdtype,
                size_t unicmd_size = 0;
                char_type c = 0;
                for (; it != uniend; ++it) {
+                       if (it->second.deprecated())
+                               continue;
                        docstring const math = mathmode ? it->second.mathcommand()
                                                        : docstring();
                        docstring const text = textmode ? it->second.textcommand()
@@ -722,6 +726,8 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
                                flags &= ~CharInfoMathNoTermination;
                        } else if (contains(flag, "tipashortcut=")) {
                                tipashortcut = split(flag, '=');
+                       } else if (flag == "deprecated") {
+                               flags |= CharInfoDeprecated;
                        } else {
                                lyxerr << "Ignoring unknown flag `" << flag
                                       << "' for symbol `0x"