git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8889 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2004-08-12 21:29:21 +00:00
parent dfbc58b596
commit 9efc77e4db
3 changed files with 30 additions and 5 deletions

View File

@ -2,6 +2,8 @@
2004-08-12 André Pönitz <poenitz@gmx.net>
* math_nestinset.C: Fix #1249
* math_parser.C: Fix: #928
2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>

View File

@ -1013,8 +1013,20 @@ bool MathHullInset::getStatus(LCursor & cur, FuncRequest const & cmd,
istringstream is(cmd.argument);
string s;
is >> s;
if ((s == "append-column" || s == "delete-column")
&& (type_ == "eqnarray" || type_ == "simple"))
if ((type_ == "simple" || type_ == "equation")
&& (s == "append-column"
|| s == "delete-column"
|| s == "swap-column"
|| s == "copy-column"
|| s == "delete-column"
|| s == "append-row"
|| s == "delete-row"
|| s == "swap-row"
|| s == "copy-row"))
return false;
if ((type_ == "eqnarray")
&& (s == "appen-column"
|| s == "delete-column"))
return false;
return MathGridInset::getStatus(cur, cmd, flag);
}

View File

@ -144,7 +144,8 @@ enum {
FLAG_EQUATION = 1 << 9, // next \] leaves the loop
FLAG_SIMPLE2 = 1 << 10, // next \) leaves the loop
FLAG_OPTION = 1 << 11, // read [...] style option
FLAG_BRACED = 1 << 12 // read {...} style argument
FLAG_BRACED = 1 << 12, // read {...} style argument
FLAG_SKIPSPACE = 1 << 13 // skip spaces
};
@ -584,9 +585,17 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
lyxerr << endl;
#endif
if (flags & FLAG_SKIPSPACE) {
if (t.cat() == catSpace || t.cat() == catNewline)
continue;
pop_back();
return;
}
if (flags & FLAG_ITEM) {
if (t.cat() == catBegin) {
if (t.cat() == catBegin) {
// skip the brace and collect everything to the next matching
// closing brace
parse1(grid, FLAG_BRACE_LAST, mode, numbered);
@ -1203,8 +1212,10 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
// start = 1;
// at.nucleus()->cell(0) = opt;
//}
for (MathInset::idx_type i = start; i < at->nargs(); ++i)
for (MathInset::idx_type i = start; i < at->nargs(); ++i) {
parse(at.nucleus()->cell(i), FLAG_ITEM, m);
parse1(grid, FLAG_SKIPSPACE, mode, numbered);
}
cell->push_back(at);
}
}