]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_boxinset.C
architectural changes to tex2lyx
[lyx.git] / src / mathed / math_boxinset.C
index e57a151e54f7079c982dfe65f15bf9b0ae79f374..28b3da4f45098bbe937b0e0e10e38d2798f48928 100644 (file)
@@ -6,15 +6,17 @@
 #include "math_streamstr.h"
 #include "support/LOstream.h"
 
+using std::auto_ptr;
+
 
 MathBoxInset::MathBoxInset(string const & name)
        : MathNestInset(1), name_(name)
 {}
 
 
-MathInset * MathBoxInset::clone() const
+auto_ptr<InsetBase> MathBoxInset::clone() const
 {
-       return new MathBoxInset(*this);
+       return auto_ptr<InsetBase>(new MathBoxInset(*this));
 }
 
 
@@ -32,12 +34,12 @@ void MathBoxInset::normalize(NormalStream & os) const
 }
 
 
-Dimension MathBoxInset::metrics(MetricsInfo & mi) const
+void MathBoxInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, "textnormal");
        cell(0).metrics(mi, dim_);
        metricsMarkers();
-       return dim_;
+       dim = dim_;
 }