From ef3b4f2936963d87f94221143259a3f1f451c0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 2 May 2003 07:43:23 +0000 Subject: [PATCH] small stuff git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6918 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 4 ++++ src/mathed/math_gridinfo.h | 2 +- src/mathed/math_gridinset.C | 11 +++++------ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 39a8ae9ef4..5bbd554904 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,4 +1,8 @@ +2003-05-02 André Pönitz + + * math_arrayinset.[Ch]: add markers + 2003-04-30 André Pönitz * math_gridinset.C: fix transition to new Col/Row/CellInfo scheme diff --git a/src/mathed/math_gridinfo.h b/src/mathed/math_gridinfo.h index 076df249c9..bc51b60286 100644 --- a/src/mathed/math_gridinfo.h +++ b/src/mathed/math_gridinfo.h @@ -3,7 +3,7 @@ struct ColInfo { - ColInfo() : rightline(0), leftline(false) {} + ColInfo() : align('c'), rightline(0), leftline(false) {} char align; // column alignment string width; // column width int rightline; // a line on the right? diff --git a/src/mathed/math_gridinset.C b/src/mathed/math_gridinset.C index 6725c71cac..9ed369df2a 100644 --- a/src/mathed/math_gridinset.C +++ b/src/mathed/math_gridinset.C @@ -151,7 +151,8 @@ void MathGridInset::halign(string const & hh) for (string::const_iterator it = hh.begin(); it != hh.end(); ++it) { if (col == ncols()) addCol(ncols() - 1); - char c = *it; + char const c = *it; + lyxerr << "handle column separator: '" << c << "'\n"; if (c == '|') { colinfo_[col].lines_++; } else if (c == 'c' || c == 'l' || c == 'r') { @@ -163,13 +164,11 @@ void MathGridInset::halign(string const & hh) } } -/* col_type n = hh.size(); - if (n > ncols()) - n = ncols(); + if (n >= ncols()) + n = ncols() - 1; for (col_type col = 0; col < n; ++col) - colinfo_[col].align_ = hh[col]; -*/ + colinfo_[col].align = hh[col]; }