#include "Layout.h"
#include "TextClass.h"
#include "Lexer.h"
-#include "support/debug.h"
+#include "Font.h"
+#include "support/debug.h"
#include "support/lstrings.h"
#include <ostream>
-using std::endl;
-using std::string;
+using namespace std;
+using namespace lyx::support;
namespace lyx {
-using support::subst;
-using support::trim;
-
-
/// Special value of toclevel for layouts that to not belong in a TOC
const int Layout::NOT_IN_TOC = -1000;
LT_PARSKIP,
//LT_PLAIN,
LT_PREAMBLE,
+ LT_REQUIRES,
LT_RIGHTMARGIN,
LT_SPACING,
LT_TOPSEP,
{ "parskip", LT_PARSKIP },
{ "passthru", LT_PASS_THRU },
{ "preamble", LT_PREAMBLE },
+ { "requires", LT_REQUIRES },
{ "rightmargin", LT_RIGHTMARGIN },
{ "spacing", LT_SPACING },
{ "textfont", LT_TEXTFONT },
<< 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'");
case LT_SPACING: // setspace.sty
readSpacing(lexrc);
break;
+
+ case LT_REQUIRES:
+ lexrc.eatLine();
+ vector<string> const req =
+ getVectorFromString(lexrc.getString());
+ requires_.insert(req.begin(), req.end());
+ break;
+
}
}
lexrc.popTable();
- return error;
+ return !error;
}