]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_lefteqninset.C
forward search in math insets. ugly. seems to work. don't ask why.
[lyx.git] / src / mathed / math_lefteqninset.C
index 162c2ab88d931e732100a48532aa5ce8e6913f9c..99eb3159a25adb051cb547c46e49c1c690ee7fac 100644 (file)
@@ -3,10 +3,10 @@
 #endif
 
 #include "math_lefteqninset.h"
-#include "support/LOstream.h"
 #include "LColor.h"
 #include "Painter.h"
 #include "math_cursor.h"
+#include "math_mathmlstream.h"
 
 
 MathLefteqnInset::MathLefteqnInset()
@@ -20,6 +20,15 @@ MathInset * MathLefteqnInset::clone() const
 }
 
 
+void MathLefteqnInset::metrics(MathMetricsInfo const & mi) const
+{
+       MathNestInset::metrics(mi);
+       ascent_  = xcell(0).ascent() + 2;
+       descent_ = xcell(0).descent() + 2;
+       width_   = 4;
+}
+
+
 void MathLefteqnInset::draw(Painter & pain, int x, int y) const
 {
        xcell(0).draw(pain, x + 2, y);
@@ -30,27 +39,13 @@ void MathLefteqnInset::draw(Painter & pain, int x, int y) const
 }
 
 
-void MathLefteqnInset::write(std::ostream & os, bool fragile) const
+void MathLefteqnInset::write(WriteStream & os) const
 {
-       os << "\\lefteqn{";
-       cell(0).write(os, fragile);
-       os << "}";
+       os << "\\lefteqn{" << cell(0) << '}';
 }
 
 
-void MathLefteqnInset::writeNormal(std::ostream & os) const
+void MathLefteqnInset::normalize(NormalStream & os) const
 {
-       os << "[lefteqn ";
-       cell(0).write(os, false);
-       os << "] ";
-}
-
-
-void MathLefteqnInset::metrics(MathStyles st) const
-{
-       MathNestInset::metrics(st);
-       size_    = st;
-       ascent_  = xcell(0).ascent() + 2;
-       descent_ = xcell(0).descent() + 2;
-       width_   = 4;
+       os << "[lefteqn " << cell(0) << ']';
 }