namespace lyx {
-using std::string;
-using std::auto_ptr;
-using std::vector;
-
-
InsetMathUnknown::InsetMathUnknown(docstring const & nm, bool final, bool black)
: name_(nm), final_(final), black_(black)
{}
-auto_ptr<InsetBase> InsetMathUnknown::doClone() const
+Inset * InsetMathUnknown::clone() const
{
- return auto_ptr<InsetBase>(new InsetMathUnknown(*this));
+ return new InsetMathUnknown(*this);
}
}
-bool InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const
{
mathed_string_dim(mi.base.font, name_, dim);
docstring::const_reverse_iterator rit = name_.rbegin();
kerning_ = mathed_char_kerning(mi.base.font, *rit);
- if (dim_ == dim)
- return false;
- dim_ = dim;
- return true;
}