mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Do not call InsetCommandParams::read in InsetInclude::read anymore, since
the syntax of InsetInclude did not change when the syntax of InsetCommand changed. Therefore we need to implement our own read method. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15833 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6008c8176e
commit
35964d3e02
@ -273,7 +273,27 @@ void InsetInclude::read(Buffer const &, LyXLex & lex)
|
|||||||
|
|
||||||
void InsetInclude::read(LyXLex & lex)
|
void InsetInclude::read(LyXLex & lex)
|
||||||
{
|
{
|
||||||
params_.read(lex);
|
if (lex.isOK()) {
|
||||||
|
lex.next();
|
||||||
|
string const command = lex.getString();
|
||||||
|
params_.scanCommand(command);
|
||||||
|
}
|
||||||
|
string token;
|
||||||
|
while (lex.isOK()) {
|
||||||
|
lex.next();
|
||||||
|
token = lex.getString();
|
||||||
|
if (token == "\\end_inset")
|
||||||
|
break;
|
||||||
|
if (token == "preview") {
|
||||||
|
lex.next();
|
||||||
|
params_.preview(lex.getBool());
|
||||||
|
} else
|
||||||
|
lex.printError("Unknown parameter name `$$Token' for command " + params_.getCmdName());
|
||||||
|
}
|
||||||
|
if (token != "\\end_inset") {
|
||||||
|
lex.printError("Missing \\end_inset at this point. "
|
||||||
|
"Read: `$$Token'");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user