]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathUnknown.cpp
simplify GuiToc / TocWidget interaction. Much can still be simplified...
[lyx.git] / src / mathed / InsetMathUnknown.cpp
index a50ac259ec60d82fc31672692769cdf49b2dfef9..41baefc92c1b54e974c96519593deb6a407bf721 100644 (file)
 
 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<Inset> InsetMathUnknown::doClone() const
+Inset * InsetMathUnknown::clone() const
 {
-       return auto_ptr<Inset>(new InsetMathUnknown(*this));
+       return new InsetMathUnknown(*this);
 }
 
 
@@ -53,15 +48,11 @@ void InsetMathUnknown::normalize(NormalStream & os) const
 }
 
 
-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;
 }