X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathLefteqn.cpp;h=c4aa8b1f4f093c207e416416bf5c7843f0e0aead;hb=e709a6626e731b460a98ea34d762a776de90b54c;hp=4122d781f9afa264bcaee522d23dcf4cdb95eb99;hpb=f497296c30e6da2f97b16da8ad1c9e96feffb16b;p=lyx.git diff --git a/src/mathed/InsetMathLefteqn.cpp b/src/mathed/InsetMathLefteqn.cpp index 4122d781f9..c4aa8b1f4f 100644 --- a/src/mathed/InsetMathLefteqn.cpp +++ b/src/mathed/InsetMathLefteqn.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. */ @@ -11,46 +11,35 @@ #include #include "InsetMathLefteqn.h" -#include "MathData.h" -#include "support/std_ostream.h" - -namespace lyx { +#include "support/docstream.h" -using std::string; -using std::auto_ptr; - +namespace lyx { -InsetMathLefteqn::InsetMathLefteqn() - : InsetMathNest(1) +InsetMathLefteqn::InsetMathLefteqn(Buffer * buf) + : InsetMathNest(buf, 1) {} -auto_ptr InsetMathLefteqn::doClone() const +Inset * InsetMathLefteqn::clone() const { - return auto_ptr(new InsetMathLefteqn(*this)); + return new InsetMathLefteqn(*this); } -bool InsetMathLefteqn::metrics(MetricsInfo & mi, Dimension & dim) const +void InsetMathLefteqn::metrics(MetricsInfo & mi, Dimension & dim) const { cell(0).metrics(mi, dim); dim.asc += 2; dim.des += 2; dim.wid = 4; - metricsMarkers(dim); - if (dim_ == dim) - return false; - dim_ = dim; - return true; } void InsetMathLefteqn::draw(PainterInfo & pi, int x, int y) const { - cell(0).draw(pi, x + 2, y); - drawMarkers(pi, x, y); + cell(0).draw(pi, x + 1, y); }