]> 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 598222237a9fbbe41d81aa84390b7240549ffeae..80c8550923de08aac27bb58d7a3f793649c34f63 100644 (file)
 #include "Layout.h"
 #include "TextClass.h"
 #include "Lexer.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;
 
@@ -84,6 +82,7 @@ enum LayoutTags {
        LT_PARSKIP,
        //LT_PLAIN,
        LT_PREAMBLE,
+       LT_REQUIRES,
        LT_RIGHTMARGIN,
        LT_SPACING,
        LT_TOPSEP,
@@ -181,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 },
@@ -486,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();