]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
Embedding: saving inzip name to .lyx file so that embedded files can always be found...
[lyx.git] / src / Layout.cpp
index 13edbf46dd6ad01fbbe23205b466fa5f66a951cc..80c8550923de08aac27bb58d7a3f793649c34f63 100644 (file)
 #include "Layout.h"
 #include "TextClass.h"
 #include "Lexer.h"
-#include "debug.h"
+#include "Font.h"
+#include "support/debug.h"
 
-#include "support/lstrings.h"
 
-using std::endl;
-using std::string;
+#include "support/lstrings.h"
 
-namespace lyx {
+#include <ostream>
 
-using support::subst;
-using support::trim;
+using namespace std;
+using namespace lyx::support;
 
-extern FontInfo lyxRead(Lexer &, FontInfo const & fi = sane_font);
+namespace lyx {
 
 /// Special value of toclevel for layouts that to not belong in a TOC
 const int Layout::NOT_IN_TOC = -1000;
@@ -83,6 +82,7 @@ enum LayoutTags {
        LT_PARSKIP,
        //LT_PLAIN,
        LT_PREAMBLE,
+       LT_REQUIRES,
        LT_RIGHTMARGIN,
        LT_SPACING,
        LT_TOPSEP,
@@ -180,6 +180,7 @@ bool Layout::read(Lexer & lexrc, TextClass const & tclass)
                { "parskip",        LT_PARSKIP },
                { "passthru",       LT_PASS_THRU },
                { "preamble",       LT_PREAMBLE },
+               { "requires",       LT_REQUIRES },
                { "rightmargin",    LT_RIGHTMARGIN },
                { "spacing",        LT_SPACING },
                { "textfont",       LT_TEXTFONT },
@@ -485,6 +486,12 @@ bool Layout::read(Lexer & lexrc, TextClass const & tclass)
                case LT_SPACING: // setspace.sty
                        readSpacing(lexrc);
                        break;
+
+               case LT_REQUIRES:
+                       if (lexrc.eatLine())
+                               requires_ = getVectorFromString(lexrc.getString());
+                       break;
+
                }
        }
        lexrc.popTable();