]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathArray.cpp
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetMathArray.cpp
index 319e7ef55c6c85ac91dd37d6aad471f44c7b77a1..a543a036f61de6aa9c6d9179bf10647db85a96bc 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -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);