]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathMatrix.cpp
Assure correct spacing of colored items in mathed
[lyx.git] / src / mathed / InsetMathMatrix.cpp
index 7f6700f62447a102480e2fd8a4cb87999b9c67b3..bd43581ce0d6718dcb340f3ff37d3648f275dd49 100644 (file)
@@ -92,30 +92,30 @@ void InsetMathMatrix::mathematica(MathematicaStream & os) const
 }
 
 
-void InsetMathMatrix::mathmlize(MathStream & os) const
+void InsetMathMatrix::mathmlize(MathStream & ms) const
 {
-       os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true' lspace='thinmathspace'>"
-          << convertDelimToXMLEscape(left_)
-          << "</mo>"
+       ms << "<" << from_ascii(ms.namespacedTag("mo")) << " form='prefix' fence='true' stretchy='true' symmetric='true' lspace='thinmathspace'>"
+          << convertDelimToXMLEscape(left_, ms.xmlMode())
+          << "</" << from_ascii(ms.namespacedTag("mo")) << ">"
           << MTag("mtable");
        for (row_type row = 0; row < nrows(); ++row) {
-               os << MTag("mtr");
+               ms << MTag("mtr");
                for (col_type col = 0; col < ncols(); ++col) {
                        idx_type const i = index(row, col);
-                       if (cellinfo_[i].multi_ != CELL_PART_OF_MULTICOLUMN) {
+                       if (cellinfo(i).multi != CELL_PART_OF_MULTICOLUMN) {
                                col_type const cellcols = ncellcols(i);
                                ostringstream attr;
                                if (cellcols > 1)
                                        attr << "columnspan='" << cellcols << '\'';
-                               os << MTag("mtd", attr.str()) << cell(i) << ETag("mtd");
+                               ms << MTag("mtd", attr.str()) << cell(i) << ETag("mtd");
                        }
                }
-               os << ETag("mtr");
+               ms << ETag("mtr");
        }
-       os << ETag("mtable");
-       os << "<mo form='postfix' fence='true' stretchy='true' symmetric='true' lspace='thinmathspace'>"
-          << convertDelimToXMLEscape(right_)
-          << "</mo>";
+       ms << ETag("mtable")
+          << "<" << from_ascii(ms.namespacedTag("mo")) << " form='postfix' fence='true' stretchy='true' symmetric='true' lspace='thinmathspace'>"
+          << convertDelimToXMLEscape(right_, ms.xmlMode())
+          << "</" << from_ascii(ms.namespacedTag("mo")) << ">";
 }
 
 
@@ -136,7 +136,7 @@ void InsetMathMatrix::htmlize(HtmlStream & os) const
                        os << MTag("td", lattrib) << ETag("td") << '\n';
                for (col_type col = 0; col < ncols(); ++col) {
                        idx_type const i = index(row, col);
-                       if (cellinfo_[i].multi_ != CELL_PART_OF_MULTICOLUMN) {
+                       if (cellinfo(i).multi != CELL_PART_OF_MULTICOLUMN) {
                                col_type const cellcols = ncellcols(i);
                                ostringstream attr;
                                if (cellcols > 1)