]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_matrixinset.C
Fix.
[lyx.git] / src / mathed / math_matrixinset.C
index 25cece5aa9736617620749752cc35cdb99d146a6..37db699ed6aef57bdc8c23ebd4a8defab5be2f13 100644 (file)
@@ -1,6 +1,3 @@
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "math_matrixinset.h"
 #include "math_parser.h"
@@ -8,8 +5,8 @@
 #include "Lsstream.h"
 
 
-MathMatrixInset::MathMatrixInset(MathArrayInset const & p)
-       : MathArrayInset(p)
+MathMatrixInset::MathMatrixInset(MathGridInset const & p)
+       : MathGridInset(p)
 {}
 
 
@@ -21,17 +18,17 @@ MathInset * MathMatrixInset::clone() const
 
 void MathMatrixInset::write(WriteStream & os) const
 {
-       MathArrayInset::write(os);
+       MathGridInset::write(os);
 }
 
 
 void MathMatrixInset::normalize(NormalStream & os) const
 {
-       MathArrayInset::normalize(os);
+       MathGridInset::normalize(os);
 }
 
 
-void MathMatrixInset::maplize(MapleStream & os) const
+void MathMatrixInset::maple(MapleStream & os) const
 {
        os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
        for (idx_type idx = 0; idx < nargs(); ++idx) {
@@ -43,13 +40,31 @@ void MathMatrixInset::maplize(MapleStream & os) const
 }
 
 
+void MathMatrixInset::maxima(MaximaStream & os) const
+{
+       os << "matrix(";
+       for (row_type row = 0; row < nrows(); ++row) {
+               if (row)
+                       os << ',';
+               os << '[';
+               for (col_type col = 0; col < ncols(); ++col) {
+                       if (col)
+                               os << ',';
+                       os << cell(index(row, col));
+               }
+               os << ']';
+       }
+       os << ')';
+}
+
+
 void MathMatrixInset::mathmlize(MathMLStream & os) const
 {
        MathGridInset::mathmlize(os);
 }
 
 
-void MathMatrixInset::octavize(OctaveStream & os) const
+void MathMatrixInset::octave(OctaveStream & os) const
 {
        os << '[';
        for (row_type row = 0; row < nrows(); ++row) {