namespace lyx {
-using std::string;
-using std::auto_ptr;
-
-
InsetMathBox::InsetMathBox(docstring const & name)
: InsetMathNest(1), name_(name)
{}
-auto_ptr<Inset> InsetMathBox::doClone() const
+Inset * InsetMathBox::clone() const
{
- return auto_ptr<Inset>(new InsetMathBox(*this));
+ return new InsetMathBox(*this);
}
}
-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);
}