]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathParser.cpp
Make undo action no-ops when the buffer is read-only
[lyx.git] / src / mathed / MathParser.cpp
index dd43dd9eacee1b111b1ed6adad86c4bc1f188c59..0ba33751865b37ca10a9bbe0b78e7cad80df19d7 100644 (file)
@@ -370,9 +370,9 @@ ostream & operator<<(ostream & os, Token const & t)
                os << '\\' << to_utf8(cs);
        }
        else if (t.cat() == catLetter)
-               os << t.character();
+               os << static_cast<uint32_t>(t.character());
        else
-               os << '[' << t.character() << ',' << t.cat() << ']';
+               os << '[' << static_cast<uint32_t>(t.character()) << ',' << t.cat() << ']';
        return os;
 }
 
@@ -1369,7 +1369,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                        // otherwise parse it as an user macro
                        MathData count;
                        parse(count, FLAG_ITEM, mode);
-                       int cols;
+                       int cols = 0;
                        // limit arbitrarily to 100 columns
                        if (extractNumber(count, cols) && cols > 0 && cols < 100) {
                                // resize the table if necessary
@@ -1546,7 +1546,8 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
 
                else if (t.cs() == "ref" || t.cs() == "eqref" || t.cs() == "prettyref"
                          || t.cs() == "nameref" || t.cs() == "pageref"
-                         || t.cs() == "vpageref" || t.cs() == "vref") {
+                         || t.cs() == "vpageref" || t.cs() == "vref" 
+                         || t.cs() == "formatted" || t.cs() == "labelonly") {
                        cell->push_back(MathAtom(new InsetMathRef(buf, t.cs())));
                        docstring const opt = parse_verbatim_option();
                        docstring const ref = parse_verbatim_item();