]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathArray.cpp
fix off-by-two drawing error
[lyx.git] / src / mathed / InsetMathArray.cpp
index 319e7ef55c6c85ac91dd37d6aad471f44c7b77a1..d86040411093ed3a7e8bd212fa7d7f0a23592ff8 100644 (file)
@@ -39,12 +39,6 @@ InsetMathArray::InsetMathArray(docstring const & name, int m, int n,
 {}
 
 
-InsetMathArray::InsetMathArray(docstring const & name, char valign,
-               docstring const & halign)
-       : InsetMathGrid(valign, halign), name_(name)
-{}
-
-
 InsetMathArray::InsetMathArray(docstring const & name, docstring const & str)
        : InsetMathGrid(1, 1), name_(name)
 {
@@ -101,13 +95,16 @@ void InsetMathArray::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathArray::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
+
        if (os.fragile())
                os << "\\protect";
        os << "\\begin{" << name_ << '}';
 
-       if (v_align_ == 't' || v_align_ == 'b')
-               os << '[' << char(v_align_) << ']';
-       os << '{' << halign() << "}\n";
+       char const v = verticalAlignment();
+       if (v == 't' || v == 'b')
+               os << '[' << v << ']';
+       os << '{' << horizontalAlignments() << "}\n";
 
        InsetMathGrid::write(os);