]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathComment.cpp
Remove hardcoded values
[lyx.git] / src / mathed / InsetMathComment.cpp
index 92693a2c7e12e4288c01d226f70d4c657d6abaef..b8c157b2c2cff3e46d70f3b30399419af781eca4 100644 (file)
@@ -26,6 +26,13 @@ InsetMathComment::InsetMathComment(Buffer * buf)
 {}
 
 
+InsetMathComment::InsetMathComment(MathData const & ar)
+       : InsetMathNest(const_cast<Buffer *>(ar.buffer()), 1)
+{
+       cell(0) = ar;
+}
+
+
 InsetMathComment::InsetMathComment(Buffer * buf, docstring const & str)
        : InsetMathNest(buf, 1)
 {
@@ -43,7 +50,7 @@ Inset * InsetMathComment::clone() const
 void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
-       metricsMarkers(dim);
+       metricsMarkers(mi, dim);
 }
 
 
@@ -78,18 +85,15 @@ void InsetMathComment::maple(MapleStream & os) const
 }
 
 
-void InsetMathComment::mathematica(MathematicaStream &) const
-{}
-
-
-void InsetMathComment::octave(OctaveStream &) const
-{}
+void InsetMathComment::mathmlize(MathStream & os) const
+{
+       os << MTag("comment") << cell(0) << ETag("comment");
+}
 
 
-docstring InsetMathComment::mathmlize(MathStream & os) const
+void InsetMathComment::htmlize(HtmlStream & os) const
 {
-       os << MTag("comment") << cell(0) << cell(1) << ETag("comment");
-       return docstring();
+       os << "<!-- " << cell(0) << " -->";
 }