]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_rootinset.C
strange enough: parts not commited during the last 'cvs commit' ..
[lyx.git] / src / mathed / math_rootinset.C
index d84ec004ace0b2c6febd3b3f25dd9f0222ba6bb7..ee4a2d67fa52796dc76c1bc3e1eaad8c8c5a9591 100644 (file)
@@ -16,7 +16,7 @@
 #endif
 
 #include "math_rootinset.h"
-#include "support/LOstream.h"
+#include "math_mathmlstream.h"
 #include "Painter.h"
 
 
@@ -58,23 +58,19 @@ void MathRootInset::draw(Painter & pain, int x, int y) const
 }
 
 
-void MathRootInset::write(MathWriteInfo & os) const
+void MathRootInset::write(WriteStream & os) const
 {
        os << "\\sqrt[" << cell(0) << "]{" << cell(1) << '}';
 }
 
 
-void MathRootInset::writeNormal(std::ostream & os) const
+void MathRootInset::normalize(NormalStream & os) const
 {
-       os << "[root ";
-       cell(1).writeNormal(os);  
-       os << " ";
-       cell(0).writeNormal(os);
-       os << "] ";
+       os << "[root " << cell(1) << ' ' << cell(1) << ']';
 }
 
 
-bool MathRootInset::idxUp(int & idx, int & pos) const
+bool MathRootInset::idxUp(idx_type & idx, pos_type & pos) const
 {
        if (idx == 0)
                return false;
@@ -84,7 +80,7 @@ bool MathRootInset::idxUp(int & idx, int & pos) const
 }
 
 
-bool MathRootInset::idxDown(int & idx, int & pos) const
+bool MathRootInset::idxDown(idx_type & idx, pos_type & pos) const
 {
        if (idx == 1)
                return false;
@@ -92,3 +88,15 @@ bool MathRootInset::idxDown(int & idx, int & pos) const
        pos = 0;
        return true;
 }
+
+
+void MathRootInset::octavize(OctaveStream & os) const
+{
+       os << "root(" << cell(1) << ',' << cell(0) <<')';
+}
+
+
+void MathRootInset::mathmlize(MathMLStream & os) const
+{
+       os << MTag("mroot") << cell(1) << cell(0) << ETag("mroot");
+}