]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_unknowninset.C
fix #1073
[lyx.git] / src / mathed / math_unknowninset.C
index b7256c3d58e551822416ff2b12d8361aec1f0d1c..c350985a73140c003b960006763ed32b95160dc1 100644 (file)
@@ -1,8 +1,5 @@
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "math_unknowninset.h"
 #include "math_support.h"
@@ -21,44 +18,38 @@ MathInset * MathUnknownInset::clone() const
 }
 
 
-string const & MathUnknownInset::name() const
+string MathUnknownInset::name() const
 {
        return name_;
 }
 
 
-string & MathUnknownInset::name()
+void MathUnknownInset::setName(string const & name)
 {
-       return name_;
+       name_ = name;
 }
 
 
-bool MathUnknownInset::match(MathInset * p) const
+bool MathUnknownInset::match(MathAtom const & at) const
 {
-       MathUnknownInset const * q = p->asUnknownInset();
+       MathUnknownInset const * q = at->asUnknownInset();
        return q && name_ == q->name_;
 }
 
 
-void MathUnknownInset::write(WriteStream & os) const
-{
-       os << "\\" << name_ << ' ';
-}
-
-
 void MathUnknownInset::normalize(NormalStream & os) const
 {
        os << "[unknown " << name_ << ']';
 }
 
 
-void MathUnknownInset::metrics(MathMetricsInfo & mi) const
+void MathUnknownInset::metrics(MetricsInfo & mi) const
 {
-       mathed_string_dim(mi.base.font, name_, ascent_, descent_, width_);
+       mathed_string_dim(mi.base.font, name_, dim_);
 }
 
 
-void MathUnknownInset::draw(MathPainterInfo & pi, int x, int y) const
+void MathUnknownInset::draw(PainterInfo & pi, int x, int y) const
 {
        if (black_)
                drawStrBlack(pi, x, y, name_);
@@ -79,7 +70,12 @@ bool MathUnknownInset::final() const
 }
 
 
-void MathUnknownInset::maplize(MapleStream & os) const
+void MathUnknownInset::maple(MapleStream & os) const
+{
+       os << name_;
+}
+
+void MathUnknownInset::mathematica(MathematicaStream & os) const
 {
        os << name_;
 }
@@ -91,7 +87,7 @@ void MathUnknownInset::mathmlize(MathMLStream & os) const
 }
 
 
-void MathUnknownInset::octavize(OctaveStream & os) const
+void MathUnknownInset::octave(OctaveStream & os) const
 {
        os << name_;
 }