]> git.lyx.org Git - features.git/commitdiff
Adjust InsetFloatList to the new InsetCommand syntax.
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Thu, 19 Oct 2006 16:36:30 +0000 (16:36 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Thu, 19 Oct 2006 16:36:30 +0000 (16:36 +0000)
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

src/insets/insetfloatlist.C

index 0d8b3b93cc987d2477369cbdc2b523f395b253aa..0064f2dedeb94a267d9b661feeac7c734cd37c2a 100644 (file)
@@ -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'");
 }