]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_makeboxinset.C
architectural changes to tex2lyx
[lyx.git] / src / mathed / math_makeboxinset.C
index f2d5ea80cb75530c378a7d7571574e49cb10c9fb..b708d4a7da40987dcf0eda45aa0b05778a0e7758 100644 (file)
@@ -10,6 +10,7 @@
 #include "math_streamstr.h"
 #include "frontends/Painter.h"
 
+using std::auto_ptr;
 
 
 MathMakeboxInset::MathMakeboxInset()
@@ -17,13 +18,13 @@ MathMakeboxInset::MathMakeboxInset()
 {}
 
 
-MathInset * MathMakeboxInset::clone() const
+auto_ptr<InsetBase> MathMakeboxInset::clone() const
 {
-       return new MathMakeboxInset(*this);
+       return auto_ptr<InsetBase>(new MathMakeboxInset(*this));
 }
 
 
-Dimension MathMakeboxInset::metrics(MetricsInfo & mi) const
+void MathMakeboxInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, "textnormal");
        w_ = mathed_char_width(mi.base.font, '[');
@@ -33,7 +34,7 @@ Dimension MathMakeboxInset::metrics(MetricsInfo & mi) const
        dim_  += cell(2).dim();
        dim_.wid += 4 * w_ + 4;
        metricsMarkers();
-       return dim_;
+       dim = dim_;
 }