]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathUnderset.cpp
We only support gcc >= 4.9.
[lyx.git] / src / mathed / InsetMathUnderset.cpp
index 794427e2c2d7f9d312220bd4e3836246a38907f5..970f82456b79d7d89a342ae55c3ca7799d9da7f0 100644 (file)
@@ -19,6 +19,7 @@
 #include "LaTeXFeatures.h"
 #include "MetricsInfo.h"
 
+#include "support/lassert.h"
 
 using namespace std;
 
@@ -58,7 +59,25 @@ void InsetMathUnderset::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetMathUnderset::write(WriteStream & os) const
+bool InsetMathUnderset::idxFirst(Cursor & cur) const
+{
+       LASSERT(&cur.inset() == this, return false);
+       cur.idx() = 0;
+       cur.pos() = 0;
+       return true;
+}
+
+
+bool InsetMathUnderset::idxLast(Cursor & cur) const
+{
+       LASSERT(&cur.inset() == this, return false);
+       cur.idx() = 0;
+       cur.pos() = cur.lastpos();
+       return true;
+}
+
+
+void InsetMathUnderset::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
        if (os.fragile())
@@ -73,9 +92,11 @@ void InsetMathUnderset::normalize(NormalStream & os) const
 }
 
 
-void InsetMathUnderset::mathmlize(MathStream & ms) const
+void InsetMathUnderset::mathmlize(MathMLStream & ms) const
 {
-       ms << "<munder accent='false'>" << cell(0) << cell(1) << "</munder>";
+       ms << "<" << from_ascii(ms.namespacedTag("munder")) << " accent='false'>"
+          << cell(0) << cell(1)
+          << "</" << from_ascii(ms.namespacedTag("munder")) << ">";
 }