Fix crash crash of the day when reading back non-rectangular "matrices"

(aka "error messages") (try yourself: \sqrt{x} and "M-x math-extern octave")


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4065 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-04-25 05:58:55 +00:00
parent 1be9ab2b0c
commit 8d4a2a275b
3 changed files with 9 additions and 1 deletions

View File

@ -55,7 +55,7 @@ MathArrayInset::MathArrayInset(string const & name, string const & str)
for (col_type col = 1; col < dat[0].size(); ++col)
addCol(0);
for (row_type row = 0; row < dat.size(); ++row)
for (col_type col = 0; col < dat[row].size(); ++col)
for (col_type col = 0; col < dat[0].size(); ++col)
mathed_parse_cell(cell(index(row, col)), dat[row][col]);
}

View File

@ -80,6 +80,12 @@ void MathSqrtInset::maplize(MapleStream & os) const
}
void MathSqrtInset::octavize(OctaveStream & os) const
{
os << "sqrt(" << cell(0) << ')';
}
void MathSqrtInset::mathmlize(MathMLStream & os) const
{
os << MTag("msqrt") << cell(0) << ETag("msqrt");

View File

@ -33,6 +33,8 @@ public:
///
void maplize(MapleStream &) const;
///
void octavize(OctaveStream &) const;
///
void mathmlize(MathMLStream &) const;
};
#endif