X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathBoldSymbol.cpp;h=d8205198843e821056080a0670a12f0097bf8038;hb=02e82157ec583c3900e359de86be79fac6512387;hp=b9a61b60f735231ce0c955f2c62d66cc8b253edd;hpb=3e55de70dde6aadbe7d2a6f497d73d6a64a5ff17;p=lyx.git diff --git a/src/mathed/InsetMathBoldSymbol.cpp b/src/mathed/InsetMathBoldSymbol.cpp index b9a61b60f7..d820519884 100644 --- a/src/mathed/InsetMathBoldSymbol.cpp +++ b/src/mathed/InsetMathBoldSymbol.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. */ @@ -14,6 +14,7 @@ #include "MathStream.h" #include "MathData.h" +#include "MetricsInfo.h" #include "LaTeXFeatures.h" #include @@ -21,8 +22,8 @@ namespace lyx { -InsetMathBoldSymbol::InsetMathBoldSymbol(Kind kind) - : InsetMathNest(1), kind_(kind) +InsetMathBoldSymbol::InsetMathBoldSymbol(Buffer * buf, Kind kind) + : InsetMathNest(buf, 1), kind_(kind) {} @@ -49,16 +50,18 @@ docstring InsetMathBoldSymbol::name() const void InsetMathBoldSymbol::metrics(MetricsInfo & mi, Dimension & dim) const { - //FontSetChanger dummy(mi.base, "mathbf"); + Changer dummy = mi.base.changeEnsureMath(); + //Changer dummy = mi.base.changeFontSet("mathbf"); cell(0).metrics(mi, dim); - metricsMarkers(dim); + metricsMarkers(mi, dim); ++dim.wid; // for 'double stroke' } void InsetMathBoldSymbol::draw(PainterInfo & pi, int x, int y) const { - //FontSetChanger dummy(pi.base, "mathbf"); + Changer dummy = pi.base.changeEnsureMath(); + //Changer dummy = pi.base.changeFontSet("mathbf"); cell(0).draw(pi, x + 1, y); cell(0).draw(pi, x + 2, y); drawMarkers(pi, x, y); @@ -106,6 +109,18 @@ void InsetMathBoldSymbol::write(WriteStream & os) const } +void InsetMathBoldSymbol::mathmlize(MathStream & os) const +{ + os << "" << cell(0) << ""; +} + + +void InsetMathBoldSymbol::htmlize(HtmlStream & os) const +{ + os << MTag("b") << cell(0) << ETag("b"); +} + + void InsetMathBoldSymbol::infoize(odocstream & os) const { switch (kind_) {