X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathFont.cpp;h=2d73d64710223259947fa958a33ade3e7043260c;hb=c1173eb11c5f218cd459924eb44276445c499069;hp=bfeeeff3977120bc30636c6f8b59481b614047aa;hpb=32871c1284f15265f652ff01c438e539a7c8181f;p=lyx.git diff --git a/src/mathed/InsetMathFont.cpp b/src/mathed/InsetMathFont.cpp index bfeeeff397..2d73d64710 100644 --- a/src/mathed/InsetMathFont.cpp +++ b/src/mathed/InsetMathFont.cpp @@ -11,26 +11,26 @@ #include #include "InsetMathFont.h" + +#include "LaTeXFeatures.h" #include "MathData.h" #include "MathStream.h" #include "MathParser.h" -#include "LaTeXFeatures.h" -#include "support/std_ostream.h" +#include "MetricsInfo.h" +#include -namespace lyx { - -using std::auto_ptr; +namespace lyx { InsetMathFont::InsetMathFont(latexkeys const * key) : InsetMathNest(1), key_(key) {} -auto_ptr InsetMathFont::doClone() const +Inset * InsetMathFont::clone() const { - return auto_ptr(new InsetMathFont(*this)); + return new InsetMathFont(*this); } @@ -44,15 +44,11 @@ InsetMath::mode_type InsetMathFont::currentMode() const } -bool InsetMathFont::metrics(MetricsInfo & mi, Dimension & dim) const +void InsetMathFont::metrics(MetricsInfo & mi, Dimension & dim) const { FontSetChanger dummy(mi.base, key_->name); cell(0).metrics(mi, dim); metricsMarkers(dim); - if (dim_ == dim) - return false; - dim_ = dim; - return true; } @@ -67,7 +63,9 @@ void InsetMathFont::draw(PainterInfo & pi, int x, int y) const void InsetMathFont::metricsT(TextMetricsInfo const & mi, Dimension &) const { - cell(0).metricsT(mi, dim_); + // FIXME: BROKEN! + Dimension dim; + cell(0).metricsT(mi, dim); }