]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_substackinset.C
Jean-Marc's fix for wrong descent
[lyx.git] / src / mathed / math_substackinset.C
index 43395d993713c1561bf4880f1d3d371a98999ddf..801a45f62df864a6ad4785f9cf8d64894a69d6e1 100644 (file)
@@ -1,8 +1,5 @@
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "math_substackinset.h"
 #include "math_mathmlstream.h"
@@ -20,12 +17,14 @@ MathInset * MathSubstackInset::clone() const
 }
 
 
-void MathSubstackInset::metrics(MathMetricsInfo const & st) const
+void MathSubstackInset::metrics(MathMetricsInfo & mi) const
 {
-       MathMetricsInfo mi = st;
-       if (mi.style == LM_ST_DISPLAY)
-               mi.style = LM_ST_TEXT;
-       MathGridInset::metrics(mi);
+       if (mi.base.style == LM_ST_DISPLAY) {
+               MathStyleChanger dummy(mi.base, LM_ST_TEXT);
+               MathGridInset::metrics(mi);
+       } else {
+               MathGridInset::metrics(mi);
+       }
 }
 
 
@@ -41,13 +40,13 @@ void MathSubstackInset::normalize(NormalStream & os) const
 {
        os << "[substack ";
        MathGridInset::normalize(os);
-       os << "]";
+       os << ']';
 }
 
 
-void MathSubstackInset::maplize(MapleStream & os) const
+void MathSubstackInset::maple(MapleStream & os) const
 {
        os << "substack(";
-       MathGridInset::maplize(os);
-       os << ")";
+       MathGridInset::maple(os);
+       os << ')';
 }