X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathTabular.cpp;h=bb4e5c48381e21d6f152a6e0513bbdc03ce976e7;hb=11a6b3c4c7a031fd3776f53c9c43f62116933cea;hp=7445044e3e4e602d29ff09cf6c7284ca83abd84a;hpb=f497296c30e6da2f97b16da8ad1c9e96feffb16b;p=lyx.git diff --git a/src/mathed/InsetMathTabular.cpp b/src/mathed/InsetMathTabular.cpp index 7445044e3e..bb4e5c4838 100644 --- a/src/mathed/InsetMathTabular.cpp +++ b/src/mathed/InsetMathTabular.cpp @@ -11,23 +11,18 @@ #include #include "InsetMathTabular.h" + #include "MathData.h" #include "MathStream.h" #include "MathStream.h" #include "support/lstrings.h" -#include "support/std_ostream.h" -#include +#include namespace lyx { - -using std::string; -using std::auto_ptr; - - InsetMathTabular::InsetMathTabular(docstring const & name, int m, int n) : InsetMathGrid(m, n), name_(name) {} @@ -45,21 +40,25 @@ InsetMathTabular::InsetMathTabular(docstring const & name, char valign, {} -auto_ptr InsetMathTabular::doClone() const +Inset * InsetMathTabular::clone() const { - return auto_ptr(new InsetMathTabular(*this)); + return new InsetMathTabular(*this); } -bool InsetMathTabular::metrics(MetricsInfo & mi, Dimension & dim) const +void InsetMathTabular::metrics(MetricsInfo & mi, Dimension & dim) const { FontSetChanger dummy(mi.base, "textnormal"); InsetMathGrid::metrics(mi, dim); dim.wid += 6; - if (dim_ == dim) - return false; - dim_ = dim; - return true; +} + + +Dimension const InsetMathTabular::dimension(BufferView const & bv) const +{ + Dimension dim = InsetMathGrid::dimension(bv); + dim.wid += 6; + return dim; }