]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathBox.cpp
last commit was incomplete... not sure how I managed this..
[lyx.git] / src / mathed / InsetMathBox.cpp
index 8a4e87c550ed22ac6e74fff4331061974b9823a9..36c1c163506fbda5defb4a6e9f34c8500572380a 100644 (file)
@@ -11,7 +11,7 @@
 #include <config.h>
 
 #include "InsetMathBox.h"
-#include "MathArray.h"
+#include "MathData.h"
 #include "MathStream.h"
 #include "MathStream.h"
 #include "support/std_ostream.h"
 
 namespace lyx {
 
-using std::string;
-using std::auto_ptr;
-
-
 InsetMathBox::InsetMathBox(docstring const & name)
        : InsetMathNest(1), name_(name)
 {}
 
 
-auto_ptr<InsetBase> InsetMathBox::doClone() const
+Inset * InsetMathBox::clone() const
 {
-       return auto_ptr<InsetBase>(new InsetMathBox(*this));
+       return new InsetMathBox(*this);
 }
 
 
@@ -48,15 +44,13 @@ void InsetMathBox::normalize(NormalStream & os) const
 }
 
 
-bool InsetMathBox::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathBox::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, "textnormal");
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
-       if (dim_ == dim)
-               return false;
-       dim_ = dim;
-       return true;
+       // Cache the inset dimension. 
+       setDimCache(mi, dim);
 }