]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSubstack.cpp
Revert "Fix a number of signedness warnings"
[lyx.git] / src / mathed / InsetMathSubstack.cpp
index f88f4927e37c177856a489d0d174bb9b1d6a5df3..f9dfb01821e5bb6603a42c050cf05c75f61a1b56 100644 (file)
 
 #include "InsetMathSubstack.h"
 
-#include "LaTeXFeatures.h"
 #include "MathData.h"
 #include "MathStream.h"
 
 #include "FuncRequest.h"
 #include "FuncStatus.h"
-#include "support/gettext.h"
+#include "LaTeXFeatures.h"
+#include "MetricsInfo.h"
 
+#include "support/gettext.h"
 #include "support/lstrings.h"
 
 #include <ostream>
@@ -44,17 +45,16 @@ Inset * InsetMathSubstack::clone() const
 
 void InsetMathSubstack::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       if (mi.base.style == LM_ST_DISPLAY) {
-               StyleChanger dummy(mi.base, LM_ST_TEXT);
-               InsetMathGrid::metrics(mi, dim);
-       } else {
-               InsetMathGrid::metrics(mi, dim);
-       }
+       Changer dummy2 = mi.base.changeEnsureMath();
+       Changer dummy = mi.base.changeArray();
+       InsetMathGrid::metrics(mi, dim);
 }
 
 
 void InsetMathSubstack::draw(PainterInfo & pi, int x, int y) const
 {
+       Changer dummy2 = pi.base.changeEnsureMath();
+       Changer dummy = pi.base.changeArray();
        InsetMathGrid::draw(pi, x + 1, y);
 }
 
@@ -125,19 +125,19 @@ void InsetMathSubstack::maple(MapleStream & os) const
 }
 
 
-void InsetMathSubstack::mathmlize(MathStream & os) const
+void InsetMathSubstack::mathmlize(MathStream & ms) const
 {
        int movers = 0;
        row_type const numrows = nrows();
        for (row_type row = 0; row < nrows(); ++row) {
                if (row < numrows - 1) {
                        movers ++;
-                       os << MTag("munder");
+                       ms << MTag("munder");
                }
-               os << MTag("mrow") << cell(index(row, 0)) << ETag("mrow");
+               ms << MTag("mrow") << cell(index(row, 0)) << ETag("mrow");
        }
        for (int i = 1; i <= movers; ++i)
-               os << ETag("munder");
+               ms << ETag("munder");
 }