]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathExFunc.cpp
fix a crash when the inset containing the new word at cursor is deleted
[lyx.git] / src / mathed / InsetMathExFunc.cpp
index 990040ef7c91001ba3ec030790ff3731f3f8b26b..25c8dcbaf9b964300c2844f5243699806f9e1aac 100644 (file)
@@ -24,13 +24,13 @@ using namespace std;
 namespace lyx {
 
 
-InsetMathExFunc::InsetMathExFunc(docstring const & name)
-       : InsetMathNest(1), name_(name)
+InsetMathExFunc::InsetMathExFunc(Buffer * buf, docstring const & name)
+       : InsetMathNest(buf, 1), name_(name)
 {}
 
 
-InsetMathExFunc::InsetMathExFunc(docstring const & name, MathData const & ar)
-       : InsetMathNest(1), name_(name)
+InsetMathExFunc::InsetMathExFunc(Buffer * buf, docstring const & name, MathData const & ar)
+       : InsetMathNest(buf, 1), name_(name)
 {
        cell(0) = ar;
 }
@@ -124,9 +124,8 @@ void InsetMathExFunc::mathematica(MathematicaStream & os) const
 
 void InsetMathExFunc::mathmlize(MathStream & os) const
 {
-       ++os.tab(); os.cr(); os.os() << '<' << name_ << '>';
+       os << "<mi>" << name_ << "</mi><mo>&af;</mo>";
        os << cell(0);
-       os.cr(); --os.tab(); os.os() << "</" << name_ << '>';
 }