]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathLefteqn.cpp
last commit was incomplete... not sure how I managed this..
[lyx.git] / src / mathed / InsetMathLefteqn.cpp
index 6227dbf32c94a8794b1d9af2b9c5b72cb72517b5..358ecd3f0c2030cb5cafe8321625ea6b443639c9 100644 (file)
 #include <config.h>
 
 #include "InsetMathLefteqn.h"
-#include "MathArray.h"
+#include "MathData.h"
 #include "support/std_ostream.h"
 
 
 namespace lyx {
 
-
-using std::string;
-using std::auto_ptr;
-
-
 InsetMathLefteqn::InsetMathLefteqn()
        : InsetMathNest(1)
 {}
 
 
-auto_ptr<InsetBase> InsetMathLefteqn::doClone() const
+Inset * InsetMathLefteqn::clone() const
 {
-       return auto_ptr<InsetBase>(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;
+       // Cache the inset dimension. 
+       setDimCache(mi, dim);
 }