]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathComment.cpp
* dynamic macros as described in http://1stein.org/download/dynmacro.pdf
[lyx.git] / src / mathed / InsetMathComment.cpp
index ca0de54262e6d6b7e4bad023fa39eced24c485cb..4648ba1f17bcf6795ffe71e1600e4dd33e776ac4 100644 (file)
 
 namespace lyx {
 
-using std::string;
-using std::auto_ptr;
-
-
 InsetMathComment::InsetMathComment()
        : InsetMathNest(1)
 {}
@@ -36,20 +32,18 @@ InsetMathComment::InsetMathComment(docstring const & str)
 }
 
 
-auto_ptr<InsetBase> InsetMathComment::doClone() const
+Inset * InsetMathComment::clone() const
 {
-       return auto_ptr<InsetBase>(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);
 }