]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDelim.cpp
Revert "Fix a number of signedness warnings"
[lyx.git] / src / mathed / InsetMathDelim.cpp
index 6a2be5e118e3cad48a26b8a5f995a9aa15c46d1b..2b279603241d85d465101ac1b5113cda99e6862f 100644 (file)
@@ -93,7 +93,7 @@ void InsetMathDelim::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        Changer dummy = mi.base.changeEnsureMath();
        Dimension dim0;
-       cell(0).metrics(mi, dim0);
+       cell(0).metrics(mi, dim0, false);
        Dimension t = theFontMetrics(mi.base.font).dimension('I');
        int h0 = (t.asc + t.des) / 2;
        int a0 = max(dim0.asc, t.asc)   - h0;
@@ -170,7 +170,7 @@ void InsetMathDelim::mathematica(MathematicaStream & os) const
 {
        if (isAbs()) {
                if (cell(0).size() == 1 && cell(0).front()->asMatrixInset())
-                       os << "Det" << cell(0) << ']';
+                       os << "Det[" << cell(0) << ']';
                else
                        os << "Abs[" << cell(0) << ']';
        }
@@ -179,27 +179,30 @@ void InsetMathDelim::mathematica(MathematicaStream & os) const
 }
 
 
-void InsetMathDelim::mathmlize(MathStream & os) const
+void InsetMathDelim::mathmlize(MathStream & ms) const
 {
-       os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true'>"
-          << "<mrow>"
-          << convertDelimToXMLEscape(left_)
-          << "</mrow>"
-          << "</mo>\n"
+       ms << "<" << from_ascii(ms.namespacedTag("mo")) << " form='prefix' fence='true' stretchy='true' symmetric='true'>"
+          << "<" << from_ascii(ms.namespacedTag("mrow")) << ">"
+          << convertDelimToXMLEscape(left_, ms.xmlMode())
+          << "</" << from_ascii(ms.namespacedTag("mrow")) << ">"
+          << "</" << from_ascii(ms.namespacedTag("mo")) << ">"
+          << "\n"
           << cell(0)
-          << "\n<mo form='postfix' fence='true' stretchy='true' symmetric='true'>"
-          << "<mrow>"
-          << convertDelimToXMLEscape(right_)
-          << "</mrow>"
-          << "</mo>\n";
+          << "\n"
+          << "<" << from_ascii(ms.namespacedTag("mo")) << " form='postfix' fence='true' stretchy='true' symmetric='true'>"
+          << "<" << from_ascii(ms.namespacedTag("mrow")) << ">"
+          << convertDelimToXMLEscape(right_, ms.xmlMode())
+          << "</" << from_ascii(ms.namespacedTag("mrow")) << ">"
+          << "</" << from_ascii(ms.namespacedTag("mo")) << ">"
+          << "\n";
 }
 
 
 void InsetMathDelim::htmlize(HtmlStream & os) const
 {
-       os << convertDelimToXMLEscape(left_)
+       os << convertDelimToXMLEscape(left_, false)
           << cell(0)
-          << convertDelimToXMLEscape(right_);
+          << convertDelimToXMLEscape(right_, false);
 }