]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathEnsureMath.cpp
Fix broken Apple speller interface
[features.git] / src / mathed / InsetMathEnsureMath.cpp
index d73a1cb35991e49e8c553d95ccaba20f1f1ad27e..7f82345efd8627299f8a6ccf2e36a74ac0437b97 100644 (file)
@@ -26,7 +26,7 @@
 namespace lyx {
 
 InsetMathEnsureMath::InsetMathEnsureMath(Buffer * buf)
-       : InsetMathNest(buf, 1)
+       : InsetMathGrid(buf, 1, 1)
 {}
 
 
@@ -38,21 +38,15 @@ Inset * InsetMathEnsureMath::clone() const
 
 void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       bool really_change_font = isTextFont(mi.base.fontname);
-       Changer dummy = really_change_font ? mi.base.changeFontSet("mathnormal")
-               : Changer();
+       Changer dummy = mi.base.changeEnsureMath();
        cell(0).metrics(mi, dim);
-       metricsMarkers(mi, dim);
 }
 
 
 void InsetMathEnsureMath::draw(PainterInfo & pi, int x, int y) const
 {
-       bool really_change_font = isTextFont(pi.base.fontname);
-       Changer dummy = really_change_font ? pi.base.changeFontSet("mathnormal")
-               : Changer();
+       Changer dummy = pi.base.changeEnsureMath();
        cell(0).draw(pi, x, y);
-       drawMarkers(pi, x, y);
 }
 
 
@@ -68,17 +62,17 @@ void InsetMathEnsureMath::drawT(TextPainter & pain, int x, int y) const
 }
 
 
-void InsetMathEnsureMath::write(WriteStream & os) const
+void InsetMathEnsureMath::write(TeXMathStream & os) const
 {
        ModeSpecifier specifier(os, MATH_MODE);
        os << "\\ensuremath{" << cell(0) << "}";
 }
 
 
-void InsetMathEnsureMath::mathmlize(MathStream & os) const
+void InsetMathEnsureMath::mathmlize(MathMLStream & ms) const
 {
-       SetMode mathmode(os, false);
-       os << MTag("mstyle", "class='math'")
+       SetMode mathmode(ms, false);
+       ms << MTag("mstyle", "class='math'")
           << cell(0)
           << ETag("mstyle");
 }