]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_parboxinset.C
Fix.
[lyx.git] / src / mathed / math_parboxinset.C
index 254a678767735a66d903c696481f371deaabbd7e..5a4ad25dd64baa0b5f94c2fbd27e067f9c5c2cfc 100644 (file)
@@ -7,8 +7,7 @@
 
 
 MathParboxInset::MathParboxInset()
-       : MathNestInset(1), lyx_width_(0), tex_width_("0mm"),
-         position_('c')
+       : lyx_width_(0), tex_width_("0mm"), position_('c')
 {
        lyxerr << "constructing MathParboxInset\n";
 }
@@ -37,20 +36,17 @@ void MathParboxInset::setWidth(string const & w)
 void MathParboxInset::metrics(MathMetricsInfo & mi) const
 {
        MathFontSetChanger dummy1(mi.base, "textnormal");
-       MathWidthChanger   dummy2(mi.base, lyx_width_);
-       xcell(0).metrics(mi);
-       ascent_  = xcell(0).ascent();
-       descent_ = xcell(0).descent() + 1;
-       width_   = xcell(0).width()   + 2;
+       MathWidthChanger dummy2(mi.base, lyx_width_);
+       MathTextInset::metrics(mi);
+       metricsMarkers2();
 }
 
 
 void MathParboxInset::draw(MathPainterInfo & pi, int x, int y) const
 {
-       MathFontSetChanger dummy1(pi.base, "textnormal");
-       MathWidthChanger   dummy2(pi.base, lyx_width_);
-       xcell(0).draw(pi, x + 1, y);
-       drawMarkers(pi, x, y);
+       MathFontSetChanger dummy(pi.base, "textnormal");
+       MathTextInset::draw(pi, x + 1, y);
+       drawMarkers2(pi, x, y);
 }
 
 
@@ -65,6 +61,5 @@ void MathParboxInset::write(WriteStream & os) const
 
 void MathParboxInset::infoize(std::ostream & os) const
 {
-       os << "Box: Parbox " << tex_width_ << ' ';
+       os << "Box: Parbox " << tex_width_;
 }
-