X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLayout.cpp;h=7fedb3209c11fc16da9b7edc43a6c3d4626958e2;hb=0362c6aae73c293d1c20277c12d362acfe0b2ef6;hp=80c8550923de08aac27bb58d7a3f793649c34f63;hpb=9e5eebc14cd06f58000a4bd1903f157b65a3ab19;p=lyx.git diff --git a/src/Layout.cpp b/src/Layout.cpp index 80c8550923..7fedb3209c 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -16,9 +16,8 @@ #include "TextClass.h" #include "Lexer.h" #include "Font.h" -#include "support/debug.h" - +#include "support/debug.h" #include "support/lstrings.h" #include @@ -224,14 +223,9 @@ bool Layout::read(Lexer & lexrc, TextClass const & tclass) << to_utf8(style) << "'\n" << "All layouts so far:" << endl; - TextClass::const_iterator it = - tclass.begin(); - TextClass::const_iterator end = - tclass.end(); - for (; it != end; ++it) { - lyxerr << to_utf8((*it)->name()) + for (size_t i = 0; i != tclass.layoutCount(); ++i) + lyxerr << to_utf8(tclass.layout(i)->name()) << endl; - } //lexrc.printError("Cannot copy known " // "style `$$Token'"); @@ -488,15 +482,17 @@ bool Layout::read(Lexer & lexrc, TextClass const & tclass) break; case LT_REQUIRES: - if (lexrc.eatLine()) - requires_ = getVectorFromString(lexrc.getString()); + lexrc.eatLine(); + vector const req = + getVectorFromString(lexrc.getString()); + requires_.insert(req.begin(), req.end()); break; } } lexrc.popTable(); - return error; + return !error; }