mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
0f5ff99bc1
compiler *sigh* git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2804 a592a061-630c-0410-9148-cb99ea01b6c8
47 lines
797 B
C
47 lines
797 B
C
#ifdef __GNUG__
|
|
#pragma implementation
|
|
#endif
|
|
|
|
#include "math_arrayinset.h"
|
|
#include "support/LOstream.h"
|
|
|
|
|
|
MathArrayInset::MathArrayInset(int m, int n)
|
|
: MathGridInset(m, n)
|
|
{}
|
|
|
|
|
|
MathInset * MathArrayInset::clone() const
|
|
{
|
|
return new MathArrayInset(*this);
|
|
}
|
|
|
|
|
|
void MathArrayInset::write(std::ostream & os, bool fragile) const
|
|
{
|
|
if (fragile)
|
|
os << "\\protect";
|
|
os << "\\begin{array}";
|
|
|
|
if (v_align_ == 't' || v_align_ == 'b')
|
|
os << '[' << char(v_align_) << ']';
|
|
|
|
os << '{';
|
|
for (col_type col = 0; col < ncols(); ++col)
|
|
os << colinfo_[col].align_;
|
|
os << "}\n";
|
|
|
|
MathGridInset::write(os, fragile);
|
|
|
|
if (fragile)
|
|
os << "\\protect";
|
|
os << "\\end{array}\n";
|
|
}
|
|
|
|
|
|
void MathArrayInset::metrics(MathStyles st) const
|
|
{
|
|
MathGridInset::metrics(st == LM_ST_DISPLAY ? LM_ST_TEXT : st);
|
|
}
|
|
|