]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_unknowninset.C
oh well
[lyx.git] / src / mathed / math_unknowninset.C
index 275b30ec329bd884d27fd11b0e0b2964d59aac6c..3c8b54319a384220452ab2cda5384150c5d64be2 100644 (file)
@@ -38,6 +38,13 @@ 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_ << ' ';
@@ -46,20 +53,20 @@ void MathUnknownInset::write(WriteStream & os) const
 
 void MathUnknownInset::normalize(NormalStream & os) const
 {
-       os << "[func " << name_ << ']';
+       os << "[unknown " << name_ << ']';
 }
 
 
-void MathUnknownInset::metrics(MathMetricsInfo const & mi) const 
+void MathUnknownInset::metrics(MathMetricsInfo const & mi) const
 {
-       mi_ = mi;
-       mathed_string_dim(LM_TC_TEX, mi_, name_, ascent_, descent_, width_);
+       whichFont(font_, LM_TC_TEX, mi);
+       mathed_string_dim(font_, name_, ascent_, descent_, width_);
 }
 
 
 void MathUnknownInset::draw(Painter & pain, int x, int y) const
-{ 
-       drawStr(pain, LM_TC_TEX, mi_, x, y, name_);
+{
+       drawStr(pain, font_, x, y, name_);
 }