]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_unknowninset.C
whichFont down to 5.3%
[lyx.git] / src / mathed / math_unknowninset.C
index 20e83eb96f55981c178cac46cb5187085fceee91..2739e45f19a265ac6bee9f8e4f4b260cb8ddc0a1 100644 (file)
@@ -1,3 +1,5 @@
+#include <config.h>
+
 #ifdef __GNUG__
 #pragma implementation
 #endif
@@ -7,7 +9,7 @@
 #include "Painter.h"
 #include "math_support.h"
 #include "math_mathmlstream.h"
-
+#include "math_streamstr.h"
 
 
 extern LyXFont WhichFont(short type, int size);
@@ -36,15 +38,22 @@ void MathUnknownInset::setName(string const & n)
 }
 
 
+bool MathUnknownInset::match(MathInset * p) const
+{
+       MathUnknownInset const * q = p->asUnknownInset();
+       return q && name_ == q->name_;
+}
+
+
 void MathUnknownInset::write(WriteStream & os) const
 {
-       os << "\\" << name_.c_str() << ' ';
+       os << "\\" << name_ << ' ';
 }
 
 
 void MathUnknownInset::normalize(NormalStream & os) const
 {
-       os << "[func " << name_.c_str() << ']';
+       os << "[unknown " << name_ << ']';
 }
 
 
@@ -63,17 +72,17 @@ void MathUnknownInset::draw(Painter & pain, int x, int y) const
 
 void MathUnknownInset::maplize(MapleStream & os) const
 {
-       os << name_.c_str();
+       os << name_;
 }
 
 
 void MathUnknownInset::mathmlize(MathMLStream & os) const
 {
-       os << MTag("mi") << name_.c_str() << ETag("mi");
+       os << MTag("mi") << name_ << ETag("mi");
 }
 
 
 void MathUnknownInset::octavize(OctaveStream & os) const
 {
-       os << name_.c_str();
+       os << name_;
 }