]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_funcinset.C
whichFont down to 5.3%
[lyx.git] / src / mathed / math_funcinset.C
index af1bebebeb0ec155481056670818f13a5d63731f..b7dedc3cc3c41521e5b7944daf9053f8e978b499 100644 (file)
@@ -1,3 +1,5 @@
+#include <config.h>
+
 #ifdef __GNUG__
 #pragma implementation
 #endif
@@ -5,9 +7,9 @@
 #include "math_funcinset.h"
 #include "font.h"
 #include "Painter.h"
-#include "support.h"
+#include "math_support.h"
 #include "math_mathmlstream.h"
-
+#include "math_streamstr.h"
 
 
 extern LyXFont WhichFont(short type, int size);
@@ -36,18 +38,6 @@ void MathFuncInset::setName(string const & n)
 }
 
 
-void MathFuncInset::write(MathWriteInfo & os) const
-{
-       os << "\\" << name_.c_str() << ' ';
-}
-
-
-void MathFuncInset::writeNormal(NormalStream & os) const
-{
-       os << "[func " << name_.c_str() << ']';
-}
-
-
 void MathFuncInset::metrics(MathMetricsInfo const & mi) const 
 {
        mi_ = mi;
@@ -61,19 +51,38 @@ void MathFuncInset::draw(Painter & pain, int x, int y) const
 }
 
 
+bool MathFuncInset::match(MathInset * p) const
+{
+       MathFuncInset const * q = p->asFuncInset();
+       return q && name_ == q->name_;
+}
+
+
 void MathFuncInset::maplize(MapleStream & os) const
 {
-       os << name_.c_str();
+       os << ' ' << name_;
 }
 
 
 void MathFuncInset::mathmlize(MathMLStream & os) const
 {
-       os << MTag("mi") << name_.c_str() << ETag("mi");
+       os << MTag("mi") << name_ << ETag("mi");
 }
 
 
 void MathFuncInset::octavize(OctaveStream & os) const
 {
-       os << name_.c_str();
+       os << ' ' << name_;
+}
+
+
+void MathFuncInset::normalize(NormalStream & os) const
+{
+       os << "[func " << name_ << ']';
+}
+
+
+void MathFuncInset::write(WriteStream & os) const
+{
+       os << "\\" << name_ << ' ';
 }