]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_parboxinset.C
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / mathed / math_parboxinset.C
index d40efc594f5f7676e71031162d7932da6adc2bce..e98937b7f00d8c4020dfff0b95f08154018f71e7 100644 (file)
@@ -1,3 +1,4 @@
+#include <config.h>
 
 #include "math_parboxinset.h"
 #include "math_mathmlstream.h"
@@ -5,17 +6,20 @@
 #include "lyxlength.h"
 #include "debug.h"
 
+using std::auto_ptr;
+using std::endl;
+
 
 MathParboxInset::MathParboxInset()
        : lyx_width_(0), tex_width_("0mm"), position_('c')
 {
-       lyxerr << "constructing MathParboxInset\n";
+       lyxerr << "constructing MathParboxInset" << endl;
 }
 
 
-MathInset * MathParboxInset::clone() const
+auto_ptr<InsetBase> MathParboxInset::clone() const
 {
-       return new MathParboxInset(*this);
+       return auto_ptr<InsetBase>(new MathParboxInset(*this));
 }
 
 
@@ -29,17 +33,17 @@ void MathParboxInset::setWidth(string const & w)
 {
        tex_width_ = w;
        lyx_width_ = LyXLength(w).inBP();
-       lyxerr << "setting " << w << " to " << lyx_width_ << " pixel\n";
+       lyxerr << "setting " << w << " to " << lyx_width_ << " pixel" << endl;
 }
 
 
-Dimension MathParboxInset::metrics(MetricsInfo & mi) const
+void MathParboxInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy1(mi.base, "textnormal");
        WidthChanger dummy2(mi.base, lyx_width_);
-       MathTextInset::metrics(mi);
+       MathTextInset::metrics(mi, dim_);
        metricsMarkers();
-       return dim_;
+       dim = dim_;
 }