]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_rootinset.C
architectural changes to tex2lyx
[lyx.git] / src / mathed / math_rootinset.C
index 48fc1375f803ef5c8506f6bd6b8e582ffdb3bf46..f9ffc027b0ef6be45f5e835d0de856b01adbbc33 100644 (file)
@@ -18,6 +18,7 @@
 
 
 using std::max;
+using std::auto_ptr;
 
 
 MathRootInset::MathRootInset()
@@ -25,20 +26,20 @@ MathRootInset::MathRootInset()
 {}
 
 
-MathInset * MathRootInset::clone() const
+auto_ptr<InsetBase> MathRootInset::clone() const
 {
-       return new MathRootInset(*this);
+       return auto_ptr<InsetBase>(new MathRootInset(*this));
 }
 
 
-Dimension MathRootInset::metrics(MetricsInfo & mi) const
+void MathRootInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        MathNestInset::metrics(mi);
        dim_.asc = max(cell(0).ascent()  + 5, cell(1).ascent())  + 2;
        dim_.des = max(cell(1).descent() + 5, cell(0).descent()) + 2;
        dim_.wid = cell(0).width() + cell(1).width() + 10;
        metricsMarkers(1);
-       return dim_;
+       dim = dim_;
 }