]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_scriptinset.C
no special treatment for scriptinsets
[lyx.git] / src / mathed / math_scriptinset.C
index ce1b4bef4bf031700afbe6a7ad16f3781a15bc2a..10223d75b15adf06231067900fa59fe24472da80 100644 (file)
@@ -60,7 +60,7 @@ MathScriptInset * MathScriptInset::asScriptInset()
 bool MathScriptInset::idxFirst(idx_type & idx, pos_type & pos) const
 {
        idx = 2;
-       pos = nuc().size();
+       pos = 0;
        return true;
 }
 
@@ -202,7 +202,7 @@ void MathScriptInset::metrics(MathMetricsInfo & mi) const
        }
        dim_.a = dy1() + (hasUp() ? up().ascent() : 0);
        dim_.d = dy0() + (hasDown() ? down().descent() : 0);
-       metricsMarkers();
+       metricsMarkers2();
 }
 
 
@@ -217,7 +217,7 @@ void MathScriptInset::draw(MathPainterInfo & pi, int x, int y) const
                up().draw(pi, x + dx1(), y - dy1());
        if (hasDown())
                down().draw(pi, x + dx0(), y + dy0());
-       drawMarkers(pi, x, y);
+       drawMarkers2(pi, x, y);
 }
 
 
@@ -355,10 +355,10 @@ void MathScriptInset::write(WriteStream & os) const
                        os << "{}";
        }
 
-       if (hasDown() && down().data().size())
+       if (hasDown() && down().size())
                os << "_{" << down().data() << '}';
 
-       if (hasUp() && up().data().size())
+       if (hasUp() && up().size())
                os << "^{" << up().data() << '}';
 }
 
@@ -423,8 +423,8 @@ void MathScriptInset::mathematicize(MathematicaStream & os) const
 
 void MathScriptInset::mathmlize( MathMLStream & os) const
 {
-       bool d = hasDown() && down().data().size();
-       bool u = hasUp() && up().data().size();
+       bool d = hasDown() && down().size();
+       bool u = hasUp() && up().size();
 
        if (u && d)
                os << MTag("msubsup");
@@ -460,6 +460,7 @@ void MathScriptInset::octavize(OctaveStream & os) const
 
 void MathScriptInset::infoize(std::ostream & os) const
 {
+       os << "Scripts";
        if (limits_)
-               os << (limits_ == 1 ? "Displayed limits" : "Inlined limits");
+               os << (limits_ == 1 ? ", Displayed limits" : ", Inlined limits");
 }