X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathComment.cpp;h=ea502d1aa2ef1fd7a7ab504c3799f5dc49cc489e;hb=0cba074ecf0e25ede759ee1f817a7cfec06537d6;hp=ee04b0abd67bea2301878bf2336319dd5ae8f890;hpb=b90ec7288d64bf337c5aeeecb8083e590851840e;p=lyx.git diff --git a/src/mathed/InsetMathComment.cpp b/src/mathed/InsetMathComment.cpp index ee04b0abd6..ea502d1aa2 100644 --- a/src/mathed/InsetMathComment.cpp +++ b/src/mathed/InsetMathComment.cpp @@ -3,7 +3,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author André Pönitz + * \author André Pönitz * * Full author contact details are available in file CREDITS. */ @@ -16,16 +16,25 @@ #include "MathStream.h" #include "MathSupport.h" +#include + namespace lyx { -InsetMathComment::InsetMathComment() - : InsetMathNest(1) +InsetMathComment::InsetMathComment(Buffer * buf) + : InsetMathNest(buf, 1) {} -InsetMathComment::InsetMathComment(docstring const & str) - : InsetMathNest(1) +InsetMathComment::InsetMathComment(MathData const & ar) + : InsetMathNest(const_cast(ar.buffer()), 1) +{ + cell(0) = ar; +} + + +InsetMathComment::InsetMathComment(Buffer * buf, docstring const & str) + : InsetMathNest(buf, 1) { // FIXME UNICODE asArray(str, cell(0)); @@ -41,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); } @@ -76,17 +83,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"); +} -void InsetMathComment::mathmlize(MathStream & os) const +void InsetMathComment::htmlize(HtmlStream & os) const { - os << MTag("comment") << cell(0) << cell(1) << ETag("comment"); + os << ""; }