Fix bug #6310: Incorrect latex for sparse matrices with vertical lines.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32145 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-11-22 02:03:09 +00:00
parent ab19ef36cc
commit cd514c458a

View File

@ -994,13 +994,19 @@ void InsetMathGrid::write(WriteStream & os,
{
MathEnsurer ensurer(os, false);
docstring eol;
LYXERR0( " " << beg_col << " " << end_col );
LYXERR0( (colinfo_[beg_col].lines_) );
LYXERR0( (colinfo_[end_col].lines_) );
for (row_type row = beg_row; row < end_row; ++row) {
os << verboseHLine(rowinfo_[row].lines_);
// don't write & and empty cells at end of line
// don't write & and empty cells at end of line,
// unless there are vertical lines
col_type lastcol = 0;
bool emptyline = true;
for (col_type col = beg_col; col < end_col; ++col)
if (!cell(index(row, col)).empty()) {
if (!cell(index(row, col)).empty()
|| colinfo_[col + 1].lines_) {
lastcol = col + 1;
emptyline = false;
}