]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathOverset.cpp
Assure correct spacing of colored items in mathed
[lyx.git] / src / mathed / InsetMathOverset.cpp
index 9d835f0d9e3d60c8f0e190e08f1515dd0904abf8..2db26cf4c00983248fcaef9fdfdbf3b03b3bcc0b 100644 (file)
@@ -70,6 +70,24 @@ bool InsetMathOverset::idxUpDown(Cursor & cur, bool up) const
 }
 
 
+bool InsetMathOverset::idxFirst(Cursor & cur) const
+{
+       LASSERT(&cur.inset() == this, return false);
+       cur.idx() = 0;
+       cur.pos() = 0;
+       return true;
+}
+
+
+bool InsetMathOverset::idxLast(Cursor & cur) const
+{
+       LASSERT(&cur.inset() == this, return false);
+       cur.idx() = 0;
+       cur.pos() = cur.lastpos();
+       return true;
+}
+
+
 void InsetMathOverset::write(WriteStream & os) const
 {
        MathEnsurer ensurer(os);
@@ -87,16 +105,18 @@ void InsetMathOverset::normalize(NormalStream & os) const
 
 void InsetMathOverset::mathmlize(MathStream & ms) const
 {
-       ms << "<mover accent='false'>" << cell(0) << cell(1) << "</mover>";
+       ms << "<" << from_ascii(ms.namespacedTag("mover")) << " accent='false'>"
+          << cell(0) << cell(1)
+          << "</" << from_ascii(ms.namespacedTag("mover")) << ">";
 }
 
 
 void InsetMathOverset::htmlize(HtmlStream & os) const
 {
        os << MTag("span", "class='overset'")
-                << MTag("span", "class='top'") << cell(1) << ETag("span")
-                << MTag("span") << cell(0) << ETag("span")
-                << ETag("span");
+          << MTag("span", "class='top'") << cell(1) << ETag("span")
+          << MTag("span") << cell(0) << ETag("span")
+          << ETag("span");
 }