]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloatList.cpp
Move isMultiCell() to Cursor, and use it.
[lyx.git] / src / insets / InsetFloatList.cpp
index 745712a34b96f7d6ca90a6074678afaa7505012f..e0dedf0b80856a95b7c4bb2760fcbbad7d903703 100644 (file)
@@ -21,8 +21,8 @@
 #include "LaTeXFeatures.h"
 #include "Lexer.h"
 #include "MetricsInfo.h"
-#include "TocBackend.h"
 #include "TextClass.h"
+#include "TocBackend.h"
 
 #include "support/debug.h"
 #include "support/gettext.h"
@@ -68,7 +68,7 @@ bool InsetFloatList::isCompatibleCommand(string const & s)
 
 docstring InsetFloatList::screenLabel() const
 {
-       FloatList const & floats = buffer().params().textClass().floats();
+       FloatList const & floats = buffer().params().documentClass().floats();
        FloatList::const_iterator it = floats[to_ascii(getParam("type"))];
        if (it != floats.end())
                return buffer().B_(it->second.listName());
@@ -85,7 +85,8 @@ void InsetFloatList::write(ostream & os) const
 
 void InsetFloatList::read(Lexer & lex)
 {
-       FloatList const & floats = buffer().params().textClass().floats();
+       lex.setContext("InsetFloatList::read");
+       FloatList const & floats = buffer().params().documentClass().floats();
        string token;
 
        if (lex.eatLine()) {
@@ -93,9 +94,9 @@ void InsetFloatList::read(Lexer & lex)
                LYXERR(Debug::INSETS, "FloatList::float_type: "
                                      << to_ascii(getParam("type")));
                if (!floats.typeExist(to_ascii(getParam("type"))))
-                       lex.printError("InsetFloatList: Unknown float type: `$$Token'");
+                       lex.printError("Unknown float type");
        } else {
-               lex.printError("InsetFloatList: Parse error: `$$Token'");
+               lex.printError("Parse error");
        }
 
        while (lex.isOK()) {
@@ -105,15 +106,14 @@ void InsetFloatList::read(Lexer & lex)
                        break;
        }
        if (token != "\\end_inset") {
-               lex.printError("Missing \\end_inset at this point. "
-                              "Read: `$$Token'");
+               lex.printError("Missing \\end_inset at this point.");
        }
 }
 
 
 int InsetFloatList::latex(odocstream & os, OutputParams const &) const
 {
-       FloatList const & floats = buffer().params().textClass().floats();
+       FloatList const & floats = buffer().params().documentClass().floats();
        FloatList::const_iterator cit = floats[to_ascii(getParam("type"))];
 
        if (cit != floats.end()) {