]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathChar.cpp
Make undo action no-ops when the buffer is read-only
[lyx.git] / src / mathed / InsetMathChar.cpp
index cadadd24c17e4fc62dde43f98df66437210dd596..57bd8162a5162f4f7bbf157e24ab887a578ef790 100644 (file)
@@ -36,8 +36,6 @@ using namespace std;
 
 namespace lyx {
 
-extern bool has_math_fonts;
-
 
 namespace {
 latexkeys const * makeSubstitute(char_type c)
@@ -195,7 +193,7 @@ void InsetMathChar::drawT(TextPainter & pain, int x, int y) const
 }
 
 
-void InsetMathChar::write(WriteStream & os) const
+void InsetMathChar::write(TeXMathStream & os) const
 {
        os.os().put(char_);
 }
@@ -254,9 +252,9 @@ void InsetMathChar::mathmlize(MathMLStream & ms) const
        }
 
        if (!entity.empty()) {
-               ms << "<" << from_ascii(ms.namespacedTag("mo")) << ">"
+               ms << MTagInline("mo")
                   << from_ascii(entity)
-                  << "</" << from_ascii(ms.namespacedTag("mo")) << ">";
+                  << ETagInline("mo");
                return;
        }
 
@@ -265,7 +263,9 @@ void InsetMathChar::mathmlize(MathMLStream & ms) const
                        ? "mi" : "mo";
        // we don't use MTag and ETag because we do not want the spacing before the end tag.
        docstring tag = from_ascii(ms.namespacedTag(type));
-       ms << "<" << tag << ">" << char_type(char_) << "</" << tag << ">";
+       ms << MTagInline(type)
+          << char_type(char_)
+          << ETagInline(type);
 }