X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathComment.cpp;h=b8c157b2c2cff3e46d70f3b30399419af781eca4;hb=2de30c62f8d671a8c8d4d52a6a7310e2c5ca84de;hp=b856ffc2401a2a8140c4c6ca95512c2d52ec41a5;hpb=688c186614a50a82b97733cb401e046ea8207352;p=lyx.git diff --git a/src/mathed/InsetMathComment.cpp b/src/mathed/InsetMathComment.cpp index b856ffc240..b8c157b2c2 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. */ @@ -21,13 +21,20 @@ 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)); @@ -43,9 +50,7 @@ Inset * InsetMathComment::clone() const void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const { cell(0).metrics(mi, dim); - metricsMarkers(dim); - // Cache the inset dimension. - setDimCache(mi, dim); + metricsMarkers(mi, dim); } @@ -80,17 +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"); +} -void InsetMathComment::mathmlize(MathStream & os) const +void InsetMathComment::htmlize(HtmlStream & os) const { - os << MTag("comment") << cell(0) << cell(1) << ETag("comment"); + os << ""; }