-
#include "math_undersetinset.h"
#include "math_mathmlstream.h"
#include "math_support.h"
using std::max;
+using std::auto_ptr;
MathUndersetInset::MathUndersetInset()
{}
-MathInset * MathUndersetInset::clone() const
+auto_ptr<InsetBase> MathUndersetInset::clone() const
{
- return new MathUndersetInset(*this);
+ return auto_ptr<InsetBase>(new MathUndersetInset(*this));
}
-Dimension MathUndersetInset::metrics(MetricsInfo & mi) const
+void MathUndersetInset::metrics(MetricsInfo & mi, Dimension & dim) const
{
cell(1).metrics(mi);
FracChanger dummy(mi.base);
dim_.wid = max(cell(0).width(), cell(1).width()) + 4;
dim_.asc = cell(1).ascent();
dim_.des = cell(1).descent() + cell(0).height() + 4;
- return dim_;
+ dim = dim_;
}