]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_charinset.C
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / math_charinset.C
index 8f2674bba30fc1e90ddb6f247783962f919b2afe..290815d88bb7e80ea3ddd8863a96cc206b62231c 100644 (file)
@@ -133,7 +133,7 @@ void MathCharInset::write(WriteStream & os) const
 
 void MathCharInset::normalize(NormalStream & os) const
 {
-       os << "[char " << char_ << ' ' << "mathalpha]";
+       os << "[char " << char_ << mathalpha]";
 }
 
 
@@ -143,6 +143,17 @@ void MathCharInset::octave(OctaveStream & os) const
 }
 
 
+void MathCharInset::mathmlize(MathMLStream & ms) const
+{
+       switch (char_) {
+               case '<': ms << "&lt;"; break;
+               case '>': ms << "&gt;"; break;
+               case '&': ms << "&amp;"; break;
+               default: ms << char_; break;
+       }
+}
+
+
 bool MathCharInset::isRelOp() const
 {
        return char_ == '=' || char_ == '<' || char_ == '>';