From: Georg Baum Date: Thu, 19 Oct 2006 16:36:30 +0000 (+0000) Subject: Adjust InsetFloatList to the new InsetCommand syntax. X-Git-Tag: 1.6.10~12345 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d266040df3addee97db82c235d2e678b52af4628;p=features.git Adjust InsetFloatList to the new InsetCommand syntax. I forgot this with when I changed InsetCommand. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15376 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/insetfloatlist.C b/src/insets/insetfloatlist.C index 0d8b3b93cc..0064f2dede 100644 --- a/src/insets/insetfloatlist.C +++ b/src/insets/insetfloatlist.C @@ -72,26 +72,10 @@ void InsetFloatList::write(Buffer const &, ostream & os) const void InsetFloatList::read(Buffer const & buf, LyXLex & lex) { - FloatList const & floats = buf.params().getLyXTextClass().floats(); - string token; - - if (lex.eatLine()) { - setCmdName(lex.getString()); - lyxerr[Debug::INSETS] << "FloatList::float_type: " << getCmdName() << endl; - if (!floats.typeExist(getCmdName())) - lex.printError("InsetFloatList: Unknown float type: `$$Token'"); - } else - lex.printError("InsetFloatList: Parse error: `$$Token'"); - while (lex.isOK()) { - lex.next(); - token = lex.getString(); - if (token == "\\end_inset") - break; - } - if (token != "\\end_inset") { - lex.printError("Missing \\end_inset at this point. " - "Read: `$$Token'"); - } + InsetCommand::read(buf, lex); + lyxerr[Debug::INSETS] << "FloatList::float_type: " << getCmdName() << endl; + if (!buf.params().getLyXTextClass().floats().typeExist(getCmdName())) + lex.printError("InsetFloatList: Unknown float type: `$$Token'"); }