]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathComment.cpp
We only support gcc >= 4.9.
[lyx.git] / src / mathed / InsetMathComment.cpp
index ebfba7a859918e35fc00b064334ebcd47c80a6ac..273253ec0e7fa3c7228a3eaafb6e27963438b25a 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,14 +50,12 @@ Inset * InsetMathComment::clone() const
 void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
-       metricsMarkers(dim);
 }
 
 
 void InsetMathComment::draw(PainterInfo & pi, int x, int y) const
 {
-       cell(0).draw(pi, x + 1, y);
-       drawMarkers(pi, x, y);
+       cell(0).draw(pi, x, y);
 }
 
 
@@ -66,7 +71,7 @@ void InsetMathComment::drawT(TextPainter & pain, int x, int y) const
 }
 
 
-void InsetMathComment::write(WriteStream & os) const
+void InsetMathComment::write(TeXMathStream & os) const
 {
        os << '%' << cell(0) << "\n";
 }
@@ -78,17 +83,15 @@ void InsetMathComment::maple(MapleStream & os) const
 }
 
 
-void InsetMathComment::mathematica(MathematicaStream &) const
-{}
-
-
-void InsetMathComment::octave(OctaveStream &) const
-{}
+void InsetMathComment::mathmlize(MathMLStream & ms) const
+{
+       ms << MTag("comment") << cell(0) << ETag("comment");
+}
 
 
-void InsetMathComment::mathmlize(MathStream & os) const
+void InsetMathComment::htmlize(HtmlStream & os) const
 {
-       os << MTag("comment") << cell(0) << cell(1) << ETag("comment");
+       os << "<!-- " << cell(0) << " -->";
 }