namespace lyx {
-using std::string;
-using std::auto_ptr;
-
-
InsetMathComment::InsetMathComment()
: InsetMathNest(1)
{}
}
-auto_ptr<Inset> InsetMathComment::doClone() const
+Inset * InsetMathComment::clone() const
{
- return auto_ptr<Inset>(new InsetMathComment(*this));
+ return new InsetMathComment(*this);
}
-bool InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
{
cell(0).metrics(mi, dim);
metricsMarkers(dim);
- if (dim_ == dim)
- return false;
- dim_ = dim;
- return true;
+ // Cache the inset dimension.
+ setDimCache(mi, dim);
}