git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4470 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-06-24 18:10:01 +00:00
parent 663c61557d
commit 23f483a23e
3 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2002-06-24 André Pönitz <poenitz@gmx.net>
* *.[Ch]: left over changes from Porto
* math_gridinset.C (eolString): fix #456
2002-06-21 John Levon <moz@compsoc.man.ac.uk>
* formula.C: use repaint()

View File

@ -504,7 +504,7 @@ void MathGridInset::drawT(TextPainter & pain, int x, int y) const
}
string MathGridInset::eolString(row_type row) const
string MathGridInset::eolString(row_type row, bool fragile) const
{
string eol;
@ -523,7 +523,7 @@ string MathGridInset::eolString(row_type row) const
if (eol.empty() && row + 1 == nrows())
return string();
return "\\\\" + eol + '\n';
return (fragile ? "\\protect\\\\" : "\\\\") + eol + '\n';
}
@ -858,7 +858,7 @@ void MathGridInset::write(WriteStream & os) const
os << verboseHLine(rowinfo_[row].lines_);
for (col_type col = 0; col < ncols(); ++col)
os << cell(index(row, col)) << eocString(col);
os << eolString(row);
os << eolString(row, os.fragile());
}
string const s = verboseHLine(rowinfo_[nrows()].lines_);
if (!s.empty() && s != " ") {

View File

@ -203,7 +203,7 @@ public:
protected:
/// returns proper 'end of line' code for LaTeX
string eolString(row_type row) const;
string eolString(row_type row, bool fragile = false) const;
/// returns proper 'end of column' code for LaTeX
string eocString(col_type col) const;
/// extract number of columns from alignment string