X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_envinset.C;h=d0a282f1e794e75b45114fc7e6d79dbacaf80183;hb=1ecc7b79cdf95de50f2683fb7a8f983b5dcdf0d2;hp=31b457a89859f29d95efbc3485add3f82b6a4182;hpb=9b2be91bed98ee68bf507a122af66237cdedc4ec;p=lyx.git diff --git a/src/mathed/math_envinset.C b/src/mathed/math_envinset.C index 31b457a898..d0a282f1e7 100644 --- a/src/mathed/math_envinset.C +++ b/src/mathed/math_envinset.C @@ -1,13 +1,24 @@ -#include +/** + * \file math_envinset.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author André Pönitz + * + * Full author contact details are available in file CREDITS. + */ -#ifdef __GNUG__ -#pragma implementation -#endif +#include #include "math_envinset.h" +#include "math_data.h" #include "math_mathmlstream.h" #include "math_streamstr.h" -#include "support/LOstream.h" +#include "support/std_ostream.h" + + +using std::string; +using std::auto_ptr; MathEnvInset::MathEnvInset(string const & name) @@ -15,23 +26,24 @@ MathEnvInset::MathEnvInset(string const & name) {} -MathInset * MathEnvInset::clone() const +auto_ptr MathEnvInset::clone() const { - return new MathEnvInset(*this); + return auto_ptr(new MathEnvInset(*this)); } -void MathEnvInset::metrics(MathMetricsInfo & mi) const +void MathEnvInset::metrics(MetricsInfo & mi, Dimension & dim) const { - dim_ = xcell(0).metrics(mi); - metricsMarkers2(); + cell(0).metrics(mi, dim); + metricsMarkers(dim); + dim_ = dim; } -void MathEnvInset::draw(MathPainterInfo & pi, int x, int y) const +void MathEnvInset::draw(PainterInfo & pi, int x, int y) const { - xcell(0).draw(pi, x + 1, y); - drawMarkers2(pi, x, y); + cell(0).draw(pi, x + 1, y); + drawMarkers(pi, x, y); } @@ -43,7 +55,7 @@ void MathEnvInset::write(WriteStream & os) const void MathEnvInset::normalize(NormalStream & os) const { - os << "[env " << name_ << " " << cell(0) << ']'; + os << "[env " << name_ << ' ' << cell(0) << ']'; }